Can't change peertube video storage location

hello,
i have spent the evening trying to change the storage location of peertube videos. to no avail.
here is the order of events that i tried:

  1. i have a storage drive connected to the server, mounted at /var/storage.
  2. i then copied the contents of /var/www/peertube/storage into the /var/storage directory.
  3. i changed the permission of the new directory to exactly match the ls -ld output of /var/www/peertube/storage directory.
  4. i edited production.yaml to change all the paths under the storage section to the new storage locations. since i just copied the whole /storage folder, there should be nothing amiss.
  5. finally, i do systemctl restart nginx and systemctl restart peertube

after the above, nginx remains stuck at « bad gateway » and there’s nothing i’ve found to do about it. did i miss anything?

Can you paste the errors of the server?

Have you also edited the nginx config, to update the paths?

if you give me the path of the error you seek, absolutely. sorry, i’m a bit of a noob on web servers :slight_smile:

ummm. no :thinking: i was not aware i had to. this would make total sense…
is the path to the config /etc/nginx/sites-available/peertube where i have to update the paths?

yes, and then systemctl reload nginx

ok so under /etc/nginx/sites-available/peertube there was a section called « performance optimizations ». under there i found the only reference to the storage. this was entered as
root /var/www/peertube/storage
i updated that line with the new path, and now everything seems to load correctly. after i did reload nginx or course. does that sound correct?

yes, should be ok now.

systemctl reload nginx

I would recommend using sudo nginx -t && sudo nginx -s reload. This way, nginx first tests any available configuration files for errors and only reloads if no errors are found.

This approach helps prevent downtime due to errors, as a misconfiguration during a reload could potentially bring the entire server down.