# pi-hole/docker-pi-hole

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/pi-hole-docker-pi-hole).**

10,760 stars · 1,228 forks · Shell · other

## Links

- GitHub: https://github.com/pi-hole/docker-pi-hole
- Homepage: https://pi-hole.net
- awesome-repositories: https://awesome-repositories.com/repository/pi-hole-docker-pi-hole.md

## Topics

`ad-blocker` `dns` `docker-container` `pi-hole` `web-app`

## Description

This project provides a containerized DNS sinkhole and network-wide traffic filtering solution. It functions as a central network resolver that intercepts domain queries, allowing users to block advertisements, trackers, and malicious domains by returning null responses to connected devices.

The platform distinguishes itself through its integrated DHCP server and comprehensive management capabilities, which allow for automated IP address allocation and granular control over network traffic. It supports complex filtering through regular expression matching, hierarchical rule prioritization, and the ability to group clients for custom policy enforcement. Users can monitor network activity in real time via a web-based dashboard or programmatic API, while persistent storage ensures that configurations, logs, and blocklists remain intact across container restarts.

Beyond core filtering, the project includes extensive tools for DNS performance optimization, including query caching, recursive resolution, and upstream server configuration. It also incorporates security features such as DNSSEC validation, encrypted DNS routing, and administrative access controls to protect network integrity.

The software is distributed as a portable container image, with configuration managed primarily through environment variables and persistent volume mapping for state preservation.

## Tags

### Security & Cryptography

