You need to generate an openssl secret with:
openssl rand -hex 32
and include the following lines into your /var/www/peertube/config/production.yaml
file after the webserver section:
# Secrets you need to generate the first time you run PeerTube
secrets:
# Generate one using `openssl rand -hex 32`
peertube: '[put output of openssl rand -hex 3 here]'
and another article about the release https://framablog.org/2022/12/13/peertube-v5-the-result-of-5-years-handcrafting/