Accessing Nexcloud server remotely through Argo Tunnel fails, succeeds on the network

So basically, as long as I’m on my home network, Nextcloud works exactly as expected using the Cloudflare Argo Tunnel CNAME record. ~It also seems to work over a VPN when before it wasn’t,~ (ETA this is not correct, I have limited accessibility of the login screen while on VPN but mobile device performance is showing to be inconsistent and will require more testing) and only seems to fail on cellular. Unfortunately these or the only conditions I can test in right now.

The 301 redirect works to the local address, then:

< HTTP/1.1 301 Moved Permanently
< Date: Sat, 28 Aug 2021 21:00:33 GMT
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: max-age=3600
< Expires: Sat, 28 Aug 2021 22:00:33 GMT
< Location:
< Server: cloudflare
< CF-RAY: xxxxxxxxxxxxxx

  • Ignoring the response-body
    { [5 bytes data]
  • Connection #0 to host xxxxxxxxx left intact
  • Issue another request to this URL: ‘
  • Trying…
  • Connection failed
  • connect to port 443 failed: Operation timed out
  • Failed to connect to port 443: Operation timed out
  • Closing connection 1
  • Closing connection 0

When I’m on the network I see:

  • Connection #0 to host xxxxxxx left intact
  • Issue another request to this URL: ‘
  • Trying…
  • Connected to ( port 443 (#1)
  • ALPN, offering h2
  • ALPN, offering http/1.1

So I don’t think this is a Cloudflare issue but something with my server configuration.

I tried digging into my Nextcloud logs a bit and the only message I saw that made any sense related to this was:

“Host was not connected to because it violates local access rules”

So I added

’allow_local_remote_servers’ => true,

But nothing has changed. Could this be something with my Apache config? I have to admit I’m more familiar with Nginx servers but not overly experienced with either.

I found this error in my Apache log:

[Sat Aug 28 21:17:57.354221 2021] [php7:error] [pid 6252] [client] PHP Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /var/www/sub.domain.tld/nextcloud/config/config.php on line 9

Is this incorrectly formatted?

array (
0 => ‘’,
1 => ‘sub.domain.tld’,

I also found a lot of errors related to Nexcloud permissions that I hope I’ve fixed now.

Any thoughts/guidance? Thank you!

I’m experiencing a similar issue as you, NC doesn’t work properly through Argo tunnel.
I did a quick search, and came back with this form post on cloudflare,

Maybe I understood your issue wrong, but disabling any speed optimizations from Cloudflare seemed to fix the issue for me.