Pi-hole
Pi-hole is a network-wide ad blocker that acts as a DNS sinkhole, filtering out advertisements, trackers, and malicious domains for all devices on your network without requiring client-side software. It works by intercepting DNS queries and blocking requests to known advertising and tracking domains using regularly updated blocklists. This stack deploys Pi-hole with persistent storage for configuration, DNS records, and blocklist data. Pi-hole provides a comprehensive web dashboard showing DNS query statistics, top blocked domains, top clients, query logs, and real-time filtering status. It supports custom DNS records, local DNS for your network, DHCP server functionality, conditional forwarding, regex-based filtering, and group management for per-client blocking rules. After deployment, access the admin dashboard on port 80/admin using the configured web password. Point your router or devices DNS to Pi-hole to start blocking ads network-wide.
Enthaltene Services
pihole
pihole/pihole:latest
Umgebungsvariablen:
Generiertes YAML
# Generated by ComposeHub (composehub.dev)
name: pihole
services:
pihole:
image: pihole/pihole:latest
restart: always
ports:
- 53:53/tcp
- 53:53/udp
- 80:80
volumes:
- pihole_config:/etc/pihole
- pihole_dnsmasq:/etc/dnsmasq.d
environment:
TZ: ${TZ:-UTC}
WEBPASSWORD: ${WEBPASSWORD:-changeme}
PIHOLE_DNS_: ${PIHOLE_DNS:-8.8.8.8;8.8.4.4}
DNSMASQ_LISTENING: ${DNSMASQ_LISTENING:-local}
FTLCONF_LOCAL_IPV4: ${FTLCONF_LOCAL_IPV4:-127.0.0.1}
WEBTHEME: ${WEBTHEME:-default-auto}
REV_SERVER: ${REV_SERVER:-false}
REV_SERVER_DOMAIN: ${REV_SERVER_DOMAIN:-}
REV_SERVER_TARGET: ${REV_SERVER_TARGET:-}
REV_SERVER_CIDR: ${REV_SERVER_CIDR:-}
networks:
- pihole
healthcheck:
test:
- CMD-SHELL
- dig +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
deploy:
resources:
limits:
cpus: "1.00"
memory: 512M
reservations:
cpus: "0.10"
memory: 64M
labels:
com.composehub.description: Pi-hole DNS sinkhole and ad blocker
networks:
pihole:
driver: bridge
volumes:
pihole_config:
driver: local
pihole_dnsmasq:
driver: local
Kurzinfo
- Services
- 1
- Netzwerke
- 1
- Volumes
- 2
Wann verwenden
Dieses Template ist ideal für die Einrichtung einer pi-hole Umgebung. Alle Services sind mit Healthchecks, Ressourcenlimits und sinnvollen Standardwerten vorkonfiguriert. Passen Sie die Umgebungsvariablen an, bevor Sie in Produktion gehen.
Tipps
- Ändern Sie alle Standardpasswörter vor dem Deployment
- Überprüfen Sie die Ressourcenlimits für Ihre Hardware
- Fügen Sie einen Reverse Proxy für HTTPS in Produktion hinzu
- Konfigurieren Sie Backup-Strategien für Daten-Volumes