Nextcloud 'Error occurred whilst checking server setup' behind Nginx Proxy Manager with HTTPS

Nextcloud worked perfectly… Until I tought I made it secure :man_facepalming: (NPM + HTTPS = Health check fail)

I’ve been stuck on this for a while and spent about 5 hours troubleshooting this afternoon. Could use a fresh pair of eyes.

The issue:
When I didn’t have Nginx Proxy Manager setup yet I was using the webinterface via the internal IP and port. Everything was fine. Under /settings/admin/overview I was able to see that Security & setup warnings told be there where several things I still needed to fix in order to make it run smoothly. Things like https and a maintanance schedule, etc. So, this was on my todo list, I installed NPM. Got it working with Let’s encrypt and setup a few domains I could use. One of them https://nextcloud.mydomain.com. Still worked fine, https worked from outside and all seemed well. Other domains also worked.

Now I went to see /settings/admin/overview again and it didn’t run the check, well it did, for about a minute and then fails. “Error occurred whilst checking server setup”.

I cannot reach the local IP anymore, as it forces the external domain. Which is fine. If I remove the `overwrite.cli.url, overwritehost, overwriteprotocol’ from my config.php that does not happen and I can reach Nextcloud via de internal IP. Checking then succeeds and I see all things that are currently not yet in order. Via https/domain it fails to test.

I think it has something to do with the fact that I am working in the webinterface via NPM. I just don’t know what to check or setup. Perhaps something under ‘advanced settings’ in NPM?

Extra info:
From inside the Nextcloud container:

root@*************:/var/www/html# curl -I https://nextcloud.mydomain.com
curl: (28) Failed to connect to nextcloud.mydomain.com port 443 after 134408 ms: Couldn't connect to server

curl -I 1.1.1.1 does work.

Situation:
ElectricEel-24.10.2.1
Nextcloud Hub 10 (31.0.4) (via Applications)
Nginx Proxy Manager v2.12.3 (via Applications)

Internal IP http://192.168.202.101:30037
External address: https://nextcloud.mydomain.com

NPM Settings:
Forwarded to intern IP and port
Websockets Support
Block Common Exploits
Force SSL
HTTP/2 Support
HSTS Enabled

No custom locations or advanced settings.

Nextcloud config.php

  ),

  'overwrite.cli.url' => 'https://nextcloud.mydomain.com',
  'overwritehost' => 'nextcloud.mydomain.com',
  'overwriteprotocol' => 'https',
  'htaccess.RewriteBase' => '/',
  'trusted_proxies' => 
  array (
    0 => '127.0.0.1',
    1 => '192.168.202.101',
  ),

&

  ),
  'trusted_domains' => 
  array (
    0 => '127.0.0.1',
    1 => '192.168.202.101',
    2 => 'localhost',
    3 => 'nextcloud',
    4 => 'nextcloud.mydomain.com', 
  ),

TrueNAS Scale settings
Nextcloud is installed via Applications and has been running fine. I can sync to local PC’s and my iPhone.