Nextcloud Instance Not Recognizing HTTPS?

Hi Everyone,

I’m running both Nextcloud and Tailscale on my NAS. Through a similar process recommended by the guides here, I set up a custom domain name to point to my Tailscale IP address for my NAS. After that, I set up Nginx Proxy Manager to have a Proxy Host point to my Nextcloud app with a valid SSL certificate. I enabled all the options - “Force SSL”, “HTTP/2 Support”, “HSTS Enabled”, “HSTS Subdomains” on the Proxy Host as you can see below:

nextcloud_ssl_config

However, I’m still seeing those errors surrounding HTTPS and HSTS on Nextcloud:

The weird thing is - I’m still able to do certain things I couldn’t before when I was accessing just via HTTP. For example, WebAuthn. I was able to set up WebAuthn devices after setting up the reverse proxy which I wasn’t able to before, but I don’t know why these errors still persist. Can anyone help me out here?

Thanks!

Hi everyone.

I figured out the solution. I needed to add the following lines to my config.php file:

'overwrite.cli.url' => 'https://nextcloud.example.com', // Replace with the custom subdomain for your Nextcloud instance.
'overwriteprotocol' => 'https',
'trusted_proxies' => ['10.0.0.2'], // Replace with the IP address of the server hosting the proxy service.
'default_phone_region' => 'US', // Replace with your country code.

These made the errors and warnings go away!