Can't install\launch Nextcloud AIO docker. Nginx + AdGuard + Cloudflared

Hello

I’m a new comer trying to install and run Nextcloud AIO for a while now.

My LMDE machine was already running some docker containers for some services as well as NginX Proxy Manager (NPM) and AdGuard Home (AGH).
My LAN is behind CGNAT so I’m bypassing this by using Cloudflared tunnels.

I’m keep getting stuck at the AIO interface trying to launch the website using my domain. It always says 502 bad gateway or 504 gateway error etc.

I am aware of a bug in Docker+NPM that won’t let read the hosts file and therefore it won’t find the correct mapping and some suggests just putting the internal IP of the nextcloud-aio-apache container, but this isn’t do anything (for me at least) . . .

I’m using Docker compose file and had to add the skip validation to get past the domain check…
I also had to connect the mastercontainer to my NPM network.

These are my current nextcloud containers status (some are unhealthy?)

mastercontainer logs:

nextcloud-aio-apache logs:
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Connection to nextcloud-aio-nextcloud (172.20.0.8) 9000 port [tcp/*] succeeded!
[Thu Apr 11 17:01:33.833898 2024] [mpm_event:notice] [pid 134:tid 139904924306184] AH00489: Apache/2.4.58 (Unix) configured -- resuming normal operations
[Thu Apr 11 17:01:33.834343 2024] [core:notice] [pid 134:tid 139904924306184] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
{"level":"info","ts":1712844093.836763,"msg":"using provided configuration","config_file":"/tmp/Caddyfile","config_adapter":""}

hi @RoyBarina welcome to the community :handshake:

there is special procedure to run aio behind reverse proxy - please take a look at the docs AiO reverse proxy some cloudflare caveates are mentioned as well:

  • Make sure that you are not behind CGNAT. If that is the case, you will not be able to open ports properly. In that case you might use a Cloudflare Tunnel.
  • If you use Cloudflare, you might need to skip the domain validation anyways since it is known that Cloudflare might block the validation attempts. In that case, see the last option below.

Hi wwe! thanks
I did followed the AIO behind a reverse proxy instructions and did saw the CGNAT + Cloudflare mentions
However I’m still unable to access nextcloud from within my LAN (it works fine from outside)
Maybe I did something wrong in my NPM or maybe it’s a cache problem…? I don;t think so…
I tried following a workaround mentioned in the Github issue to use dnsmasq but was unable to…

If everything works from the internet and you want to make internal shortcut to avoid all communications from internal users going to the internet you can use splitbraindns we had a very similar discussion short ago: Split DNS - Zugriff zuhause nicht über das Internet (in German!)

Thanks, harder to read like so lol… maybe I’ll let chatGPT translate it to me :S
I’ll keep you posted :slight_smile: