← How-Tos
raspberry-pi Mar 26, 2026 ◑ 8 views ◯ 2 min read

Running Pi-hole on a Raspberry Pi Zero 2W

raspberry pipi holednsad blockingnetwork

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

Step 1 โ€” Flash Raspberry Pi OS Lite

Use Raspberry Pi Imager:

  1. OS: Raspberry Pi OS Lite (64-bit) โ€” no desktop needed
  2. Settings (โš™๏ธ):
  3. Enable SSH
  4. Set WiFi credentials
  5. Hostname: pihole.local
  6. Username/password
  7. 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):

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:

Note the admin password shown at the end.

Step 4 โ€” Point Your Router to Pi-hole

In your router DNS settings:

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:

Adding Better Blocklists

Settings โ†’ Adlists:

ListSource
Firebog Ticked Listsv.firebog.net/hosts/lists.php
OISD Fullbig.oisd.nl
HaGeZi Multi Ultimateraw.githubusercontent.com/hagezi/dns-blocklists

Add URL โ†’ Save โ†’ Tools โ†’ Update Gravity to apply.

Tips