Webfinger returning malformed URLs

Hi… I’ve got PeerTube set up successfully, or so I thought. I’m running the docker container on my main storage server (ubuntu 24.04) behind an nginx proxy on another server, which is the target of the domain name, handles all the https stuff, certificate etc, and talks plain http to port 9000 on the server running peertube.

Relevant parts of .env appear to be:

PEERTUBE_WEBSERVER_HOSTNAME=videos.irrelevant.me.uk
# If you just want to test PeerTube on local
PEERTUBE_WEBSERVER_PORT=443
PEERTUBE_WEBSERVER_HTTPS=true

Although the website appears to be working fine, uploading, editing, playing videos, etc., trying to view the user/channel etc from within mastodon doesn’t work. Mastodon is doing a webfinger request, which is being returned as:

{"subject":"acct:robert@videos.irrelevant.me.uk","aliases":["http://videos.irrelevant.me.uk:443/accounts/robert"],"links":[{"rel":"self","type":"application/activity+json","href":"http://videos.irrelevant.me.uk:443/accounts/robert"},{"rel":"http://ostatus.org/schema/1.0/subscribe","template":"https://videos.irrelevant.me.uk/remote-interaction?uri={uri}"}]}

I think the problem is likely to be the « http:// … :443 » links - nginx rejects these with 400 Bad Request (The plain HTTP request was sent to HTTPS port.) Given that everything else works, over https, and the « template » link underneath is correct, I’m not sure if this is a configuration issue or a bug in whatever is constructing the links URLs.

Thanks for any assistance…

Hi,

The URL provided is stored in the database. It was generate on account creation, and maybe at that time the config was not correct.

Try CLI tools guide | PeerTube documentation to fix DB urls

1 « J'aime »

Thanks for the reply. I thought I’d got it all working before creating the account, but perhaps not.
As I was still in testing, I just wiped the contents of « docker-volume » and recreated the server, leaving « docker-compose.yml » and « .env » intact and unchanged. Created the user, and all seems to be working fine. I can view and follow the account and server from my mastodon instance now :slight_smile:

Thanks again for the assistance!

1 « J'aime »