Pihole in docker stops

I have a secondary Pi-hole, running Debian (Trixie) for redundancy. After a week of running with no issues something dies. I can not do any DNS queries or run ping 8.8.8.8

My docker compose is

services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "8095:80/tcp"
- "4443:443/tcp"
environment:
TZ: 'America/Eastern'
FTLCONF_webserver_api_password: 'xxxxx'
FTLCONF_dns_listeningMode: 'ALL'
volumes:
- '/opt/pihole/etc/pihole/:/etc/pihole'
- '/opt/pihole/etc/dnsmasq.d/:/etc/dnsmasq.d'
cap_add:
- NET_ADMIN
- SYS_TIME
- SYS_NICE
restart: unless-stopped

/var/log/syslog

 dockerd[1278]: time="2026-10-14T20:36:25.976115962-04:00" level=warning msg="[resolver] connect failed" error="dial udp 192.168.1.20:53: connect: resource temporarily unavailable"

Debug Token:

https://tricorder.pi-hole.net/5RJikTWF/

Thanks for the help. Next failure I'll look at the host and see what's wrong.

I ran docker events and I'm seeing the container dying and restarting every 30 seconds.

2026-10-19T11:46:38.507324328-04:00 container exec_create: /bin/sh -c dig -p $(pihole-FTL --config dns.port) +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1 9a7b6f279dfbda9c9c73a5b2a6f93f319acfaf2e0c14ac89e49facf325c9a1e0 (com.docker.compose.config-hash=118330b5101addf4b2a825d7635ad50a2eaac4052befe437e2469f31bcd2328a, com.docker.compose.container-number=1, com.docker.compose.depends_on=, com.docker.compose.image=sha256:27b410ff85b3449158c1ed568b4078c6037463952ad9939b673b28ba13bd9aa7, com.docker.compose.oneoff=False, com.docker.compose.project=share, com.docker.compose.project.config_files=/home/share/pihole.yaml, com.docker.compose.project.working_dir=/home/share, com.docker.compose.service=pihole, com.docker.compose.version=2.26.1, execID=56a6e08a12c608acfd526474107be6092dc379de68d350da097225953122fff2, image=pihole/pihole:latest, name=pihole, org.opencontainers.image.created=2026-07-07T09:15:43.148Z, org.opencontainers.image.description=The official Pi-hole Docker image from pi-hole.net, org.opencontainers.image.licenses=NOASSERTION, org.opencontainers.image.revision=dd91b4847d97f0aac68bfefd1c108ed0627e6c68, org.opencontainers.image.source=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.title=docker-pi-hole, org.opencontainers.image.url=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.version=2026.07.2)
2026-10-19T11:46:38.507413497-04:00 container exec_start: /bin/sh -c dig -p $(pihole-FTL --config dns.port) +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1 9a7b6f279dfbda9c9c73a5b2a6f93f319acfaf2e0c14ac89e49facf325c9a1e0 (com.docker.compose.config-hash=118330b5101addf4b2a825d7635ad50a2eaac4052befe437e2469f31bcd2328a, com.docker.compose.container-number=1, com.docker.compose.depends_on=, com.docker.compose.image=sha256:27b410ff85b3449158c1ed568b4078c6037463952ad9939b673b28ba13bd9aa7, com.docker.compose.oneoff=False, com.docker.compose.project=share, com.docker.compose.project.config_files=/home/share/pihole.yaml, com.docker.compose.project.working_dir=/home/share, com.docker.compose.service=pihole, com.docker.compose.version=2.26.1, execID=56a6e08a12c608acfd526474107be6092dc379de68d350da097225953122fff2, image=pihole/pihole:latest, name=pihole, org.opencontainers.image.created=2026-07-07T09:15:43.148Z, org.opencontainers.image.description=The official Pi-hole Docker image from pi-hole.net, org.opencontainers.image.licenses=NOASSERTION, org.opencontainers.image.revision=dd91b4847d97f0aac68bfefd1c108ed0627e6c68, org.opencontainers.image.source=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.title=docker-pi-hole, org.opencontainers.image.url=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.version=2026.07.2)
2026-10-19T11:46:38.759674536-04:00 container exec_die 9a7b6f279dfbda9c9c73a5b2a6f93f319acfaf2e0c14ac89e49facf325c9a1e0 (com.docker.compose.config-hash=118330b5101addf4b2a825d7635ad50a2eaac4052befe437e2469f31bcd2328a, com.docker.compose.container-number=1, com.docker.compose.depends_on=, com.docker.compose.image=sha256:27b410ff85b3449158c1ed568b4078c6037463952ad9939b673b28ba13bd9aa7, com.docker.compose.oneoff=False, com.docker.compose.project=share, com.docker.compose.project.config_files=/home/share/pihole.yaml, com.docker.compose.project.working_dir=/home/share, com.docker.compose.service=pihole, com.docker.compose.version=2.26.1, execID=56a6e08a12c608acfd526474107be6092dc379de68d350da097225953122fff2, exitCode=0, image=pihole/pihole:latest, name=pihole, org.opencontainers.image.created=2026-07-07T09:15:43.148Z, org.opencontainers.image.description=The official Pi-hole Docker image from pi-hole.net, org.opencontainers.image.licenses=NOASSERTION, org.opencontainers.image.revision=dd91b4847d97f0aac68bfefd1c108ed0627e6c68, org.opencontainers.image.source=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.title=docker-pi-hole, org.opencontainers.image.url=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.version=2026.07.2)
2026-10-19T11:47:08.760609668-04:00 container exec_create: /bin/sh -c dig -p $(pihole-FTL --config dns.port) +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1 9a7b6f279dfbda9c9c73a5b2a6f93f319acfaf2e0c14ac89e49facf325c9a1e0 (com.docker.compose.config-hash=118330b5101addf4b2a825d7635ad50a2eaac4052befe437e2469f31bcd2328a, com.docker.compose.container-number=1, com.docker.compose.depends_on=, com.docker.compose.image=sha256:27b410ff85b3449158c1ed568b4078c6037463952ad9939b673b28ba13bd9aa7, com.docker.compose.oneoff=False, com.docker.compose.project=share, com.docker.compose.project.config_files=/home/share/pihole.yaml, com.docker.compose.project.working_dir=/home/share, com.docker.compose.service=pihole, com.docker.compose.version=2.26.1, execID=e7f48a75d8be98ff708926298ac65a1ef0f2626de4102cf04a0583ab16ae0bb6, image=pihole/pihole:latest, name=pihole, org.opencontainers.image.created=2026-07-07T09:15:43.148Z, org.opencontainers.image.description=The official Pi-hole Docker image from pi-hole.net, org.opencontainers.image.licenses=NOASSERTION, org.opencontainers.image.revision=dd91b4847d97f0aac68bfefd1c108ed0627e6c68, org.opencontainers.image.source=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.title=docker-pi-hole, org.opencontainers.image.url=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.version=2026.07.2)
2026-10-19T11:47:08.760714828-04:00 container exec_start: /bin/sh -c dig -p $(pihole-FTL --config dns.port) +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1 9a7b6f279dfbda9c9c73a5b2a6f93f319acfaf2e0c14ac89e49facf325c9a1e0 (com.docker.compose.config-hash=118330b5101addf4b2a825d7635ad50a2eaac4052befe437e2469f31bcd2328a, com.docker.compose.container-number=1, com.docker.compose.depends_on=, com.docker.compose.image=sha256:27b410ff85b3449158c1ed568b4078c6037463952ad9939b673b28ba13bd9aa7, com.docker.compose.oneoff=False, com.docker.compose.project=share, com.docker.compose.project.config_files=/home/share/pihole.yaml, com.docker.compose.project.working_dir=/home/share, com.docker.compose.service=pihole, com.docker.compose.version=2.26.1, execID=e7f48a75d8be98ff708926298ac65a1ef0f2626de4102cf04a0583ab16ae0bb6, image=pihole/pihole:latest, name=pihole, org.opencontainers.image.created=2026-07-07T09:15:43.148Z, org.opencontainers.image.description=The official Pi-hole Docker image from pi-hole.net, org.opencontainers.image.licenses=NOASSERTION, org.opencontainers.image.revision=dd91b4847d97f0aac68bfefd1c108ed0627e6c68, org.opencontainers.image.source=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.title=docker-pi-hole, org.opencontainers.image.url=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.version=2026.07.2)
2026-10-19T11:47:08.992749767-04:00 container exec_die 9a7b6f279dfbda9c9c73a5b2a6f93f319acfaf2e0c14ac89e49facf325c9a1e0 (com.docker.compose.config-hash=118330b5101addf4b2a825d7635ad50a2eaac4052befe437e2469f31bcd2328a, com.docker.compose.container-number=1, com.docker.compose.depends_on=, com.docker.compose.image=sha256:27b410ff85b3449158c1ed568b4078c6037463952ad9939b673b28ba13bd9aa7, com.docker.compose.oneoff=False, com.docker.compose.project=share, com.docker.compose.project.config_files=/home/share/pihole.yaml, com.docker.compose.project.working_dir=/home/share, com.docker.compose.service=pihole, com.docker.compose.version=2.26.1, execID=e7f48a75d8be98ff708926298ac65a1ef0f2626de4102cf04a0583ab16ae0bb6, exitCode=0, image=pihole/pihole:latest, name=pihole, org.opencontainers.image.created=2026-07-07T09:15:43.148Z, org.opencontainers.image.description=The official Pi-hole Docker image from pi-hole.net, org.opencontainers.image.licenses=NOASSERTION, org.opencontainers.image.revision=dd91b4847d97f0aac68bfefd1c108ed0627e6c68, org.opencontainers.image.source=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.title=docker-pi-hole, org.opencontainers.image.url=https://github.com/pi-hole/docker-pi-hole, org.opencontainers.image.version=2026.07.2)

The events you posted are exec_create/exec_start of the image's healthcheck (the dig ... pi.hole command), which Docker runs every 30 seconds. They do not mean the container restarts. A restart shows up as die followed by start:

docker events --filter container=pihole --filter event=die

Your image is 2026.07.2 from July, please update to 2026.10.0 first. If it stops again, check docker inspect pihole --format '{{.State.Health.Status}} {{.RestartCount}}' and upload a new debug log before restarting it.

Thanks for the clarification. Updated to latest Pi-hole. Hoping the latest version fixes my issue.

DNS queries are extremely slow

$ host google.com
;; communications error to 192.168.1.20#53: timed out
;; communications error to 192.168.1.20#53: timed out
google.com has address 142.250.65.78
;; communications error to 192.168.1.20#53: timed out
;; communications error to 192.168.1.20#53: timed out
google.com has IPv6 address 2607:f8b0:4006:80e::200e
;; communications error to 192.168.1.20#53: timed out
;; communications error to 192.168.1.20#53: timed out
google.com mail is handled by 10 smtp.google.com.
;; communications error to 192.168.1.20#53: timed out
;; communications error to 192.168.1.20#53: timed out
google.com has HTTP service bindings 1 . alpn="h2,h3"

takes about 30 seconds to run, but host google.com 127.0.0.1 runs immediately

$ docker inspect pihole --format '{{.State.Health.Status}} {{.RestartCount}}'
healthy 0

https://tricorder.pi-hole.net/SRliq9nl/

This is what should be showing as a warning on the admin interface:

*** [ DIAGNOSING ]: Pi-hole diagnosis messages
   count     last timestamp             type                                    message                                    blob1                 blob2                 blob3                 blob4                 blob5
   ------  -------------------  --------------------  ------------------------------------------------------------  --------------------  --------------------  --------------------  --------------------  --------------------
        1  2026-10-20 13:19:18  DNSMASQ_WARN          ignoring query from non-local network 192.168.1.20
   
        1  2026-10-19 17:43:11  DNSMASQ_WARN          ignoring query from non-local network 192.168.1.20 (logged
                                                      only once)

What is at 192.168.1.20? I don't see that address set anywhere in the debug log or in your yaml configuration.

Edit: The listening mode is not set to allow queries from clients not on the same docker network bridge.

     listeningMode = "LOCAL"

192.168.1.20 is the host running the container.

Your compose file sets FTLCONF_dns_listeningMode: 'ALL', but the debug log shows LOCAL, so that variable never reached the container. Your docker events show the project actually runs from /home/share/pihole.yaml, please check that this file contains it. A query from the host to its own LAN address arrives with 192.168.1.20 as source, which is not on the container's bridge network, so LOCAL drops it.

After adding it, recreate the container with docker compose -f /home/share/pihole.yaml up -d. A plain restart keeps the old environment.

https://tricorder.pi-hole.net/muRjzX5z/

$ docker inspect pihole --format '{{.State.Health.Status}} {{.RestartCount}}'
healthy 0

From the host I can not ping anything on the LAN

$ ping 192.168.1.1
ping: connect: Resource temporarily unavailable

Inside the container I can ping, but DNS queries fail.

521fa04a33e1:/# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes

521fa04a33e1:/# host google.com
Host google.com not found: 2(SERVFAIL)

Please check your network settings, connections and firewall rules.

Pinging an IP doesn't involve Pi-hole or any other DNS server.