Phrases like “Domain Name System” and “DNS sinkhole” can make setting up Pi-hole sound like something complicated that requires a lot of technical knowledge. In fact, Pi-hole is fairly simple to set up, and you can have it up and running in 15 minutes. It’s one of the best introductions to the world of homelabbing.
What Pi-hole actually does
The magic of a DNS sinkhole
In simple terms, Pi-hole is a filter for your internet. You can use it to let through the things you want, such as the main content of websites, and block the things you don’t, such as ads and trackers.
The way that Pi-hole does this is via the Domain Name System (DNS). DNS is the phone book of the internet; when you type a web address into a browser, a DNS server looks up that address and returns the IP address for that website, which is what the browser uses to open it.
Pi-hole acts as a DNS sinkhole, which catches all these DNS requests and blocks the ones that match its blocklists or other filtering rules. When you open a web page, instead of the DNS request being sent to an external DNS server, it gets sent to your Pi-hole instead.
A web page will often make multiple DNS requests. As well as the request for the main page address, there may also be requests for useful things, such as embedded YouTube videos or web fonts, but also requests to ad servers to display ads on the page, or requests to tracking sites.
Pi-hole checks each address request against its blocklists of known unwanted domains, and if the address appears on the list, Pi-hole can return a null address, such as 0.0.0.0, instead of the real address. This means that the web page can’t load the content, since it doesn’t have the correct address, and the ads and trackers don’t load, leaving you with a more private browsing experience with fewer ads.
Pi-hole isn’t perfect. Sometimes ads are served from the same domain as the content, such as the ads that appear during shows on some streaming sites. Pi-hole can’t block these ads without blocking the main content, too.
- Brand
-
Raspberry Pi
- CPU
-
Quad-core 64-bit ARM Cortex-A53
The Raspberry Pi Zero 2 W is super tiny and super affordable, but it packs enough computing power for a variety of DIY projects. You can use it to create a handheld retro gaming console, for Klipper/Mainsail, a super compact home or media server, and more.
What you need to get started
You can run Pi-hole on almost anything
The beauty of Pi-hole is that it’s very lightweight, so you can run it even on modest hardware. A $15 Pi Zero 2 W is often enough to run Pi-hole for your home, blocking ads and trackers for any device that’s connected to your home network.
You don’t need to buy a new device, either. If you have a spare Raspberry Pi or an old laptop that’s not being used, running Pi-hole is a great way to put it to use.
You can also run Pi-hole on hardware you’re already using for other purposes. If you have a NAS, for example, you can run Pi-hole in a separate container without needing to buy a dedicated device.
I run Pi-hole on a cheap mini PC. Mini PCs are a great entry to the world of homelabbing; they’re relatively inexpensive, and you can run multiple services on the same device. I use the Proxmox virtualization software that splits my mini PC into multiple virtual computers, and I run Pi-hole in one of these containers, with other containers and VMs running services such as Home Assistant, Jellyfin, and Immich.
There’s one crucial thing that Pi-hole needs to work. It must have a fixed IP address on your network so that devices always know where to send DNS requests. You can use a DHCP reservation on your router to give Pi-hole a fixed IP address or set up a static IP directly on the hardware you’re using.
I ditched Google’s DNS for a $20 Raspberry Pi, and I stopped handing my web history to third parties
You don’t need Google’s 8.8.8.8: how to build a private DNS server for $20
The setup is a single command
It takes less than 15 minutes to get up and running
If you’ve put off trying Pi-hole because you were worried about it being too complicated to set up, then you should probably give it a try. Getting started with Pi-hole is as simple as entering a single command:
curl -sSL https://install.pi-hole.net | bash This starts an interactive wizard that walks you through the setup process. You need to select options such as which DNS server to use for any unfiltered DNS requests (Cloudflare is a good option for speed, while Quad9 is a good option for privacy and security), whether to use the default blocklist, and if you want to set up a web interface. Using the default list and setting up the web interface are recommended for beginners.
Once you’ve run through the wizard, Pi-hole is up and running. The final phase is to get your devices to use Pi-hole instead of their usual DNS server. To block ads across your whole network, you can change the DNS server that your router gives to devices via DHCP to the IP address of your Pi-hole; the exact method of doing so will depend on your router.
Alternatively, you can use Pi-hole with individual devices such as computers, tablets, and phones by using the IP address of your Pi-hole as the DNS server in the network settings on your device.
Why Pi-hole is the perfect first homelab project
You learn useful skills while solving a real issue
Pi-hole is an excellent option for a first homelab project. It’s fairly simple to set up in a short amount of time, it helps you learn about some basic networking concepts, and you end up with a usable service that has a clear and positive impact on your home network.
You should find that websites load with far fewer ads, but if you want to see the real impact of Pi-hole, open the web interface using the address and password from the final screen of the setup wizard. In the query log, you’ll see all the DNS queries that have passed through Pi-hole, including those it blocked and those it allowed through. You can quickly block or unblock domains using the Deny and Allow buttons.
If you’ve pointed your router at Pi-hole, you should find that you see fewer ads across your connected devices. Once you see the immediate benefits of running Pi-hole, you’ll wonder why you didn’t set it up sooner.
Pi-hole is just the beginning
Pi-hole is a great introduction to the benefits of setting up a homelab. Once you’ve got the bug, there’s so much more you can do. The real challenge is deciding what to start running next.


