Pi-hole will not start because port 53 is already in use
Symptoms
Section titled “Symptoms”You install Pi-hole from Deployrr and the container does not start. Docker reports that port 53 is taken:
Error response from daemon: driver failed programming external connectivity on endpoint pihole: failed to bind host port for 0.0.0.0:53:172.18.0.18:53/tcp: address already in useThe wording can differ a little between Docker versions. The part to look for is port 53 and “address already in use” or “port is already allocated”.
Pi-hole needs port 53 on your server for DNS. The Pi-hole compose file in compose/HOSTNAME/pihole.yml maps port 53 for both TCP and UDP:
ports: - "53:53/tcp" - "53:53/udp"On many Ubuntu and Debian systems, systemd-resolved already listens on port 53. Only one program can use a port at a time, so Docker cannot give it to Pi-hole.
Deployrr checks the Pi-hole web interface port (83 by default) and suggests the next free one if it is taken. It does not check port 53, so you only find out when Docker fails to start the container.
-
Open the systemd-resolved settings file:
Terminal window sudo nano /etc/systemd/resolved.conf -
Under the
[Resolve]heading, add or change this line:DNSStubListener=noIf the line starts with
#, remove the#. -
Save the file and close the editor.
-
Restart the service:
Terminal window sudo systemctl restart systemd-resolved -
Check that the server can still look up names:
Terminal window ping -c 2 example.comIf this fails with a name resolution error, point
/etc/resolv.confat the file that lists your real DNS servers, then try again:Terminal window sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf -
In Deployrr, go to Tools > Stack Manager > Delete. Stack Manager explains each Delete choice.
-
Pick Full.
-
Answer the live backup question. Press
Yto make one, or any other key to skip. -
At
Enter the number of the service to delete:, type the number next topihole. -
Press
Yto confirm. -
Install Pi-hole again: Apps > Browse Apps > Pi-hole.
Check it worked
Section titled “Check it worked”-
Check what is listening on port 53:
Terminal window sudo ss -lntup | grep ':53 'You should see Docker (
docker-proxy) or Pi-hole, notsystemd-resolve. -
Check that the container is running:
Terminal window sudo docker ps --filter name=piholeWith the Deployrr bash aliases:
dps. It lists all containers, so look for thepiholeline.The status should say
Up. -
Open the Pi-hole web interface. The address is shown at the end of the install. It looks like
http://SERVER_IP:83/admin/with the web port you chose.
If something other than systemd-resolved is on port 53, the ports and showlistening shortcuts on the bash aliases page can help you find it. Stop that program, or move it to another port (see Port already in use if it is one of your apps), then repeat steps 6 to 11.
Port 67 already in use
Section titled “Port 67 already in use”Pi-hole’s compose file also maps port 67/udp, the DHCP port, even if you never turn on Pi-hole’s DHCP server. If a DHCP server already runs on the host, Docker fails with the same “address already in use” error, but for port 67.
-
Find the program that holds port 67:
Terminal window sudo ss -lnup | grep ':67 'Common ones are
dnsmasq,dhcpd(isc-dhcp-server) andkea-dhcp4. -
If your network doesn’t need that DHCP server (your router hands out addresses), stop it and turn it off.
For example, for isc-dhcp-server:
Terminal window sudo systemctl disable --now isc-dhcp-server -
Install Pi-hole again as in steps 6 to 11 above.
If you need to keep that DHCP server, take port 67 out of Pi-hole’s compose file instead:
-
In your Docker folder, back up the file:
Terminal window cp compose/HOSTNAME/pihole.yml compose/HOSTNAME/pihole.yml.bak -
Open
compose/HOSTNAME/pihole.ymland put a#in front of the- "67:67/udp"line. -
Go to Tools > Stack Manager > Recreate and pick
pihole.
When you reinstall Pi-hole, Deployrr copies a fresh compose file, so you make this change again.
Use Pi-hole for DHCP
Section titled “Use Pi-hole for DHCP”Most setups don’t need this. Keep your router as the DHCP server and set the DNS server in its DHCP settings to your server’s LAN IP. Local DNS rewrites shows how.
Deployrr runs Pi-hole on a Docker network, not on your server’s own network. DHCP requests from your devices are broadcasts, and they don’t reach a container on a Docker network. So Pi-hole’s DHCP server does not hand out addresses in this setup, even though port 67 is mapped. Pi-hole’s own documentation lists what it needs instead: the NET_ADMIN capability (commented out in the compose file) and host networking or a DHCP relay. Deployrr doesn’t set this up for you.
Open the Pi-hole web interface
Section titled “Open the Pi-hole web interface”| From | Address |
|---|---|
| Your home network | http://SERVER_LAN_IP:PORT/admin/, with the web port you chose (83 by default) |
| Through Traefik | https://pihole.YOUR_DOMAIN/admin/, or the subdomain you entered at Traefik Subdomain (asked at install when Traefik runs) |
Keep /admin/ at the end. Pi-hole serves its web interface under that path. If the page doesn’t load through Traefik, see App shows 404 or 502.

