[Apache container=Unhealthy] Nextcloud-AIO 30.0.1 with caddy (as sidecar) and Tailscale

[/details]

Nextcloud-AIO- version _(30.0.1)
Operating system and version _(eg, Ubuntu 24.04) (Docker-rootless)
Apache latest
PHP latest
All via docker-compose.yml

[The issue I am facing]
nextcloud-aio-apache container is showing unhealthy when docker ps . whereas all other containers are showing healthy. Though I can signin to my nextcloud instance. The error is related to Domain.

Is this the first time you’ve seen this error? YES

The output of your nextcloud-aio-apache container

$docker exec -it nextcloud-aio-apache bash -x /healthcheck.sh

nc -z nextcloud-aio-nextcloud 9000
Connection to nextcloud-aio-nextcloud (172.18.0.1) 9000 port [tcp/*] succeeded!
nc -z 127.0.0.1 8000
Connection to 127.0.0.1 8000 port [tcp/*] succeeded!
nc -z 127.0.0.1 11000
Connection to 127.0.0.1 11000 port [tcp/*] succeeded!
nc -z nextcloud.taiilscale.ts.net 443
nc: getaddrinfo for host "nextcloud.tailscale.ts.net" port 443: Name does not resolve
echo 'Could not reach nextcloud.tailscale.ts.net on port 443.'
Could not reach nextcloud.tailscale.ts.net on port 443.

The compose.yml file is

services:
nextcloud-aio-mastercontainer:
image: nextcloud/all-in-one:latest
init: true
restart: always
container_name: nextcloud-aio-mastercontainer # This line cannot be changed.
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- $XDG_RUNTIME_DIR/docker.sock:/var/run/docker.sock:ro # Running in docker-rootless
networks:
- nextcloud-aio
ports:
- 0.0.0.0:8080:8080
environment:
APACHE_PORT: 11000
APACHE_IP_BINDING: 127.0.0.1
SKIP_DOMAIN_VALIDATION: true
WATCHTOWER_DOCKER_SOCKET_PATH: $XDG_RUNTIME_DIR/docker.sock # For Docker-rootless

caddy:
image: caddy:alpine
restart: unless-stopped
environment:
- NC_DOMAIN=nextcloud.tailscale.ts.net
volumes:
- type: bind
source: ./Caddyfile
target: /etc/caddy/Caddyfile
- type: volume
source: caddy_certs
target: /certs
- type: volume
source: caddy_data
target: /data
- type: volume
source: caddy_config
target: /config
- type: volume
source: tailscale_sock
target: /var/run/tailscale/ # Mount the volume for /var/run/tailscale/tailscale.sock
read_only: true
network_mode: service:tailscale

tailscale:
image: tailscale/tailscale:latest
environment:
- TS_HOSTNAME=nextcloud
- TS_AUTH_KEY=tskey-client-abcdefghijkl-hijklmnopqrstuvwxyz # client secret key in full length
- TS_EXTRA_ARGS=--advertise-tags=tag:nextcloud
init: true
restart: unless-stopped
volumes:
- /dev/net/tun:/dev/net/tun
- type: volume
source: tailscale
target: /var/lib/tailscale
- type: volume
source: tailscale_sock
target: /tmp # Mounting the entire /tmp folder to access tailscale.sock
cap_add:
- NET_ADMIN
- NET_RAW
networks:
- nextcloud-aio

volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer # This line cannot be changed.
caddy_certs:
name: caddy_certs
caddy_data:
name: caddy_data
caddy_config:
name: caddy_config
tailscale:
name: tailscale
tailscale_sock:
name: tailscale_sock

networks:
nextcloud-aio:
name: nextcloud-aio
driver: bridge
enable_ipv6: false
driver_opts:
com.docker.network.driver.mtu: "9001" # Jumbo Frame
com.docker.network.bridge.host_binding_ipv4: "127.0.0.1" # Harden aio

NOTE: community help needed

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.