Proper Set up with Cloudflare Tunnel

Hi - I’ve searched all over and I am really struggling here. I have UNRAID and I’ve managed to set up a local (and perfectly running) instance of Peertube. The minute I try to change the hostname to my domain name (that runs through Cloudflare tunneling so I don’t have to open any ports locally), I crash and burn with an OAUTH error « Cannot retrieve OAuth Client credentials: Getting client tokens for host… is forbidden ». I’ve attempted to run « npm run update-host » in the console and it acknowledges the change, but I constantly get the credentials error. I have to be missing a step… somewhere. I’ve also attempted adding webserver trusts in the UNRAID config, and also have struck out there.

Is there a guide or someone who can help me properly set this up? I just want to run a small instance of peertube and have it open to authorized users only via the domain name.

Usually this happens when the url you use to access Peertube is not exactly the same as the one configured in production.yaml: you have to check that these 3 lines match exactly the url you are using.
If the port is 443, it can be omitted in the url, otherwise it must be in the url.

If everything seems correct, try in private browsing mode, to be sure you have not deprecated credentials in your browser local storage.

@JohnLivingston - thank you for the help and reply. I apologize if this is a dumb question, but in the UNRAID setup, where might I find the production.yaml file? I’ve researched a bit in my rabbit hole of a hunt here and every thing that is referenced in the normal « docker » setup doesn’t seem to be in places in the UNRAID install. I’ve gone into « Console » from container and the places I’ve found in various threads online where this production.yaml should be doesn’t seem to exist in my iteration.

Sorry, i don’t know UNRAID.

The production.yaml file is in the config directory that is in the Peertube main directory.
The default path is /var/www/peertube/config/production.yaml.

You said you ran npm run update-host. So, the config dir should be in the same directory where you ran this command.

@JohnLivingston THANK YOU! So with your link, I was able to check /apps/config within the container and found a « example » production.yaml and in there was also a default.yaml. I updated it with what you linked to, and that WORKED! While it wasnt the direct correct answer, you got me on the path where I needed to go, so thanks very much!!

There are multiple configuration files, and the code library that is used has an inheritance mechanism.

It will first load « default.yaml », then « production.yaml » and overwrite any common configuration, and so on (ending by a local-production.json file, that is writen when you change settings using the web frontend).
The exact order that is used is printed in a log when the server starts.

For example, on one of my dev server, i got this log:

info: Using following configuration file hierarchy: /app/config/default.yaml -> /app/config/dev.yaml -> /config/dev.yml -> /config/local-dev.json -> /app/support/docker/production/config/custom-environment-variables.yaml.

Note: as it is a dev server, files have dev in their name instead of production. You should see something similar.

Note: this is on a docker setup, so I also have a /custom-environment-variables.yaml file that is provided by the container.

Modifying the default.yaml is working, but it is better to create/modify the production.yaml file.

I don’t know how UNRAID works, you should maybe also check if it adds another configuration file in the hierarchy, where stands the wrong configuration.
Maybe UNRAID does something similar to my docker setup, and you have an additionnal file that is in another directory.