Hi, I am trying to get Nextcloud AIO to work behind a reverse proxy (Caddy) and VPN (provided through Gluetun). I am unable to get any connectivity to the nextcloud container - I also believe I’ve followed the reverse proxy documentation, however I may have missed something.
# stacks/caddy/compose.yml
volumes:
caddy_data:
caddy_config:
services:
caddy:
network_mode: "service:gluetun"
image: caddy:latest
restart: unless-stopped
volumes:
- ./config:/etc/caddy
- caddy_data:/data
- caddy_config:/config
- ${SSL_FULLCHAIN}:/certs/fullchain.pem
- ${SSL_PRIVATE}:/certs/privkey.pem
# stacks/caddy/config/Caddyfile
music.MYDOMAIN.dev:VPNFORWARDEDPORT {
tls /certs/fullchain.pem /certs/privkey.pem
reverse_proxy localhost:4533
}
nc.MYDOMAIN.dev:VPNFORWARDEDPORT {
tls /certs/fullchain.pem /certs/privkey.pem
reverse_proxy localhost:11000
}
# stacks/nextcloud/compose.yml
services:
nextcloud-aio-mastercontainer:
image: ghcr.io/nextcloud-releases/all-in-one:latest
init: true
restart: always
container_name: nextcloud-aio-mastercontainer
network_mode: "service:gluetun"
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
APACHE_PORT: 11000
APACHE_IP_BINDING: 0.0.0.0
NEXTCLOUD_DATADIR: "/mass_storage/ncdata"
SKIP_DOMAIN_VALIDATION: true
volumes:
nextcloud_data:
name: nextcloud_data #dont change
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
In my docker-compose.yml in the base directory, I’m simply including the above compose files. When I up the stack, I can access the navidrome instance from my domain. Using nc in the gluetun container, I can access localhost:4533 but not localhost:11000.
I then tried disconnecting the services from gluetun and then tried the different steps in the reverse proxy docs to no avail.
It may also be relevant that I had to originally open 8080 on the nextcloud container to localhost (by disconnecting gluetun) so I could access the admin backend. The domain I typed was the same as my caddy file, minus the port. After this was completed, I downed the stack and then reconnected to gluetun.
I’m a bit unsure of how to continue from here - any help would be greatly appreciated!