Access AIO on and LAN-internal IP address


I’m extending Caddy’s setup as reverse-proxy to allow (internal) access to AIO additionally by (local) IP addresses.

This Caddyfile works:


If I extend it to:

https://localhost:443,,   (LAN IP address)

and connecting to one of these two IP addresses, I get an error by Caddy that there is no certificate for “”.
That’s one of two mastercontainer-internal IP addresses.

When I further add “” to Caddyfile, then I can connect AIO on and (LAN IP address).

I don’t know exactly why the container-internal IP address has to be added to Caddyfile, which is not accessible neither on the local host, nor the LAN.

Is this related to “allowed clients” or “trusted proxies” or “overwrite …” settings of the AIO? (I haven’t used them yet so far)
Could please someone explain that? Thank you

Hi, see GitHub - nextcloud/all-in-one: The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

I’m sorry I don’t understand it.
Host-/domain names do work, so not a DNS issue.
The local IP addresses do not work, until I add the container-internal one to the reverse-proxy.
Could you please further point into right direction? Thank you

Edit: no cloudflare involved