Running Pi-hole in Docker on My Fedora Home Server

It’s another weekend, and that means another homelab project. For my latest project, I decided to attempt installing Pi-hole DNS to be used on my home network. In case you are wondering, Pi-hole is a DNS server specifically designed to block advertisements. Imagine it as the adblocker plugin that you can install on your Edge web browser, but much more powerful, as you can set it to block ads for your entire network or for any devices that point to that DNS. To begin with getting Pi-hole installed, I decided to go with a Docker image of Pi-hole and host it on my virtual machine that is running on Proxmox. Setting this up was seamless due to the amazing documentation that is hosted on the Pi-hole website, and also the fact that Pi-hole already has an official and maintained image file. After I got Pi-hole installed on my Docker image, the next task was to assign a static IP address. Because IP addresses constantly change, we need to have one that does not change. All I had to do here was get the IP address from my Proxmox virtual machine, then go into my router settings and designate that as a static IP. So I decided that to begin with installing Pi-hole, I wanted to use one of my existing virtual machines within Proxmox. What I didn’t want to do was create another virtual machine just dedicated to Pi-hole. I already have a Fedora Linux server VM running, so I thought to myself, why not use that? In order to not disrupt my other services on the virtual machine, I decided to go with Docker. What I really like about Docker is the ability to stop and run different Docker images at will. Plus, other system admins usually do the legwork to have the images optimized. Installation Half of the battle when it comes to homelabbing is doing your homework prior to the install. It doesn’t matter if you use Google, ChatGPT, or another platform. What does matter is that you find the resources that you need so that you are not running in circles trying to install what is needed. The first challenge that I faced was that my server did not have Docker installed. I fixed this issue by finding the documentation for installing Docker on Google. Getting it installed on the machine was seamless. I actually did not have Docker installed on my Fedora Linux server prior to installing Pi-hole, so my first step was to get that up and running on the server before I could even entertain installing Pi-hole on my machine. Activating Pi-hole Now I had Pi-hole up and running, but next came the decision on what to do specifically. Initially, I thought about setting the router to the DNS server, but this had some consequences because I am not the only one living in my household. Other members of the house enjoy reading, and if I set the router to the DNS, that would possibly disrupt one household member’s access to reading material, as some sites do not allow you to read if the advertisements are blocked. What I ended up doing was setting just the devices that I wanted to my DNS. That meant three devices in total: one being my main machine, second being my television, and third being my iPhone. Thankfully, Fedora has excellent documentation, and getting Docker installed on my virtual machine was a seamless and enjoyable experience. End Result My Pi-hole DNS has been running great all week with no issues detected. It doesn’t block every single advertisement, but it does block the ones that I find to be rather annoying, and that is the good part. When I need to turn off Pi-hole, it is a seamless experience, as all I have to do is run docker compose down. I’m hoping to see what comes from this virtual machine, with my plans to add more Docker containers to it, including Plex, in the near future. Time will tell.