Nextcloud and swag, on a non standard 443 HTTPS port

Hello,

I am running nextcloud in a docker container (ghcr.io/linuxserver/nextcloud) as well as swag (ghcr.io/linuxserver/swag). Everything is fully setup, including docker-compose files, changes in swag to route to the container, and settings in nextcloud for authorizing the proxy, as documented.
Also my NAT is configured and nextcloud is working okay on my subdomain.

No problem ? almost ! I cannot leave nextcloud on 443 on my public IP, I need that port for a more critical service. So I wanted to move it to 444. And I am facing an issue. Nextcloud seems to work okay, if and only if I access a correct path (like nextcloud.mydomain.com:444/login.
But if I am accessing a path that requires a redirect, like / (nextcloud.mydomain.com:444/) it redirects to the standard port 443, and not my 444 port. Which has severe issues, like providing the wrong certificate, leading to requests blocked by my browser. Some after login. Login works, but returns a location which is incorrect (port 443 instead of 444).

I am looking for help here: do you know what is triggerring these redirects (swag ? nextcloud ? nginx/apache in nextcloud ?) and how to fix them so that they also work on a non standard port ?

Thanks !