New AIO Setup - Domain does not point to this server or the reverse proxy is not configured correctly

Support intro

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Not sure, haven't really gotten that far - latest as pulled by docker compose
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 26.04.1
  • Web server and version (e.g, Apache 2.4.25):
    • Unknown
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Caddy v2.11.7 h1:yj0Y4fYZGPkSvibBJ1sTWE33xC0fxztVyXEW5iIdUT4=
  • PHP version (e.g, 8.3):
    • Unknown
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Once I got a little ways into initial setup
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO Docker Compose
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Once I get to this page in the initial setup: https://127.0.0.1:8080/containers, and then click on submit domain with my domain in the field (cloud.mydomain.com) I get the error in the title:

Steps to replicate it (hint: details matter!):

  1. Go through setup and then see entry above

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

nextcloud-aio-mastercontainer  | NOTICE: PHP message: The response of the connection attempt to "https://cloud.mydomain.com:443" was: 
nextcloud-aio-mastercontainer  | NOTICE: PHP message: Expected was: 1896fb418082504fd8f749c663f2591b0e964a0479c64369
nextcloud-aio-mastercontainer  | NOTICE: PHP message: 
nextcloud-aio-mastercontainer  | NOTICE: PHP message: Please follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#how-to-debug in order to debug things!

NOTE: I changed my Caddyfile to match what is in that link for debugging and it still gives the same error:

https://cloud.mydomain.com:443`` {
reverse_proxy localhost:11000
}

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

caddy-1  | {"level":"error","ts":1791580595.3773334,"logger":"http.log.error","msg":"dial tcp [::1]:11000: connect: connection refused","request":{"remote_ip":"149.76.110.196","remote_port":"45952","client_ip":"149.76.110.196","proto":"HTTP/2.0","method":"GET","host":"cloud.mydomain.com","uri":"/","headers":{"User-Agent":["Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:157.0) Gecko/20100101 Firefox/157.0"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Dnt":["1"],"Sec-Gpc":["1"],"Sec-Fetch-Site":["none"],"Te":["trailers"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"],"Upgrade-Insecure-Requests":["1"],"Sec-Fetch-User":["?1"],"Sec-Fetch-Dest":["document"],"Sec-Fetch-Mode":["navigate"],"Accept-Language":["en-US,en;q=0.9"],"Priority":["u=0, i"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"cloud.mydomain.com","ech":false}},"duration":0.000391073,"status":502,"err_id":"q8vdck4qq","err_trace":"reverseproxy.statusError (reverseproxy.go:1695)"}

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

Command 'occ' not found, but there are 21 similar ones.

Apps

The output of occ app:list (if possible).

Other Info

My zone entry is

cloud.mydomain.com. 300 A X.X.X.X

I have another with this entry for another service that works:

immich.mydomain.com. 300 A X.X.X.X
This is my current Caddyfile:
{
# Email for Let's Encrypt notifications (expiration, etc.)
email myemail@email.com
}

Reusable configuration block for security headers

(securite) {
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
Referrer-Policy "strict-origin-when-cross-origin"
# Hide the server signature
-Server
}
}

immich.mydomain.com {
import securite
reverse_proxy x.x.x.x:2283
}

https://cloud.mydomain.com:443 {
reverse_proxy localhost:11000
}

This is the one I had before going to the troubleshooting page, it also gave the same error:

cloud.mydomain.com`` {
import securite
reverse_proxy 127.0.0.1:11000
}

Your Caddy log gives it away: dial tcp [::1]:11000: connect: connection refused. Caddy is running in its own container (caddy-1), so localhost there is the Caddy container itself, not the host where AIO publishes port 11000. Your Immich block works because it points at the host IP instead.

Easiest fix is to let Caddy reach the host. In Caddy’s compose service add:

extra_hosts:
  - "host.docker.internal:host-gateway"

and in the Caddyfile:

cloud.michellehm.com {
    import securite
    reverse_proxy host.docker.internal:11000
}

Then check the AIO mastercontainer has APACHE_PORT=11000 and that APACHE_IP_BINDING is either unset or 0.0.0.0. If it’s 127.0.0.1, the port only listens on the host’s loopback and the Caddy container still can’t reach it. Alternative: run Caddy with network_mode: host and keep localhost:11000.

