Help with Nextcloud on TrueNAS - Reverse Proxy diverting to local IP Address

I have setup a new Nextcloud instance on my TrueNAS Scale system. All is working fine, but I am having reverse proxy issues. I have made the changes I always make in config.php, but whenever I browse to the FQDN I get diverted to the local IP/Port Address of the Server.

I have googled and tweaked the config but still cannot uderstand why I am not using the FQDN through the reverse proxy.

Wonder if someone can steer me in the right direction :slight_smile:

Here is the portion of the config.pho I have changed.

‘overwritehost’ => ‘’,
‘overwriteprotocol’ => ‘https’,
‘trusted_proxies’ =>
array (
0 => ‘’,
1 => ‘::1’,
2 => ‘’,
‘overwrite.cli.url’ => ‘’,
‘upgrade.disable-web’ => true,
‘passwordsalt’ => ‘REMOVED’,
‘secret’ => ‘REMOVED’,
‘trusted_domains’ =>
array (
0 => ‘’,
1 => ‘’,

Any help or advice would be gratefully recieved :smiley:

thanks in advance



Anyone please?

This might turn your bump into a dull thud but I managed to crack this just by using ‘overwrite CLI host’.

I have Nextcloud installed on TrueNAS Scale as a TrueNAS App and nginx-proxy-manager installed via Truecharts. I’m also using tailscale, although I don’t think that part actually comes into play here. My domain name provider issues a free wildcard SSL so I have that in place both in Scale and Nginx-Proxy-Manager. No cert-bot, cloudfare or other guff; that’s way over my head.

Firstly, I have NO settings changed in config.php. I don’t even know how to find it. I added an Environment Variable through the basic TrueNAS Apps menu.

Yes, OK, I also have the ‘Overwrite Host’ variable in there too but it did chuff all when I added it first. I’m not taking it out though: if it ain’t broke…

One post on the TrueNAS forum insisted that the domain had to be in full, including “https://”. Nope. I ended up with the URL resolving to “https://https//”. Boooo.

Nginx-Proxy-Manager is running on Truecharts purely because I want it to run on ports 80 and 443, which isn’t possible for any iX Apps, at least according to legend, and certainly not for NPM. I had to install MetalLB, and MetalLB-config, through Truecharts to give me a fresh IP to access NPM. Thus:

  • DNS record for nextcloud.[domain] points to the local IP of NPM,
  • NPM has a proxy rule to pass nextcloud.[domain] to the local IP of Nextcloud,, with the SSL cert from the domain provider
  • Nextcloud is accessible inside and outside my home LAN via nextcloud.[domain]

Nextcloud is unreachable via any of the Tailscale ‘friendly’ names or the TS IPs: it’s only the local ones that work. I am not mentally prepared for Traefik yet, maybe in a few years, and I don’t fancy digging any other holes to fall into so I will leave it as it is. Providing my TrueNAS Scale box is advertising subnet routes, and I’m using a device linked to my Tailscale subnet, I can access my Nextcloud from anywhere.

Good luck.