Nextcloud behind Argotunnel

Hi, first post here.

I’m running a homelab server running ESXi with a couple of VMs. FreeNAS, Home Assistant, Nextcloud (on FreeBSD 12) and a 4th VM (on Ubuntu 20.4) running a number of containerized apps. This last server runs the cloudflared daemon with ingress rules pointing to the origins. I also use Access with GitHub identity for extra measure.

It all works fine except for Nextcloud. I have a FQDN set-up for it.

I can access NC from my network and from the internet when not using Argotunnel (I set the DNS CNAME record to point to the domain, and create the port redirection rule on my router). But I cannot access it when going through Argotunnel (I change the DNS record to point to the tunnel and define an ingress rule).

I believe the reason has to do with Nextcloud php config not recognizing/accepting the request coming in from the Argotunnel. I get a 502 message.

Nextcloud is correctly configured with the FQDN as trusted host and it works as I can access from internet when not using Argotunnel.
I tried to add the IP of the machine running cloudflared to Nextcloud trusted proxy but no change.

Any help appreciated. Thanks

@luis5 Did you manage it? I’d like to know as well.

Sorry for the long delay. No I didn’t. NextCloud is great but for some reason I’m not able to get it to work behind reverse proxy and cloudflare. I just switched to OwnCloud which was easier to setup. I’m not sure but I guess NextCloud has higher levels of protection but these into the way of non-experts like me. I tried almost every tutorial and/or advice I came across in the forums but no luck.
Hope you’re luckier than me.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.