Ads are increasingly difficult to avoid on streaming services these days. While many services do let you pay extra to go ad-free, it's just not realistic for most of us to pay that premium every time, given how fragmented movie and TV catalogs are. You could easily end up spending more than you would for an old-school cable package -- not that HBO or Paramount would mind.
What is a Pi-hole?
The shotgun approach to ad blocking
The simplest explanation is that a Pi-hole is a Linux-based domain blocker, domains being the web addresses where many forms of content live. Specifically a Pi-hole acts as a Domain Name Service (DNS) proxy, giving you the option of blocking some domains outright. Because many ads are served from the same sources, blocking their domains kills the ads without necessarily interrupting the rest of what you're trying to view.
This might sound like some of the blocking tools you're already used to on your phone, tablet, or computer, but the difference is that a Pi-hole is meant to be universal. That is, it can filter the traffic for every device on your network, even ones that wouldn't normally have that level of control, such as smart TVs and game consoles. It's on a completely different level from something like the ad-blocker plug-ins you might use for your web browser. Some people will even use Pi-holes to control content beyond ads, like "adult" sites they're worried about kids or teenagers having access to. This is possible because of the ability to whitelist or blacklist individual domains, not just known ad networks.
The tech won't work with some streaming services, the question being whether they deliver ads from the same domain(s) as regular videos.
As mentioned, the tech won't work with some streaming services, the question being whether they deliver ads from the same domain(s) as regular videos. The biggest gap is YouTube -- something acknowledged by the developers of the Pi-hole project -- but there are conflicting accounts about other services, such as Netflix. It's possible that with some services, you'll continue to get some ads, but not others.
Any reduction in ads is going to be beneficial, and not just for saving time and mental bandwidth. There are also literal bandwidth concerns, since every ad has to be temporarily cached on a device to play. These downloads can affect overall speeds on your network, and count against data caps if you're still stuck with a limited internet plan.
I should add that while you will almost certainly need to buy hardware, the associated software is free and open-source. Once you've got a Pi-hole server running, you may never need to spend anything more on it unless the hardware fails unexpectedly.
How to get started building a Pi-hole
Building a server
To begin with, you'll need some sort of Linux-based server device with at least 2GB of free storage and 512MB of RAM. This is why it's called a Pi-hole, in fact, because the ideal device is a Raspberry Pi 4 or 5, which is far cheaper than a conventional Linux PC. You can buy a dedicated Pi-hole kit if you want to ensure you have all the necessary parts and cables, but any kit with Raspberry Pi OS pre-installed will have the rudiments to get you going.
Technically, the Pi-hole software will also work with Alpine, Armbian OS, Debian, CentOS Stream, Fedora, and Ubuntu. All Pi-holes require a static IP address (a DHCP reservation will work). You may also need to change some port, firewall, and IP table settings on your server. Check out the official prerequisites guide for more information.
For the purposes of this guide, I'm going to assume you're using Raspberry Pi OS. There's honestly no reason to make things more complicated. Indeed, if you're already running a Linux server on your network, you probably don't need my help to set any of this up.
Some additional hardware notes -- with or without a prefab kit, your Raspberry Pi will need an Ethernet cable, a micro-HDMI-to-HDMI cable for video output, and some sort of mouse and keyboard combo to actually navigate the OS. You should be able to temporarily switch your regular computer's controllers over. Remember, once the Pi-hole is active, you may not need to touch it again for a long time.
Installing the Pi-hole software
The vast, vast majority of people wanting to install the software should take advantage of the following terminal command (no period on the end): curl -sSL https://install.pi-hole.net | bash. While this might feel intimidating if you're new to Linux, this entry actually triggers a fully automatic installation, closer to what you might be used to on a Mac or Windows PC. All you'll need to do is answer a few questions during the process and follow any instructions. If you're unclear on anything, there's an online manual that will fill in the details.
There are three alternate installation options, one being a Docker version if you'd rather use a container. You can manually download and run the conventional installer using these command lines:
wget -O basic-install.sh https://install.pi-hole.net
sudo bash basic-install.sh
The last one involves cloning the Pi-hole GitHub repository. There's no real reason to prefer this, but I'm including it for the sake of completeness:
git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
cd "Pi-hole/automated install/"
sudo bash basic-install.sh
Pointing your Wi-Fi router towards the Pi-hole
This is an essential step, since your Pi-hole needs to intercept domains before they reach your streaming devices. While it's possible to have computers selectively use the software, there's just no way to configure that on a smart TV or add-on media streamer.
What you need to do, then, is go into your router's DHCP/DNS settings page (or app menu) for the local area network (LAN), and set your Pi-hole as the only DNS server. If your DHCP/DNS options show three Static DNS lines, for instance, the first should have the local IP address for your Pi-hole, while the other two should be 0.0.0.0. A common IP for your Pi-hole will look like 192.168.1.250, but doublecheck what it's actually using.
While it's possible to have computers selectively use the software, there's just no way to configure that on a smart TV or add-on media streamer.
If your router doesn't support setting a DNS server, you can use the Pi-hole software's built-in DHCP server. You will need to disable DHCP on your router first, however.
Once you've got this far, you should be able to manage your Pi-hole at any time by navigating to pi.hole in a web browser, as long as it's connected to the same router as the server. If there aren't any specific technical issues (see the Pi-hole manual once again), your barrier against streaming ads should already be up and running.