Pi-hole replaces cloud DNS blockers like NextDNS with a self-hosted sinkhole for Linux and Docker that filters network ads with zero subscription fees.
Pi-hole is a self-hosted DNS sinkhole that blocks advertisements and tracking domains across an entire local network. Rather than relying on browser extensions or external resolvers, it intercepts domain lookups at the gateway to drop unwanted requests before data transfers begin. The software runs on Linux hosts or Docker containers, giving administrators centralized control over every connected device.
NextDNS provides managed cloud DNS filtering with preconfigured blocklists and hosted analytics, but caps its free tier at 300,000 queries per month before disabling protection or requiring a subscription. In a household or homelab with smart televisions, mobile phones, streaming boxes, and IoT telemetry, that 300,000 lookup threshold is often exhausted within two weeks. Pi-hole handles unlimited queries on local hardware with zero subscription fees, keeping DNS logs inside your local subnet.
The trade-off shifts from monthly bills to maintenance effort. NextDNS requires no hardware, updates automatically, and protects devices outside the home through native device profiles. Deploying Pi-hole means provisioning local hardware—such as a Raspberry Pi or a container on a homelab server—and owning uptime. If your Pi-hole host fails, local DNS resolution stops and the entire network loses web access unless a secondary resolver is configured. Filtering mobile devices away from home also requires setting up a WireGuard or VPN tunnel back to your LAN.
Can Pi-hole block YouTube ads on smart TVs? No. YouTube serves advertisements from the same domains as the underlying videos, so DNS-level blocking breaks video playback.
Pi-hole vs NextDNS — which is cheaper for home use? Pi-hole incurs no subscription fees and processes unlimited queries locally, whereas NextDNS requires a paid plan once you exceed 300,000 monthly lookups.
What happens to internet access if the Pi-hole host crashes? Without a secondary local DNS server configured on your router, client devices cannot resolve domain names and the entire network loses web connectivity.
Pi-hole remains a dependable self-hosted choice for blocking trackers and resolving local LAN domains, provided you accept the operational overhead of server maintenance. Active maintenance with commits through August 2026 and an EUPL-1.2 license ensure long-term community development without vendor subscription fees. For homelab operators prioritizing data privacy and zero recurring costs, it is an easy recommendation.
We started this exact setup from scratch in a clean Linux machine on Nov 1, 2026 and checked it through Pi-hole's own API: every check passed. Recipes are re-checked regularly and removed if they stop working.
mkdir -p pi-hole && cd pi-hole
curl -fsSL https://open-source.store/tools/pi-hole/compose.yml -o compose.ymlcat > .env <<EOF
PIHOLE_PASSWORD=$(openssl rand -hex 12)
TZ=UTC
EOFPIHOLE_PASSWORD — Password for the Pi-hole web interface and admin API. Generated above; keep it secret.TZ — Time zone for Pi-hole logs and statistics.docker compose up -dservices:
pihole:
image: pihole/pihole:2026.10.1
ports:
- "80:80"
- "53:53/tcp"
- "53:53/udp"
environment:
TZ: ${TZ}
FTLCONF_webserver_api_password: ${PIHOLE_PASSWORD}
FTLCONF_dns_listeningMode: ALL
volumes:
- pihole-data:/etc/pihole
restart: always
healthcheck:
test: ["CMD-SHELL", "dig +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1"]
interval: 5s
timeout: 5s
retries: 5
volumes:
pihole-data:
Lint, codegen, breaking-change checks and dependency management in one Git-native CLI. Open source, no registry lock-in.
Show that Pi-hole is listed as an open-source alternative. Paste into your README:
Ubuntu 24.04 · Apple container, Docker 29.1.3, Compose 2.40.3+ds1-0ubuntu1~24.04.1. Images pulled in 39 s: pihole/pihole:2026.10.1.
Based on the upstream setup. Official compose from docker-pi-hole. Image pinned to 2026.10.1; web password moved to .env; web UI on port 80 and plain DNS on port 53 (TCP/UDP) published; DHCP (port 67) and HTTPS (port 443) omitted; config persisted in a named volume.
[✓] Status: Retrieval successful pihole-1 | 2026-11-01T07:51:33.423409004Z [✓] Parsed 76737 exact domains and 0 ABP-style domains (blocking, ignored 1 non-domain entries) pihole-1 | 2026-11-01T07:51:33.423638463Z Sample of non-domain entries: pihole-1 | 2026-11-01T07:51:33.423646796Z - fe80::1%lo0 pihole-1 | 2026-11-01T07:51:33.423852796Z pihole-1 | 2026-11-01T07:51:33.448616213Z [i] Building gravity tree... [✓] Building gravity tree pihole-1 | 2026-11-01T07:51:33.452410963Z [i] Building antigravity tree... [✓] Building antigravity tree pihole-1 | 2026-11-01T07:51:33.453122004Z pihole-1 | 2026-11-01T07:51:33.460790754Z [i] Number of gravity domains: 76737 (76737 unique domains) pihole-1 | 2026-11-01T07:51:33.465126046Z [i] Number of antigravity domains: 0 (0 unique domains) pihole-1 | 2026-11-01T07:51:33.468029338Z [i] Number of exact denied domains: 0 pihole-1 | 2026-11-01T07:51:33.469028629Z [i] Number of regex denied filters: 0 pihole-1 | 2026-11-01T07:51:33.469948879Z [i] Number of exact allowed domains: 0 pihole-1 | 2026-11-01T07:51:33.471017921Z [i] Number of regex allowed filters: 0 pihole-1 | 2026-11-01T07:51:33.471022088Z pihole-1 | 2026-11-01T07:51:33.477930338Z [i] Optimizing database... [✓] Optimizing database pihole-1 | 2026-11-01T07:51:33.486133254Z [i] Swapping databases... [✓] Swapping databases pihole-1 | 2026-11-01T07:51:33.486142296Z [✓] The old database remains available pihole-1 | 2026-11-01T07:51:33.489497296Z [i] Cleaning up stray matter... [✓] Cleaning up stray matter pihole-1 | 2026-11-01T07:51:33.489505879Z pihole-1 | 2026-11-01T07:51:33.489506713Z [✓] Done. pihole-1 | 2026-11-01T07:51:33.489611129Z pihole-1 | 2026-11-01T07:51:33.489627629Z [i] pihole-FTL pre-start checks pihole-1 | 2026-11-01T07:51:33.490410963Z [i] Setting capabilities on pihole-FTL where possible pihole-1 | 2026-11-01T07:51:33.491869671Z [i] Applying the following caps to pihole-FTL: pihole-1 | 2026-11-01T07:51:33.491875921Z * CAP_CHOWN pihole-1 | 2026-11-01T07:51:33.491876671Z * CAP_NET_BIND_SERVICE pihole-1 | 2026-11-01T07:51:33.491877254Z * CAP_NET_RAW pihole-1 | 2026-11-01T07:51:33.492670088Z pihole-1 | 2026-11-01T07:51:33.576852004Z [i] Starting pihole-FTL (no-daemon) as pihole pihole-1 | 2026-11-01T07:51:33.576867463Z pihole-1 | 2026-11-01T07:51:39.492945632Z [i] Version info: pihole-1 | 2026-11-01T07:51:39.492964382Z Core version is v6.5 (Latest: v6.5) pihole-1 | 2026-11-01T07:51:39.492965841Z Web version is v6.6.1 (Latest: v6.6.1) pihole-1 | 2026-11-01T07:51:39.492973257Z FTL version is v6.8 (Latest: v6.8) pihole-1 | 2026-11-01T07:51:39.492973882Z pihole-1 | 2026-11-01T07:51:39.493529716Z 2026-11-01 07:51:33.578 UTC [190M] INFO: ########## FTL started on 8f9207e52f04! ########## pihole-1 | 2026-11-01T07:51:39.493533424Z 2026-11-01 07:51:33.578 UTC [190M] INFO: FTL branch: master pihole-1 | 2026-11-01T07:51:39.493534091Z 2026-11-01 07:51:33.578 UTC [190M] INFO: FTL version: v6.8 pihole-1 | 2026-11-01T07:51:39.493534799Z 2026-11-01 07:51:33.578 UTC [190M] INFO: FTL commit: 29c8b13f pihole-1 | 2026-11-01T07:51:39.493535341Z 2026-11-01 07:51:33.578 UTC [190M] INFO: FTL date: 2026-10-17 13:08:09 +0200 pihole-1 | 2026-11-01T07:51:39.493535882Z 2026-11-01 07:51:33.578 UTC [190M] INFO: FTL user: pihole pihole-1 | 2026-11-01T07:51:39.493536382Z 2026-11-01 07:51:33.578 UTC [190M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 15.2.0) 15.2.0 pihole-1 | 2026-11-01T07:51:39.493540716Z 2026-11-01 07:51:33.655 UTC [190M] INFO: 2 FTLCONF environment variables found (2 used, 0 invalid, 0 ignored) pihole-1 | 2026-11-01T07:51:39.493541382Z 2026-11-01 07:51:33.655 UTC [190M] INFO: [✓] FTLCONF_dns_listeningMode is used pihole-1 | 2026-11-01T07:51:39.493542591Z 2026-11-01 07:51:33.655 UTC [190M] INFO: [✓] FTLCONF_webserver_api_password is used pihole-1 | 2026-11-01T07:51:39.493543174Z 2026-11-01 07:51:33.656 UTC [190M] INFO: Wrote config file: pihole-1 | 2026-11-01T07:51:39.493543716Z 2026-11-01 07:51:33.656 UTC [190M] INFO: - 167 total entries pihole-1 | 2026-11-01T07:51:39.493544257Z 2026-11-01 07:51:33.656 UTC [190M] INFO: - 163 entries are default pihole-1 | 2026-11-01T07:51:39.493544757Z 2026-11-01 07:51:33.656 UTC [190M] INFO: - 4 entries are modified pihole-1 | 2026-11-01T07:51:39.493545299Z 2026-11-01 07:51:33.656 UTC [190M] INFO: - 1 entry is forced through environment pihole-1 | 2026-11-01T07:51:39.493545841Z 2026-11-01 07:51:33.660 UTC [190M] INFO: Parsed config file /etc/pihole/pihole.toml successfully pihole-1 | 2026-11-01T07:51:39.493546341Z 2026-11-01 07:51:33.660 UTC [190M] INFO: PID file does not exist or not readable pihole-1 | 2026-11-01T07:51:39.493546882Z 2026-11-01 07:51:33.660 UTC [190M] INFO: No other running FTL process found. pihole-1 | 2026-11-01T07:51:39.493547424Z 2026-11-01 07:51:33.660 UTC [190M] WARNING: Insufficient permissions to set process priority to -10 (CAP_SYS_NICE required), process priority remains at 0 pihole-1 | 2026-11-01T07:51:39.493548049Z 2026-11-01 07:51:33.660 UTC [190M] INFO: PID of FTL process: 190 pihole-1 | 2026-11-01T07:51:39.493548591Z 2026-11-01 07:51:33.660 UTC [190M] WARNING: Linux capability CAP_SYS_NICE is not available, needed for raising the process priority set in misc.nice pihole-1 | 2026-11-01T07:51:39.493549216Z 2026-11-01 07:51:33.660 UTC [190M] WARNING: Linux capability CAP_SYS_TIME is not available, needed for setting the system time from the NTP client pihole-1 | 2026-11-01T07:51:39.493549799Z 2026-11-01 07:51:33.660 UTC [190M] INFO: listening on 0.0.0.0 port 53 pihole-1 | 2026-11-01T07:51:39.493550632Z 2026-11-01 07:51:33.660 UTC [190M] INFO: listening on :: port 53 pihole-1 | 2026-11-01T07:51:39.493551174Z 2026-11-01 07:51:33.661 UTC [190M] WARNING: No database file found, creating new (empty) database at /etc/pihole/pihole-FTL.db pihole-1 | 2026-11-01T07:51:39.493551757Z 2026-11-01 07:51:33.667 UTC [190M] INFO: Database version is 1 pihole-1 | 2026-11-01T07:51:39.493552257Z 2026-11-01 07:51:33.667 UTC [190M] INFO: Updating long-term database to version 2 pihole-1 | 2026-11-01T07:51:39.493552799Z 2026-11-01 07:51:33.668 UTC [190M] INFO: Updating long-term database to version 3 pihole-1 | 2026-11-01T07:51:39.493553341Z 2026-11-01 07:51:33.670 UTC [190M] INFO: Updating long-term database to version 4 pihole-1 | 2026-11-01T07:51:39.493553841Z 2026-11-01 07:51:33.671 UTC [190M] INFO: Updating long-term database to version 5 pihole-1 | 2026-11-01T07:51:39.493554424Z 2026-11-01 07:51:33.673 UTC [190M] INFO: Updating long-term database to version 6 pihole-1 | 2026-11-01T07:51:39.493555591Z 2026-11-01 07:51:33.674 UTC [190M] INFO: Updating long-term database to version 7 pihole-1 | 2026-11-01T07:51:39.493556091Z 2026-11-01 07:51:33.675 UTC [190M] INFO: Updating long-term database to version 8 pihole-1 | 2026-11-01T07:51:39.493558841Z 2026-11-01 07:51:33.677 UTC [190M] INFO: Updating long-term database to version 9 pihole-1 | 2026-11-01T07:51:39.493559382Z 2026-11-01 07:51:33.678 UTC [190M] INFO: Updating long-term database to version 10 pihole-1 | 2026-11-01T07:51:39.493559924Z 2026-11-01 07:51:33.679 UTC [190M] INFO: Updating long-term database to version 11 pihole-1 | 2026-11-01T07:51:39.493560466Z 2026-11-01 07:51:33.680 UTC [190M] INFO: Updating long-term database to version 12 pihole-1 | 2026-11-01T07:51:39.493561049Z 2026-11-01 07:51:33.682 UTC [190M] INFO: Updating long-term database to version 13 pihole-1 | 2026-11-01T07:51:39.493561632Z 2026-11-01 07:51:33.683 UTC [190M] INFO: Updating long-term database to version 14 pihole-1 | 2026-11-01T07:51:39.493562216Z 2026-11-01 07:51:33.685 UTC [190M] INFO: Updating long-term database to version 15 pihole-1 | 2026-11-01T07:51:39.493562841Z 2026-11-01 07:51:33.686 UTC [190M] INFO: Updating long-term database to version 16 pihole-1 | 2026-11-01T07:51:39.493563466Z 2026-11-01 07:51:33.687 UTC [190M] INFO: Updating long-term database to version 17 pihole-1 | 2026-11-01T07:51:39.493564091Z 2026-11-01 07:51:33.688 UTC [190M] INFO: Updating long-term database to version 18 pihole-1 | 2026-11-01T07:51:39.493564757Z 2026-11-01 07:51:33.689 UTC [190M] INFO: Updating long-term database to version 19 pihole-1 | 2026-11-01T07:51:39.493565549Z 2026-11-01 07:51:33.690 UTC [190M] INFO: Updating long-term database to version 20 pihole-1 | 2026-11-01T07:51:39.493566216Z 2026-11-01 07:51:33.692 UTC [190M] INFO: Updating long-term database to version 21 pihole-1 | 2026-11-01T07:51:39.493566841Z 2026-11-01 07:51:33.692 UTC [190M] INFO: Updating long-term database to version 22 pihole-1 | 2026-11-01T07:51:39.493567382Z 2026-11-01 07:51:33.693 UTC [190M] INFO: Database successfully initialized pihole-1 | 2026-11-01T07:51:39.493567966Z 2026-11-01 07:51:33.749 UTC [190M] WARNING: Insufficient permissions to set system time (CAP_SYS_TIME required), NTP client not available pihole-1 | 2026-11-01T07:51:39.493568549Z 2026-11-01 07:51:33.749 UTC [190/T191] INFO: NTP server listening on 0.0.0.0:123 (IPv4) pihole-1 | 2026-11-01T07:51:39.493569091Z 2026-11-01 07:51:33.749 UTC [190M] INFO: Restored 0 API sessions from the database pihole-1 | 2026-11-01T07:51:39.493569674Z 2026-11-01 07:51:33.749 UTC [190/T192] INFO: NTP server listening on :::123 (IPv6) pihole-1 | 2026-11-01T07:51:39.493570216Z 2026-11-01 07:51:33.750 UTC [190M] INFO: FTL is running as user pihole (UID 1000) pihole-1 | 2026-11-01T07:51:39.493570716Z 2026-11-01 07:51:33.750 UTC [190/T193] INFO: Imported 0 queries from the on-disk database (it has 0 rows) pihole-1 | 2026-11-01T07:51:39.493571257Z 2026-11-01 07:51:33.750 UTC [190/T193] INFO: Parsing queries in database pihole-1 | 2026-11-01T07:51:39.493571924Z 2026-11-01 07:51:33.750 UTC [190M] WARNING: Linux capability CAP_SYS_NICE is not available, needed for raising the process priority set in misc.nice pihole-1 | 2026-11-01T07:51:39.493572549Z 2026-11-01 07:51:33.750 UTC [190M] WARNING: Linux capability CAP_SYS_TIME is not available, needed for setting the system time from the NTP client pihole-1 | 2026-11-01T07:51:39.493573132Z 2026-11-01 07:51:33.750 UTC [190M] INFO: Blocking status is enabled pihole-1 | 2026-11-01T07:51:39.493573632Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: Imported 0 queries from the long-term database pihole-1 | 2026-11-01T07:51:39.493575549Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: -> Total DNS queries: 0 pihole-1 | 2026-11-01T07:51:39.493576549Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: -> Cached DNS queries: 0 pihole-1 | 2026-11-01T07:51:39.493577091Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: -> Forwarded DNS queries: 0 pihole-1 | 2026-11-01T07:51:39.493577591Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: -> Blocked DNS queries: 0 pihole-1 | 2026-11-01T07:51:39.493578132Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: -> Unknown DNS queries: 0 pihole-1 | 2026-11-01T07:51:39.493583341Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: -> Unique domains: 0 pihole-1 | 2026-11-01T07:51:39.493583924Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: -> Unique clients: 0 pihole-1 | 2026-11-01T07:51:39.493584549Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: -> DNS cache records: 0 pihole-1 | 2026-11-01T07:51:39.493585091Z 2026-11-01 07:51:33.751 UTC [190/T193] INFO: -> Known forward destinations: 0 pihole-1 | 2026-11-01T07:51:39.493585632Z 2026-11-01 07:51:33.752 UTC [190/T193] INFO: Compiled 0 allow and 0 deny regex for 0 client in 0.0 msec pihole-1 | 2026-11-01T07:51:39.493586174Z 2026-11-01 07:51:33.758 UTC [190/T197] INFO: Created SSL/TLS certificate for pi.hole at /etc/pihole/tls.pem pihole-1 | 2026-11-01T07:51:39.493586716Z 2026-11-01 07:51:33.758 UTC [190/T197] INFO: Reading certificate from /etc/pihole/tls.pem ... pihole-1 | 2026-11-01T07:51:39.493587341Z 2026-11-01 07:51:33.758 UTC [190/T197] INFO: Using SSL/TLS certificate file /etc/pihole/tls.pem pihole-1 | 2026-11-01T07:51:39.493587882Z 2026-11-01 07:51:33.758 UTC [190/T197] INFO: Web server ports: pihole-1 | 2026-11-01T07:51:39.493588382Z 2026-11-01 07:51:33.758 UTC [190/T197] INFO: - 0.0.0.0:80 (HTTP, IPv4, optional, OK) pihole-1 | 2026-11-01T07:51:39.493588924Z 2026-11-01 07:51:33.758 UTC [190/T197] INFO: - 0.0.0.0:443 (HTTPS, IPv4, optional, OK) pihole-1 | 2026-11-01T07:51:39.493589466Z 2026-11-01 07:51:33.758 UTC [190/T197] INFO: - [::]:80 (HTTP, IPv6, optional, OK) pihole-1 | 2026-11-01T07:51:39.493589966Z 2026-11-01 07:51:33.758 UTC [190/T197] INFO: - [::]:443 (HTTPS, IPv6, optional, OK) pihole-1 | 2026-11-01T07:51:39.493590507Z 2026-11-01 07:51:35.676 UTC [190/T193] INFO: Compiled 0 allow and 0 deny regex for 0 client in 0.0 msec