This is a tutorial on how to host a Funkwhale instance with SSL on a custom port using multiple docker containers. I will be using port 8443, but any will work.
Disclaimer: This is not officially supported and could break at any point. Federation and any other remote resource will not work if they expect you to be hosted on default 80/443 ports.
At the time of writing, the most recent version is 1.2.3 and this method works.
Follow installation steps provided HERE
Follow docker installation steps for nginx provided HERE
Follow HTTPS setup configuration provided HERE
Edit .env file located next to docker-compose.yml (/srv/funkwhale in tutorial) and add port to FUNKWHALE_HOSTNAME
FUNKWHALE_HOSTNAME=domain.com
-> FUNKWHALE_HOSTNAME=domain.com:8443
Restart docker-compose with docker-compose down && docker-compose up -d
while inside the folder with docker-compose.yml
Edit /etc/nginx/sites-available/funkwhale.conf and change ssl port to 8443.
listen 443 ssl http2;
-> listen 8443 ssl http2;
listen [::]:443 ssl http2;
-> listen [::]:8443 ssl http2;
If you don't want to use port 80, use # to comment out http server block which listens to port 80 or delete it. If you want to use it so domain.com redirects to your https with custom port you can add port to 301 response.
location / { return 301 https://$host$request_uri; }
-> location / { return 301 https://$host:8443$request_uri; }
Restart nginx with systemctl restart nginx