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.
Servizi Inclusi
pihole
pihole/pihole:latest
Variabili d'Ambiente:
YAML Generato
# 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
Informazioni Rapide
- Servizi
- 1
- Reti
- 1
- Volumi
- 2
Quando Usarlo
Questo template è ideale per configurare un ambiente pi-hole Tutti i servizi sono preconfigurati con healthchecks, limiti di risorse e valori predefiniti sensati. Personalizza le variabili d'ambiente prima di fare il deploy in produzione.
Consigli
- Cambia tutte le password predefinite prima del deploy
- Verifica i limiti di risorse per il tuo hardware
- Aggiungi un reverse proxy per HTTPS in produzione
- Configura strategie di backup per i volumi di dati