Summary of the issue you are facing:
I can connect to my nextcloud when Im on the same network as the raspberry pi thats running nextcloud , but I cannot connect from any other network. I am using tailscale in both cases and can ping the domain in both cases. Other containers that Im hosting on the same pi work from all networks as long as Im connected to tailscale
Steps to replicate it (hint: details matter!):
I followed this Tailscale (and Caddy as a sidecar) Reverse Proxy · nextcloud/all-in-one · Discussion #5439 · GitHub