Pi-hole Self Hosting: Block Ads on Every Device at Home

I used to think ad blockers were a browser problem — before I discovered Pi-hole self hosting. Install uBlock Origin, done. Then I started noticing ads on my phone apps, on my smart TV, in random games my kid was playing — all on the same Wi-Fi network. Browser extensions don’t touch any of that. That’s when I discovered Pi-hole, and honestly, it changed how I think about my home network entirely.

Pi-hole self hosting gives you a DNS-level ad blocker. Instead of filtering ads on individual devices, it filters them for your entire network at the router level. Every device that connects to your Wi-Fi — phones, tablets, smart TVs, game consoles, laptops — gets ad blocking automatically, without installing a single thing on any of them.

Transparency Note: This post contains affiliate links. If you buy something through these links, I may earn a small commission at no extra cost to you. Every product mentioned is researched based on specs, expert reviews, and real user feedback.
Pi-hole self hosting on a Raspberry Pi — blocking ads across every device on your network
Component Product Why It’s Recommended
Compute Raspberry Pi 5 Current gold standard — faster than the Pi 4, boots from microSD or SSD, handles Pi-hole with resources to spare
Storage SanDisk 32GB Endurance microSD Built for always-on read/write workloads like a DNS server without wearing out
Networking (optional) TP-Link TL-SG105 5-Port Switch Wired connection for faster, more reliable DNS response than Wi-Fi

What Pi-hole Self Hosting Actually Does (and Why It’s Different)

When your phone tries to load an app or a webpage, it first asks a DNS server to translate the domain name into an IP address. Pi-hole sits between your devices and the internet, acting as that DNS server. When an ad network’s domain shows up in a request — like ads.doubleclick.net or tracking.company.com — Pi-hole simply returns “nothing” instead of an IP address. The ad never loads. The tracker never phones home.

The results are immediate and kind of wild. Your smart TV’s menu stops showing promoted content. YouTube on your phone doesn’t pre-load ad metadata as fast. Pages load measurably faster because the browser isn’t waiting on ad servers that never respond. And your DNS query logs become a fascinating (and slightly horrifying) window into how many things are constantly trying to phone home on your network.

The best part? You set it up once, point your router to it, and forget about it. Every new device that joins your network is automatically protected.


What You Need to Get Started with Pi-hole Self Hosting

You don’t need much. Pi-hole runs on almost anything — an old laptop, a spare desktop, a VM, even a Docker container (check out the best Docker containers for beginners if you want to run Pi-hole that way) container. But the classic setup (and honestly the most satisfying one) is running it on a Raspberry Pi. It’s cheap, silent, low-power, and you can tuck it behind your router and forget it exists.

The Raspberry Pi 5 is the current gold standard — significantly faster than the Pi 4, boots from microSD or a proper SSD, and handles Pi-hole with resources to spare for other self-hosted services. But if you’re running Pi-hole solo, even a Pi Zero 2 W handles it fine.

WHAT YOU NEED TO GET STARTED WITH PI-HOLE SELF HOSTING

Raspberry Pi 5

The Raspberry Pi 5 is the current gold standard — significantly faster than the Pi 4, boots from microSD or a proper SSD, and handles Pi-hole with resources to spare for other self-hosted services.

  • The Raspberry Pi 5 is the current gold standard
  • significantly faster than the Pi 4, boots from microSD or a proper SSD, and handles Pi-hole with resources to spare for other self-hosted services. But if you’re running Pi-hole solo, even a Pi Zero 2 W handles it fine

Check price on Amazon →

Current price and availability shown on Amazon.

You’ll also need a reliable microSD card to run the OS. Don’t cheap out here — a slow or flaky card will cause random reboots and corrupted installs. The SanDisk 32GB Endurance microSD is specifically designed for always-on applications (dashcams, security cameras, servers) and handles the constant read/write of a DNS server without wearing out. It’s what I run on mine.

WHAT YOU NEED TO GET STARTED WITH PI-HOLE SELF HOSTING

SANDISK

Buy on Amazon You’ll also need a reliable microSD card to run the OS.

  • Buy on Amazon You’ll also need a reliable microSD card to run the OS. Don’t cheap out here
  • a slow or flaky card will cause random reboots and corrupted installs. The SanDisk 32GB Endurance microSD is specifically designed for always-on applications (dashcams, security cameras, servers) and handles the constant read/write of a DNS server without wearing out. It’s what I run on mine

Check price on Amazon →

Current price and availability shown on Amazon.


Installing Pi-hole Self Hosting: Easier Than It Sounds

Once you’ve got your Pi set up with Raspberry Pi OS (or any Debian-based Linux distro), the actual Pi-hole installation is a single command:

curl -sSL https://install.pi-hole.net | bash

Walk through the installer — it’ll ask you to pick an upstream DNS provider (I use Cloudflare’s 1.1.1.1 for speed and privacy), confirm your network settings, and choose a blocklist. The default blocklist is solid out of the box and blocks the vast majority of common ad networks and trackers.

After a few minutes, you’ll have a web interface running at http://pi.hole/admin where you can see live DNS queries, manage blocklists, whitelist anything you accidentally broke, and marvel at the percentage of your network traffic that was ads.

Ethernet network switch showing home network connections

Pointing Your Router at Your Pi-hole Self Hosting Setup

The magic happens when you set your router’s DNS server to your Pi-hole’s IP address. Log into your router’s admin panel (usually at 192.168.1.1 or 192.168.0.1), find the DNS settings under your LAN or DHCP configuration, and replace the default DNS server with your Pi’s static IP address.

