Running Pi-hole on a Raspberry Pi Zero 2W
Running Pi-hole on a Raspberry Pi Zero 2W Pi-hole is a network-wide DNS ad blocker. Every device on your network gets ad blocking without installing anything on each device. The Pi Zero 2W is the perfect low-power host. What You Need Raspberry Pi Zero 2W MicroSD card (8GB+ is enough) Micro USB power supply (2A+) Ethernet adapter or WiFi (Zero 2W has built-in WiFi) Step 1 — Flash Raspberry Pi OS Lite Use Raspberry Pi Imager: 1. OS: Raspberry Pi OS Lite (64-bit) — no desktop needed 2. Settings (⚙️): - Enable SSH - Set WiFi credentials - Hostname: pihole.local - Username/password 3. Write to SD card, boot Pi Zero 2W Step 2 — Assign Static IP Before installing Pi-hole, give the Pi a static IP on your router. In your router admin (usually 192.168.1.1 or 192.168.0.1): Find the Pi's MAC address in DHCP clients list Reserve/assign a static IP (e.g., 192.168.1.50) Note this IP — you'll configure Pi-hole to use it Step 3 — Install Pi-hole SSH into your Pi: ssh [email protected] Run the installer: curl -sSL https://install.pi-hole.net | bash Follow the installer prompts: Upstream DNS: Cloudflare (1.1.1.1) or Quad9 Blocklists: keep default, add more later Install web admin: Yes Log queries: Yes Privacy mode: 0 (Show everything) Note the admin password shown at the end. Step 4 — Point Your Router to Pi-hole In your router DNS settings: Primary DNS: your Pi's static IP (e.g., 192.168.1.50) Secondary DNS: 1.1.1.1 (fallback if Pi-hole goes down) All devices on the network now route DNS through Pi-hole. Step 5 — Admin Interface Go to: http://pihole.local/admin Login with the password from installation. Dashboard shows: Queries today / blocked percentage Top blocked domains Per-client breakdown Adding Better Blocklists Settings → Adlists: Add URL → Save → Tools → Update Gravity to apply. Tips Whitelist domains that break: Settings → Whitelist Query log shows what's being blocked — useful for troubleshooting Keep Pi-hole updated: pihole -up via SSH Pi Zero 2W uses ~1W of power — leave it running 24/7
Related Guides
- How to Install and Configure Pi-hole on Raspberry Pi
- Pi-hole Setup: Network-Wide Ad Blocking
- Running Your Own Recursive DNS Resolver on Raspberry Pi with Unbound: Full DNS Privacy Beyond Pi-hole
- Monitoring Your Home Network with Raspberry Pi and Grafana
- How to Install Klipper on Any 3D Printer: Complete Setup Guide
- How to Set Up OpenCV Machine Vision on a Raspberry Pi
- Raspberry Pi: Complete Headless Setup Guide (No Monitor Needed)
- Raspberry Pi: Headless OS Setup