Deploy network-wide ad blocking the easy way (ZimaOS), the flexible way (Docker), or the granular way (DietPi). Includes extra blocklists, router setup, quick test steps, and recommended hardware.
Pi-hole is a powerful tool that blocks ads and trackers for every device on your home network. Below are three different install methods: easiest with ZimaOS, flexible with Docker, or advanced with DietPi. After setup, don’t skip the Extra Blocklists section — this will supercharge your ad blocking.
CasaOS.Access Pi-hole at: http://<your-zimaos-ip>/admin
This method works on any Linux server with Docker installed. It maps host ports 8087 → 80 (web) and 8443 → 443 (SSL). DNS runs on 53/tcp and 53/udp.
# Remove any old Pi-holesudo docker rm -f pihole 2>/dev/nullsudo rm -rf ~/docker/containers/pihole# Create folders (fish-shell friendly whoami)sudo mkdir -p ~/docker/containers/pihole/{etc-pihole,etc-dnsmasq.d}sudo chown -R (whoami):(whoami) ~/docker/containers/pihole# Run Pi-hole containersudo docker run -d \ --name pihole \ --hostname pihole \ --cap-add=NET_ADMIN \ -p 8087:80 -p 8443:443 \ -p 53:53/tcp -p 53:53/udp \ -v ~/docker/containers/pihole/etc-pihole:/etc/pihole \ -v ~/docker/containers/pihole/etc-dnsmasq.d:/etc/dnsmasq.d \ -e TZ="America/Chicago" \ -e WEBPASSWORD="ChangeMe" \ -e DNSMASQ_LISTENING=all \ -e PIHOLE_DNS_1=1.1.1.1 \ -e PIHOLE_DNS_2=208.67.220.220 \ --restart unless-stopped \ pihole/pihole:latest# Change the admin password latersudo docker exec pihole pihole setpassword 'NewPasswordHere'
Access Pi-hole at: http://<your-server-ip>:8087/admin
root / dietpi. You’ll be asked to change the password.dietpi-software, select Pi-hole (and optional: Fail2ban, RAMlog), then install.sudo pihole setpassword
Access Pi-hole at: http://<your-dietpi-ip>:8489/admin
To make all devices use Pi-hole automatically:
192.168.1.136).Boost your protection by adding community-maintained blocklists. Here’s how:
📋 Recommended Blocklists (easy copy & paste):
https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/pro.txt
https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt
https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/android-tracking.txt
✅ After adding, go to Tools → Update Gravity to download and activate the new blocklists.
1.1.1.1) or OpenDNS as your upstream servers for speed and privacy.If you want a smooth Pi-hole or homelab setup, here are some solid hardware picks that balance price and performance:
💡 These systems have plenty of power for Pi-hole, Docker, and light server workloads. If you’re running multiple services, go for the Beelink EQ14 or ME Mini NAS for extra storage and memory.
Pick the install method that matches your skill level: ZimaOS for one-click setup, Docker for portability and flexibility, or DietPi for complete control. Add the extra blocklists, set your router’s DNS, and enjoy faster, ad-free browsing across your entire network.