Give your Pi a static IP first so it doesn’t change on you. Most routers let you assign a static DHCP lease by MAC address — find your Pi in the connected devices list, grab its MAC address, and assign it a permanent IP like 192.168.1.2. Then set that as your DNS server. Done. Every device on your network now routes DNS through Pi-hole.

Pro tip: Set Pi-hole as your primary DNS and leave your ISP’s DNS or a public DNS (like 1.1.1.1) as secondary. That way if Pi-hole ever goes down, your network doesn’t lose internet access completely.
Watch out for: Some apps and smart devices hardcode DNS servers (looking at you, certain Chromecast firmware and smart home hubs). They’ll bypass Pi-hole entirely. The fix is a firewall rule on your router to intercept all DNS traffic and redirect it to Pi-hole — but that’s an advanced step you can tackle later.

Leveling Up: Gravity (Blocklists) and Unbound

Pi-hole calls its blocklist system Gravity. The default list is good, but the community has curated some incredible third-party blocklists. The Firebog Tick List is a curated collection of high-quality blocklists that won’t nuke legitimate sites. Add a few and your block rate will jump significantly — mine went from 12% to over 22% of all queries blocked.

The other upgrade worth looking into is Unbound — a recursive DNS resolver you can run alongside Pi-hole. Instead of forwarding your DNS queries to Cloudflare or Google (who log them), Unbound goes directly to the authoritative DNS servers for each domain. It’s slower on the first lookup but adds a meaningful privacy layer to an already privacy-focused setup. The Pi-hole docs have a great walk-through for pairing the two.

If you want to keep your whole setup organized, a TP-Link 5-Port Unmanaged Switch is a cheap and reliable way to give your home lab devices a clean wired connection. Running your Pi-hole on Ethernet instead of Wi-Fi means faster DNS response times and zero Wi-Fi dropouts.

Gravity (Blocklists) and Unbound

TP-Link TL-SG105 5 Port Gigabit Unmanaged Ethernet…

If you want to keep your whole setup organized, a TP-Link 5-Port Unmanaged Switch is a cheap and reliable way to give your home lab devices a clean wired connection.

  • If you want to keep your whole setup organized, a TP-Link 5-Port Unmanaged Switch is a cheap and reliable way to give your home lab devices a clean wired connection. Running your Pi-hole on Ethernet instead of Wi-Fi means faster DNS response times and zero Wi-Fi dropouts

Check price on Amazon →

Current price and availability shown on Amazon.


The Part Where You Feel Like a Network Wizard

Once Pi-hole is running, open the dashboard and just watch the queries roll in for a few minutes. You’ll see things like your smart TV hitting ad servers 30 times a minute even when you’re not watching anything. You’ll see your phone checking in with analytics services from apps you haven’t opened in weeks. It’s eye-opening in a “I need to sit down for a second” kind of way.

The query log also makes it easy to debug. If a website suddenly breaks or an app stops loading something, you can see exactly what domain it was trying to reach — then whitelist it with one click if it’s legitimate. Over time your setup gets smarter and more tailored to how your household actually uses the internet.


The Takeaway

Pi-hole is one of those projects where the setup-to-payoff ratio is absurdly good. It pairs naturally with other home automation wins — like building a smart home morning routine. And once your network is set up, pair Pi-hole with Tailscale so your phone routes through Pi-hole even when you’re away from home that runs without ads interrupting your day. You spend a Saturday afternoon on it, and in return you get network-wide ad blocking that protects every device in your house for as long as the Pi is plugged in. No subscriptions, no per-device installs, no browser extensions to maintain. Just a small computer silently filtering out the garbage before it reaches you.

If you already have a Raspberry Pi collecting dust, this is the perfect weekend project. If you don’t, the Pi 5 starter kit is worth every penny — and Pi-hole is just the beginning of what you can run on it.

Your Turn

Already running Pi-hole self hosting? Tell me your block rate in the comments — I’m always curious what percentage people are seeing. And if you’ve stacked it with Unbound or a VPN for remote blocking, drop your setup below. This community has some seriously creative home lab builds and I want to see them.

Frequently Asked Questions

Do I need a Raspberry Pi to do Pi-hole self hosting?

No — Pi-hole runs on almost anything, including an old laptop, a spare desktop, a VM, or a Docker container. A Raspberry Pi is just the classic choice because it’s cheap, silent, and low-power.

Will Pi-hole slow down my internet?

No, the opposite tends to happen. Pages often load faster because your browser isn’t waiting on ad servers that never respond, since Pi-hole blocks the request at the DNS level before it ever loads.

What happens if my Pi-hole goes down?

Set Pi-hole as your primary DNS and leave your ISP’s DNS or a public DNS like 1.1.1.1 as secondary. That way, if Pi-hole ever goes offline, your network doesn’t lose internet access completely.

Can any device on my network bypass Pi-hole?

Some apps and smart devices hardcode their own DNS servers and will skip Pi-hole entirely. The fix is a firewall rule on your router that intercepts all DNS traffic and redirects it to Pi-hole, though that’s an advanced step you can tackle later.

How much of my network traffic is actually ads and trackers?

It varies, but it’s usually more than people expect. Adding curated blocklists from a source like the Firebog Tick List can meaningfully increase what gets caught — one real-world example in this guide went from 12% to over 22% of all queries blocked.

Scroll to Top