Skip to content

Instantly share code, notes, and snippets.

@fuzzywalrus
Created June 24, 2025 16:35
Show Gist options
  • Save fuzzywalrus/99cebedc511726017693f935eb977f3d to your computer and use it in GitHub Desktop.
Save fuzzywalrus/99cebedc511726017693f935eb977f3d to your computer and use it in GitHub Desktop.
# docker pi-hole
version: '3.8'
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
# DNS Ports (using alternative ports to avoid conflicts)
- "1053:53/tcp"
- "1053:53/udp"
# HTTP Port (using alternative port to avoid DSM conflict)
- "8080:80/tcp"
# HTTPS Port (using alternative port to avoid DSM conflict)
- "8443:443/tcp"
environment:
# Timezone
TZ: 'America/Los_Angeles'
# Web interface password from your original command
FTLCONF_webserver_api_password: 'MakeSureYouChangeThis'
# DNS upstreams (DNS servers you'd like to use)
FTLCONF_dns_upstreams: '1.1.1.1;1.0.0.1'
# DNS listening mode
FTLCONF_dns_listeningMode: 'all'
volumes:
# Volume mapping - using full NAS path
- '/volume1/docker/pihole:/etc/pihole'
dns:
# DNS settings from your original command
- 127.0.0.1
- 1.1.1.1
cap_add:
# Capabilities for network administration
- NET_ADMIN
restart: unless-stopped
docker run -d --name pihole \
-e TZ=America/Los_Angeles \
-e FTLCONF_webserver_api_password=MakeSureYouChangeThis \
-e FTLCONF_dns_upstreams='1.1.1.1;1.0.0.1' \
-e FTLCONF_dns_listeningMode=all \
-p 80:80 -p 53:53/tcp -p 53:53/udp -p 443:443 \
-v ~/pihole/:/etc/pihole/ \
--dns=127.0.0.1 --dns=1.1.1.1 \
--cap-add=NET_ADMIN \
--restart=unless-stopped \
pihole/pihole:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment