Docker AIO Windows - connection refused

Dear community,

I am trying to setup NextCloud AIO on my PC running Windows 10 Pro using docker. I would like to test synching contacts/calendars with my phone using DAVx5 - that’s the goal.

As I do not have a domain, and no SSL cert etc, as I’ll use NC only internally in my home network (Windows PC and Android phone), I am trying to setup up compose by following these:

official NC AIO docs:

https://github.com/nextcloud/all-in-one/tree/main
https://github.com/nextcloud/all-in-one/blob/main/local-instance.md
https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md

a guide on using caddy as reverse proxy:

(please read this, as it’s the key to the localhost setup I am using)

Following the above links, this is my actual setup:

compose.yaml:

volumes: 
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer
services:
  nextcloud-aio-mastercontainer:
    image: nextcloud/all-in-one:latest
    init: true
    restart: always
    container_name: nextcloud-aio-mastercontainer
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - //var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 8080:8080
    environment:
      - SKIP_DOMAIN_VALIDATION=true
      - APACHE_PORT=11000
      - APACHE_IP_BINDING=127.0.0.1
  caddy:
    image: caddy:alpine
    restart: always
    volumes:
        - ./Caddyfile:/etc/caddy/Caddyfile
    network_mode: "host"

Caddyfile:

local.docs {
	tls internal
	reverse_proxy localhost:{$APACHE_PORT}
}

command line:

docker compose up --build

This setup basically makes NC accessibly through the domain “local.docs”, inkl. SSL, as during setup, I have to speficy a hostname for NC as you know.
(My PCs IP address is 10.0.0.7)

These all work to access setup, I’ll be using “local.docs”:
https://local.docs:8080
https://localhost:8080
https://10.0.0.7:8080

Opening https://local.docs:8080 I can start setting up NC in the browser.
I set the NC name to “local.docs” (check is skipped in compose),
then I can proceed, I choose NC version 28, deselect any extensions,
start the containers.

Everything ok so far.

As soon as all containers are running, I should be able to open NC with https://local.docs.
But I get this:

ERR_CONNECTION_REFUSED

Trying to check the situation…

> docker ps (shortened output)
nextcloud/all-in-one:latest		80/tcp, 8443/tcp, 9000/tcp, 0.0.0.0:8080->8080/tcp   nextcloud-aio-mastercontainer
> netstat -a -n (shortened output)
TCP    0.0.0.0:8080    0.0.0.0:0    listening

netstat doesn’t show any open/listening ports on 443/8443. I assume that’s the reason, why I cannot access the actual NC by https, but access on port 8080 works.

I’ve gone through the links mentioned on top several times, I’ve searched the internet, spent several nights desperately finding a solution, why the connection is refused.

I assume I have missed something with docker’s own networking, IP addresses, hosts, ports.
I’m actually lost, desperately.
Any help is very much appreciated. Thank you very much.

I was now able to finally setup and connect to my very first NC AIO installation :partying_face:
Took some time, reading the docs and retrying over and over again, as I’m new to NC and docker (and caddy), it’s a matter of details, but I learned a lot.
Thank you for your kind assistance (in the other threads), very much appreciated :heavy_heart_exclamation: best regards!

1 Like

It would be great if you could share your solution. I’m getting a “connection refused” too after updating my docker container to v28…

Hi @Manuxi

sorry for answering you so late. Hopefully you already found a solution by now :slight_smile:

If I understand correctly, you’re upgrading from an existing installation, that previously was working. I’ve made a new installation from scratch, so I’m not sure I can help you sorry. It’d probably the best if you create a new thread where you can share your setup for others to check and help you…

Best regards