How to Configure Caddy External

I’ve got this as my docker-compose.yml file:

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:
      APACHE_PORT: 11000
      APACHE_IP_BINDING: 127.0.0.1
      NEXTCLOUD_MOUNT: /mnt/
      NEXTCLOUD_MEMORY_LIMIT: 1024M

volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer

I set my Caddyfile (which is running on the machine, not as a container… to reverse_proxy my domain.com:443 to localhost:11000, but this doesn’t allow me to access the site. I get this error from Caddy logs:

May 20 12:20:09 blackbox caddy[665]: {"level":"error","ts":1716225609.3699536,"logger":"http.log.error","msg":"read tcp [::1]:42564->[::1]:11000: read: connection reset by peer","request">

I also tried to expose port - 11000:11000 and point the reverse_proxy there, but that doesn’t work either. How can I get this configured?

Hi, can you follow all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub?

This is the solution I have followed, and I’ve configured both my Caddy server and the docker-compose file according to it’s instructions. The issue remains.

Have you already done step 4?

Yes, as I originally stated I made sure the reverse proxy matched the APACHE_PORT env variable. I also exposed that port but it did not fix the issue.

So what happens if you type in your domain in the aio interface on port 8080?

Firefox refuses to navigate to it since the certificate is self-signed.

Yeah, you need to use https://ip.address.of.server:8080 and acvcept the self-signed certificate

1 Like