How do I get jellyfin and nextcloud aio running with caddy as a reverse proxy all in separate containers? reddit / selfhosted ---------------------------------------------------------------------- ken_enlernen · 2023-11-11 13:43 I'm a novice and I managed easily enough to get a simple jellyfin container running and then a simple caddy container reverse proxying to jellyfin. I created a network called "jellyfin" and ensured that both had that network defined in their respective compose files - here's the caddy one: version: "3.8" services: caddy: image: caddy:alpine restart: always container_name: caddy volumes: - ./Caddyfile:/etc/caddy/Caddyfile - ./certs:/certs - ./config:/config - ./data:/data - ./sites:/srv ports: - 80:80 - 443:443 networks: - jellyfin networks: jellyfin: external: true and then I have this Caddyfile: jellyfin.example.com:443 { reverse_proxy jellyfin:8096 } Now I want to add nextcloud aio behind the reverse proxy but it just makes everything impossibly confusing. I'm supposed to change caddy to have `network_mode: "host"` but that breaks my jellyfin compose file because it clashes with the ports I mapped. I can also add `extra_hosts: ["host.docker.internal:host-gateway"]` but I don't know what that does, it also breaks my jellyfin configuration. I would try to just add nextcloud aio to the same network but there's no explanation for that in the commented lines of the example file: https://github.com/nextcloud/all-in-one/blob/main/compose.yaml I basically want this below but split into separate compose files in a way that also works with jellyfin and anything else I might add, how can I do that? version: "3.8" services: caddy: image: caddy:alpine restart: unless-stopped container_name: caddy volumes: - ./Caddyfile:/etc/caddy/Caddyfile - ./certs:/certs - ./config:/config - ./data:/data - ./sites:/srv network_mode: "host" nextcloud: image: nextcloud/all-in-one:latest restart: unless-stopped container_name: nextcloud-aio-mastercontainer ports: - "8080:8080" environment: - APACHE_PORT=11000 volumes: - nextcloud_aio_mastercontainer:/mnt/docker-aio-config - /var/run/docker.sock:/var/run/docker.sock:ro depends_on: - caddy volumes: nextcloud_aio_mastercontainer: name: nextcloud_aio_mastercontainer ---------------------------------------------------------------------- arcaneasada_romm · 2023-11-11 14:48 Remove `network_mode: "host"` and add nextcloud to the same network that jellyfin is on (or create a new network and give caddy access to both) ---------------------------------------------------------------------- ProbablePenguin · 2023-11-11 16:44 Put nextcloud in its own compose project and add the same caddy network to it. You won't need to change your existing caddy project at all. ---------------------------------------------------------------------- ken_enlernen · 2023-11-11 23:47 I've tried that but according to [this](https://github.com/nextcloud/all-in-one/blob/main/reverse- proxy.md#adaptation-of-the-respective-sample-configuration) there is a certain way to configure separate containers but none of the methods work. After opening AIO on nextcloud.example.com:8080 and going through the setup I get an error when I try to enter my domain: > 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 the logs: NOTICE: PHP message: The response of the connection attempt to "https://documents.harbour.cloud:443" was: NOTICE: PHP message: Expected was: 800fb3b55e752b830ff030d7f2a212643ccc9a6344fc44c5 NOTICE: PHP message: The error message was: NOTICE: PHP message: The response of the connection attempt to "https://documents.harbour.cloud:443" was: NOTICE: PHP message: Expected was: 800fb3b55e752b830ff030d7f2a212643ccc9a6344fc44c5 NOTICE: PHP message: The error message was: ---------------------------------------------------------------------- KyroPaul · 2023-11-17 18:24 this is probably your problem I have Caddy running a couple different containers on seperate stacks. As long as they all share a "caddy network" that should work. I think my config has http://... I don't know if you need network\_mode:host (is that for cluster or HA setup?) ​ i.e. jellyfin.example.com:443 { reverse\_proxy http://jellyfin:8096 }