Issues with Caddy Reverse Proxy, NAT Loopback, and DNS Configuration for Nextcloud AIO Setup

Hi Tal,

Not sure if you had this sorted or not but take a look at NAT Hairpinning and how your internet facing connections (caddy 443) are NAT’d by the router.

NextCloud expects to be able to see its own IP as its externally resolved IP/DNS to pass things like domain checking and office server integrations.

If you don’t have this set up or set up correctly it can impact your installation. While domaincheck may work at one point office may never work, etc.

You want to make sure your NAT loopback is pointing to the caddy proxy for 443. That is both the connection for nextcloud and the internal caddy-proxied office traffic (if it’s being used). I’ve found my curl errors have gone away (policy routing was intercepting hairpin NAT on my firewall) once the hairpin for the nextcloud hust (not just the client network) was set up.

In my firewall port forwarding was required, not so bad as it limits the ports that can be used to connect to the system in addition to firewall rules.

Why you may need “Hairpin NAT” (NAT Reflection, NAT Loopback) for AIO/NC - :information_source: Support - Nextcloud community