- [DNS Sinkholes](https://awesome-repositories.com/f/security-cryptography/network-infrastructure-security/web-network-security/network-security-tools/dns-sinkholes.md) — Intercepts domain queries and returns null responses to block unwanted traffic as a central network sinkhole. ([source](https://docs.pi-hole.net/ftldns/))
- [Network Ad Blockers](https://awesome-repositories.com/f/security-cryptography/network-infrastructure-security/web-network-security/network-security-tools/network-ad-blockers.md) — Intercepts and filters DNS queries network-wide to block advertisements and trackers for all connected devices.
- [Domain Blocklists](https://awesome-repositories.com/f/security-cryptography/domain-blocklists.md) — Maintains comprehensive domain blocklists to prevent access to advertisements, trackers, and malicious sites. ([source](https://docs.pi-hole.net/ftldns/configfile/))
- [Network Traffic Filters](https://awesome-repositories.com/f/security-cryptography/network-traffic-filters.md) — Intercepts DNS queries for known ad and tracker domains and returns a null response to prevent content from loading. ([source](https://docs.pi-hole.net/))
- [Encrypted DNS Resolvers](https://awesome-repositories.com/f/security-cryptography/encrypted-dns-resolvers.md) — Forwards DNS resolution requests through encrypted tunnels to remote providers. ([source](https://docs.pi-hole.net/guides/dns/cloudflared/))
- [External Filter List Integrations](https://awesome-repositories.com/f/security-cryptography/application-and-system-security/browser-security/content-filtering-blocking/content-filtering/external-filter-list-integrations.md) — Automatically fetches and maintains collections of domains from remote sources to keep filtering rules updated against evolving threats. ([source](https://docs.pi-hole.net/database/domain-database/))
- [DNS Validation Tools](https://awesome-repositories.com/f/security-cryptography/dns-validation-tools.md) — Validates cryptographic signatures for DNS records to ensure data integrity. ([source](https://docs.pi-hole.net/guides/dns/unbound/))
- [Administrative Access Controls](https://awesome-repositories.com/f/security-cryptography/api-access-security/administrative-access-controls.md) — Provides password-protected administrative access to the web interface and API services. ([source](https://docs.pi-hole.net/main/pihole-command/))
- [Content Filtering APIs](https://awesome-repositories.com/f/security-cryptography/content-filtering-apis.md) — Enables programmatic toggling of network-wide content filtering states via API requests. ([source](https://docs.pi-hole.net/guides/misc/homeassistant/))
- [Encrypted Traffic Blockers](https://awesome-repositories.com/f/security-cryptography/dns-filtering/encrypted-traffic-blockers.md) — Rejects HTTPS and QUIC traffic at the network level to prevent advertisement assets from bypassing standard DNS filtering. ([source](https://docs.pi-hole.net/guides/vpn/openvpn/firewall/))
- [DNS Filtering Solutions](https://awesome-repositories.com/f/security-cryptography/network-infrastructure-security/web-network-security/network-security-tools/dns-filtering-solutions.md) — Reloads gravity databases and recompiles regular expression filters to apply blocking changes without flushing the active DNS cache. ([source](https://docs.pi-hole.net/ftldns/signals/))
- [Secure Remote Access](https://awesome-repositories.com/f/security-cryptography/secure-remote-access.md) — Supports secure remote DNS access by routing queries through encrypted tunnels or VPN connections.
- [API Access Security](https://awesome-repositories.com/f/security-cryptography/api-access-security.md) — Authenticates API requests using session identifiers and supports two-factor authentication. ([source](https://docs.pi-hole.net/api/auth/))
- [DNS Security](https://awesome-repositories.com/f/security-cryptography/dns-security.md) — Validates DNS responses using cryptographic signatures to ensure data integrity. ([source](https://docs.pi-hole.net/ftldns/configfile/))
- [Network Access Controls](https://awesome-repositories.com/f/security-cryptography/network-infrastructure-security/web-network-security/network-security/network-routing-access-control/network-access-controls.md) — Configures firewall rules to isolate services and secure administrative access. ([source](https://docs.pi-hole.net/guides/vpn/openvpn/firewall/))
- [Path-Based Access Rules](https://awesome-repositories.com/f/security-cryptography/network-infrastructure-security/web-network-security/network-security/network-routing-access-control/network-access-controls/path-based-access-rules.md) — Identifies network devices by IP or CIDR range to apply specific filtering policies. ([source](https://docs.pi-hole.net/database/domain-database/))
- [Privacy Configuration](https://awesome-repositories.com/f/security-cryptography/privacy-configuration.md) — Configures the level of detail stored for DNS queries to balance network statistics with user privacy. ([source](https://docs.pi-hole.net/ftldns/privacylevels/))
- [Remote Access Security](https://awesome-repositories.com/f/security-cryptography/remote-access-security.md) — Establishes VPN connections to route traffic and DNS queries securely. ([source](https://docs.pi-hole.net/guides/vpn/openvpn/))

### Networking & Communication

- [DHCP Servers](https://awesome-repositories.com/f/networking-communication/dhcp-servers.md) — Provides an integrated DHCP server for automatic IP address allocation and network configuration for connected devices. ([source](https://docs.pi-hole.net/ftldns/configfile/))
- [DNS Distribution Services](https://awesome-repositories.com/f/networking-communication/dhcp-servers/dns-distribution-services.md) — Configures network clients to use the sinkhole automatically by pushing DNS settings through DHCP. ([source](https://docs.pi-hole.net/routers/fritzbox-de/))
- [DNS Configuration](https://awesome-repositories.com/f/networking-communication/dns-configuration.md) — Allows injection of custom DNS resolution logic via configuration files and environment variables. ([source](https://docs.pi-hole.net/docker/upgrading/v5-v6/))
- [DNS Management Tools](https://awesome-repositories.com/f/networking-communication/dns-management-tools.md) — Maps local hostnames to specific IP addresses to ensure reliable internal network resolution for local devices. ([source](https://docs.pi-hole.net/ftldns/configfile/))
- [DNS Resolution](https://awesome-repositories.com/f/networking-communication/dns-resolution.md) — Directs network traffic to a designated sinkhole by updating router settings, DHCP server configuration, or manual DNS assignment. ([source](https://docs.pi-hole.net/main/post-install/))
- [Domain Filtering Engines](https://awesome-repositories.com/f/networking-communication/domain-filtering-engines.md) — Provides a domain filtering engine that uses regular expressions to block unwanted network traffic. ([source](https://docs.pi-hole.net/regex/))
- [Traffic Filtering Rules](https://awesome-repositories.com/f/networking-communication/traffic-filtering-rules.md) — Organizes clients, allowlists, and blocklists into groups to control which network devices are subject to specific filtering policies. ([source](https://docs.pi-hole.net/main/))
- [Recursive DNS Resolvers](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-infrastructure-configuration/network-infrastructure/recursive-dns-resolvers.md) — Operates a local recursive DNS resolver to fetch domain information directly from root servers. ([source](https://docs.pi-hole.net/ftldns/configfile/))
- [Regex Filtering Engines](https://awesome-repositories.com/f/networking-communication/network-reliability-diagnostics/network-filtering/regex-filtering-engines.md) — Uses regular expression patterns to dynamically permit or deny network traffic requests.
- [Network Hostname Resolvers](https://awesome-repositories.com/f/networking-communication/client-ip-identification/network-hostname-resolvers.md) — Resolves IP addresses to human-readable hostnames using PTR lookups and network table analysis. ([source](https://docs.pi-hole.net/ftldns/configfile/))
- [DNS Services](https://awesome-repositories.com/f/networking-communication/dns-services.md) — Provides global toggles to enable or disable DNS filtering, including temporary suspension periods for unrestricted access. ([source](https://docs.pi-hole.net/main/pihole-command/))
- [DNS Query Filters](https://awesome-repositories.com/f/networking-communication/dns-query-filters.md) — Configures specific DNS replies, such as empty answers or custom IP addresses, when queries match filtering rules. ([source](https://docs.pi-hole.net/regex/pi-hole/))
- [IP Address Management Systems](https://awesome-repositories.com/f/networking-communication/ip-address-management-systems.md) — Manages IP address allocation and network configuration for local devices via an integrated DHCP server.
- [Network Traffic Routing](https://awesome-repositories.com/f/networking-communication/network-traffic-routing.md) — Configures VPN servers to push network-wide DNS filtering to connected clients. ([source](https://docs.pi-hole.net/guides/vpn/wireguard/internal/))

### System Administration & Monitoring

- [Administrative Interfaces](https://awesome-repositories.com/f/system-administration-monitoring/administrative-interfaces.md) — Provides a web-based dashboard for managing server settings, monitoring traffic, and configuring filtering policies.
- [DNS Resolvers](https://awesome-repositories.com/f/system-administration-monitoring/dns-resolvers.md) — Functions as a containerized DNS resolution engine with support for caching and DNSSEC validation.
- [Web Dashboards](https://awesome-repositories.com/f/system-administration-monitoring/web-dashboards.md) — Provides a web-based dashboard for configuring DNS and DHCP settings and monitoring network traffic in real time. ([source](https://docs.pi-hole.net/main/origins/))
- [Administrative Dashboards](https://awesome-repositories.com/f/system-administration-monitoring/administrative-dashboards.md) — Pi-hole provides a command-line interface and web dashboard to monitor service status, update software, and manage configuration settings. ([source](https://docs.pi-hole.net/main/))
- [Network Traffic Analyzers](https://awesome-repositories.com/f/system-administration-monitoring/network-traffic-analyzers.md) — Provides real-time network traffic monitoring and visualization of DNS query statistics.
- [Query Logging](https://awesome-repositories.com/f/system-administration-monitoring/query-logging.md) — Persists DNS query logs in an embedded relational database to maintain a long-term record of network activity. ([source](https://docs.pi-hole.net/database/))
- [Activity Monitors](https://awesome-repositories.com/f/system-administration-monitoring/activity-monitors.md) — Records operational events and DNS query details to persistent files for troubleshooting and monitoring. ([source](https://docs.pi-hole.net/guides/dns/unbound/))
- [Diagnostic and Error Reporting](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/diagnostic-error-reporting.md) — Analyzes system logs and configuration to generate diagnostic reports for troubleshooting and support. ([source](https://docs.pi-hole.net/ftldns/dnsmasq_warn/))
- [Query Performance Monitoring](https://awesome-repositories.com/f/system-administration-monitoring/query-performance-monitoring.md) — Streams DNS query logs in real-time to observe network traffic and troubleshoot connectivity or blocking issues. ([source](https://docs.pi-hole.net/main/pihole-command/))
- [Management Interface Networking](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/remote-access-interface-tools/administrative-interfaces/management-interfaces/management-interface-networking.md) — Configures the service to listen for requests on all network interfaces, enabling consistent filtering for local and VPN clients. ([source](https://docs.pi-hole.net/guides/vpn/openvpn/dual-operation/))
- [Metrics Exporters](https://awesome-repositories.com/f/system-administration-monitoring/metrics-exporters.md) — Transmits DNS filtering statistics to external monitoring systems for long-term traffic analysis. ([source](https://docs.pi-hole.net/main/projects/))
- [Network Device Synchronizers](https://awesome-repositories.com/f/system-administration-monitoring/network-configuration-services/network-synchronization-targets/network-device-synchronizers.md) — Parses system ARP and neighbor caches to maintain an accurate, synchronized list of connected network devices. ([source](https://docs.pi-hole.net/ftldns/signals/))
- [Reverse DNS Resolution](https://awesome-repositories.com/f/system-administration-monitoring/reverse-dns-resolution.md) — Performs reverse DNS lookups for local IP addresses to map hostnames in the management dashboard. ([source](https://docs.pi-hole.net/routers/fritzbox-de/))

### Testing & Quality Assurance

- [Network Traffic Dashboards](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/network-api-mocking/network-traffic-monitors/network-traffic-dashboards.md) — Provides a web-based dashboard for real-time visualization of DNS query statistics and network traffic monitoring.

### Data & Databases

- [DNS Caches](https://awesome-repositories.com/f/data-databases/performance-caching-systems/dns-caches.md) — Caches resolved domain names in memory to accelerate future lookups and reduce upstream server load. ([source](https://docs.pi-hole.net/))
- [Network Statistics APIs](https://awesome-repositories.com/f/data-databases/statistical-analysis-tools/network-statistics-apis.md) — Exposes an interactive API for querying detailed network analysis data and performance statistics. ([source](https://docs.pi-hole.net/ftldns/))
- [Grouped Filters](https://awesome-repositories.com/f/data-databases/grouped-filters.md) — Assigns network clients to custom groups for unique filtering rule enforcement. ([source](https://docs.pi-hole.net/group_management/example/))
- [Client Activity Reporters](https://awesome-repositories.com/f/data-databases/statistical-analysis-tools/usage-reporting/client-activity-reporters.md) — Calculates and reports network activity statistics for individual clients based on historical database records. ([source](https://docs.pi-hole.net/ftldns/signals/))