Restart Caddy and hit “Submit domain” again. During that step AIO starts a small domaincheck container on 11000, so curl -I http://127.0.0.1:11000 from the host should answer while it’s running.

Thank you! I will try this out. I thought it was something like that, but don’t really know what I’m doing with docker very well. I attempted to create a network named web with:

docker network create web

and the put these in my compose.yml for both Caddy and Nextcloud - but it didn’t seem to get me anywhere:

services:
caddy:
networks:
- web

networks:
web:
external: true

Okay I think this got me a little closer, but something still doesn’t seem to be quite right :frowning:

I then enter cloud.mydomain.com into the field and select Submit Domain I get this error:

Domain does not point to this server or the reverse proxy is not configured correctly. See the mastercontainer logs for more details. ('sudo docker logs -f nextcloud-aio-mastercontainer')

and then this is what is in the docker logs:

Trying to fix docker.sock permissions internally...
Creating docker group internally with id 973
Initial startup of Nextcloud All-in-One complete!
You should be able to open the Nextcloud AIO Interface now on port 8080 of this server!
E.g. https://internal.ip.of.this.server:8080
⚠️ Important: do always use an ip-address if you access this port and not a domain as HSTS might block access to it later!

If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:

[  OK  ] php-fpm
[  OK  ] caddy-internal
[  OK  ] caddy-acme
[  OK  ] cron
[  OK  ] backup-time-file-watcher
[  OK  ] session-deduplicator
[  OK  ] domain-validator
[  OK  ] desec-ip-updater
[14-Oct-2026 17:56:08] NOTICE: fpm is running, pid 211
[14-Oct-2026 17:56:08] NOTICE: ready to handle connections
NOTICE: PHP message: The response of the connection attempt to "https://cloud.mydomain.com:443" was:
NOTICE: PHP message: Expected was: 1896fb418082504fd8f749c663f2591b0e964a0479c64369
NOTICE: PHP message:
NOTICE: PHP message: Please follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#how-to-debug in order to debug things!
Deleting duplicate sessions
NOTICE: PHP message: The response of the connection attempt to "https://cloud.mydomain.com:443" was:
NOTICE: PHP message: Expected was: 1896fb418082504fd8f749c663f2591b0e964a0479c64369
NOTICE: PHP message:
NOTICE: PHP message: Please follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#how-to-debug in order to debug things!

I have ports 80, 443, and 8443 port forwarded to the server in my router, and I have a CNAME record on the subdomain (and tracepath shows it coming in to my router) :thinking:

I also get this response from curl -I ``http://127.0.0.1:11000 afterwards:

HTTP/1.1 200 OK
Content-Type: text/html
ETag: "333085917"
Last-Modified: Wed, 14 Oct 2026 17:56:25 GMT
Content-Length: 49
Accept-Ranges: bytes
Date: Wed, 14 Oct 2026 19:50:24 GMT
Server: lighttpd/1.4.85

Can you see anything obvious that I’m overlooking at this point?

Thank you so much!

EDIT: Also, this is my current compose.yml for Nextcloud now that I’ve stripped out the external web connection:

services:
    nextcloud-aio-mastercontainer:
        image: nextcloud/all-in-one:latest
        container_name: nextcloud-aio-mastercontainer
        restart: always
        ports:
            - "8080:8080"
        environment:
            # Internal port on which AIO's Apache will listen (behind our proxy)
            APACHE_PORT: 11000
            APACHE_IP_BINDING: 0.0.0.0
            # Public domain served by the reverse proxy
            NC_DOMAIN: cloud.mydomain.com
        volumes:
            - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
            - /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
    nextcloud_aio_mastercontainer:
        name: nextcloud_aio_mastercontainer

I’ve also been trying to follow the debugging link ( all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub ) but so far I haven’t found whatever is causing my problem…

Ah ha! I hadn’t down an docker compose down/up -d on Nextcloud after, only on Caddy - doing the down/up on the Nextcloud container seems to have let me move forward (and now it’s the end of the day so I’ll pick this back up tomorrow!)