Pi-hole is a network-wide ad blocker that runs on a Raspberry Pi and filters unwanted content for every device on your home network. It blocks ads, trackers, and malicious domains before they ever reach your devices, which can speed up browsing and improve privacy. The best part? You don’t need a powerful Pi for this—even the oldest, cheapest model will do the job. This guide explains exactly which Raspberry Pi to choose, what else you’ll need, and how to set it up without headaches.
What You’ll Need
- A Raspberry Pi (any model, but see the guide for recommendations)
- A microSD card (at least 8 GB, Class 10 recommended)
- A power supply (official Raspberry Pi power supply is safest)
- An Ethernet cable (recommended for reliability, but Wi-Fi works)
- Another computer to download the Pi-hole software and write it to the SD card
- An SD card reader (if your computer doesn’t have one built-in)
- Optional: a case and heatsinks for better cooling
Step-by-Step
- Decide which Raspberry Pi to use. Any model from the Raspberry Pi 2 onward works fine for Pi-hole. The Pi Zero, Pi 3, Pi 4, and Pi 5 all have enough power. For most homes, a Pi 3 or Pi 4 with 1 GB RAM is more than enough. The Pi 5 is overkill but works if that’s what you have. Avoid the original Pi 1 (too slow) and Pi Zero (works but can be sluggish with a large blocklist).
- Download the Raspberry Pi Imager. On your computer, go to the official Raspberry Pi website and download the Imager tool for your operating system (Windows, macOS, or Linux). Install it.
- Prepare your microSD card. Insert the card into your computer. Open the Imager, click “Choose OS,” then select “Raspberry Pi OS (other)” and pick “Raspberry Pi OS Lite (32-bit)” – this is a lightweight version without a desktop, perfect for Pi-hole. Then click “Choose Storage” and select your SD card. Click “Write” and wait for it to finish.
- Enable SSH (optional but recommended). After writing the OS, the SD card will appear as a drive. Create an empty file named
ssh(no extension) in the root of that drive. This allows you to connect to the Pi remotely. - Boot your Pi. Insert the SD card into the Pi, connect the Ethernet cable (or set up Wi-Fi later), and plug in the power. Wait about a minute for it to boot.
- Find your Pi’s IP address. Check your router’s admin page for connected devices, or use a network scanner app. The Pi will appear as “raspberrypi” or similar.
- Connect via SSH. On your computer, open a terminal (macOS/Linux) or use PuTTY (Windows). Type
ssh pi@and press Enter. The default password israspberry. - Update your Pi. Run
sudo apt update && sudo apt upgrade -yto update the system. This may take a few minutes. - Install Pi-hole. Run the command
curl -sSL https://install.pi-hole.net | bashand follow the on-screen prompts. Accept the default settings unless you know what you’re doing. - Set a static IP address. During installation, Pi-hole will ask if you want to set a static IP. Choose “Yes” and follow the prompts. This ensures your Pi always has the same IP, so devices can find it.
- Set a web admin password. After installation, you’ll see a URL like
http://192.168.1.100/admin. Open it in your browser and log in with the password you set during installation. - Configure your router. In your router’s settings, change the DNS server to your Pi’s IP address. This tells all devices on your network to use Pi-hole for DNS. Consult your router’s manual for exact steps.
- Test it. Visit a website with ads (like a news site) and see if ads are blocked. You can also check the Pi-hole dashboard for queries.
Common Mistakes
- Using a Pi 1 or Pi Zero. These are too slow for comfortable use, especially with large blocklists. Stick to Pi 2 or newer.
- Not setting a static IP. If your Pi’s IP changes, devices will lose DNS and internet access. Always set a static IP during installation.
- Forgetting to update your router. Pi-hole won’t work unless your router points to it. Double-check your router’s DNS settings.
- Using a low-quality SD card. Cheap cards can cause corruption. Use a reputable brand (SanDisk, Samsung) with Class 10 speed.
- Skipping the update step. Installing Pi-hole on an outdated OS can lead to errors. Always run
sudo apt update && sudo apt upgradefirst.
Tips
- Use Ethernet instead of Wi-Fi. Wired connections are more stable and faster, which is important for DNS.
- Add extra blocklists. The default list is good, but you can add more from the Pi-hole dashboard under “Group Management” > “Adlists.” Popular lists include OISD and Firebog.
- Monitor your Pi’s temperature. If you’re using a Pi 4 or 5, consider a case with a fan. You can check temperature with
vcgencmd measure_temp. - Back up your SD card. Use the Raspberry Pi Imager to create a backup of your SD card once everything is set up. This saves you time if the card fails.
- Update Pi-hole regularly. Run
pihole -upto keep Pi-hole and its lists up to date.
Troubleshooting
- No internet after setting up Pi-hole. This usually means your router isn’t pointing to the Pi correctly. Check your router’s DNS settings and ensure the Pi’s IP is correct. You can test by setting your computer’s DNS manually to the Pi’s IP.
- Pi-hole dashboard won’t load. Make sure the Pi is on and connected to the network. Try accessing it via
http:///admin. If that fails, check that the Pi-hole service is running withsudo systemctl status pihole-FTL. - Ads are still showing. Some ads are served from the same domain as the content (first-party ads). Pi-hole can’t block those. Also, ensure your devices are using the Pi as their DNS. You can check by visiting
http:///adminand looking at the query log. - Pi is overheating. If the Pi feels hot, add a heatsink or fan. You can also underclock the Pi in
raspi-configto reduce heat. - Forgot the admin password. Run
pihole -a -pon the Pi to reset it.
Frequently Asked Questions
- Can I use a Raspberry Pi Zero for Pi-hole? Yes, but it will be slower, especially with many devices or large blocklists. It’s fine for a small home network, but a Pi 3 or 4 is better.
- How much RAM do I need? Pi-hole itself uses very little RAM—around 100 MB. A Pi with 1 GB RAM is plenty. More RAM won’t improve performance.
- Can I run Pi-hole alongside other services on the same Pi? Yes, many people run Pi-hole with Home Assistant, Plex, or other lightweight services. Just ensure your Pi has enough resources (2 GB RAM or more for multiple services).
- Will Pi-hole slow down my internet? No, it usually speeds things up because it blocks ads and trackers before they load, reducing data usage.
- Can I use Pi-hole on a virtual machine or Docker? Yes, Pi-hole can run in Docker or on a VM, but a Raspberry Pi is simpler and uses less power.
- Do I need a static IP for the Pi? Yes, it’s essential. If the Pi’s IP changes, devices won’t be able to find it for DNS. Pi-hole’s installer can set this up for you.
Choosing a Raspberry Pi for Pi-hole: Full Guide