In this tutorial, we will look at how to install Pi-hole on Proxmox.
Pi-hole is a DNS sinkhole and installing it on Proxmox is a great place to run it as it’s generally online 24/7. We will use a script that walks you through the whole process of how to install Pi-hole on Proxmox. As with all scripts, make sure that you review it to ensure that you’re comfortable running it.
There are many different systems that you can run Pi-hole on, and it’s always a good idea to have more than one DNS server (for redundancy purposes), so check out our other Pi-hole tutorials if you’re interested in running it on another device!
Please note that you can install Pi-hole on Docker as well, and the process is the same as it is on OpenMediaVault. The only difference is that you’ll have to set up an LXC Container that will run Docker first, then can move on to the Docker/Portainer instructions.
How to Install Pi-hole on Proxmox
Before we look at how to install Pi-hole on Proxmox, we need to configure a Debian LXC Container.
Configuring a Debian LXC Container
Log in to Proxmox, select the storage location where you’d like to store the container template, select CT Templates, then select Templates.
2. Search for Debian, then select debian-11-standard and Download.
3. After the template finishes downloading, select Create CT to create a new container.
4. Enter a Hostname, then enter the Password you’d like to use. This password will be used to log in to the root user account. After all the settings have been specified, select Next.
5. Select the Template, then select Next to proceed.
6. Select the Disk Size for this container, then select Next.
7. Select the total Cores for the CPU, then select Next.
8. Set the total Memory, then select Next.
NOTE: Please keep in mind that this is the limit that this container can use.
9. Change the Network to use DHCP for IPv4 and/or IPv6 (unless you want to specify them manually OR are not using IPv6), then select Next until you get to Confirm.
NOTE: We are skipping the DNS section, but you can change these settings if you’d like to use a DNS server different than the Proxmox host.
10. Confirm the settings, then select Finish to create the container!
11. After the container starts, log in with the username root and password set in step four. Run the command below to update the system.
apt update && apt upgrade -y
12. After the system is updated, run the command below to install curl. We will use curl to run the script that installs docker.
apt install curl -y
13. After curl finishes installing, move on to the next section to install Pi-hole!
Setting up and Configuring Pi-hole
The steps below will show how to install Pi-hole on Proxmox using the Debian LXC Container created above.
1. Run the command below to install Pi-hole. Please review the script to ensure you’re comfortable running it before proceeding (I am not the creator of this script).
curl -sSL https://install.pi-hole.net | bash
2. Press Enter until you get to the Static IP address setup. It is extremely important for Pi-hole to have a static IP address. It’s recommended to set up a static IP on your router, but you can do it inside of the Debian operating system as well if necessary.
Just make sure that you set (or plan to set) a Static IP before proceeding.
3. Select an Upstream DNS Provider. The Upstream DNS Provider is where DNS requests (which are not found locally) will be forwarded.
4. Select Yes to use the default block list. Please keep in mind that this can be configured later, and you do not have to use this list if you don’t want to.
5. Select Yes to install the admin interface. This is how you’ll manage Pi-hole.
6. Select Yes to install the Admin Web Interface.
7. Query logging is a personal preference (this is what will determine if DNS requests are logged), so select Yes or No based on your preference.
8. If you selected yes above, you’ll be asked to determine the privacy of DNS requests. Select the option you’d like, then press Continue.
9. Pi-hole will now install! Give it a few minutes to ensure that it’s fully configured. When it’s complete, you’ll receive a confirmation page where you can select OK to proceed. Please note the password given so that you can log in to the web interface!
Connecting to Pi-hole/DNS Settings – How to Install Pi-hole on Proxmox
1. Connect to the admin Pi-hole webpage at one of the addresses below:
2. Pi-hole is now successfully installed and accessible. It is now necessary for you to point your devices to this DNS server. The first way of doing this is by configuring each device to use your newly created Pi-hole DNS server.
The second option is to configure your router to use your Pi-hole DNS server by default, which is my preferred method. Configuring the system this way forces all devices to automatically use this DNS server, which means any device connected to your router will automatically be using Pi-hole!
NOTE: The screenshot below is old, so using the information above, the IP address of the DNS server would be 10.2.0.196 as opposed to 192.168.1.197.
3. After you configure your systems to use Pi-hole, you have a few different options: you can add new blacklists, whitelist specific sites, add local DNS records, etc. At this point, Pi-hole is fully configured and should be blocking ads (assuming the block lists are configured properly)!
Conclusion: How to Install Pi-hole on Proxmox
This tutorial explained how to install Pi-hole on Proxmox. If you’re using Proxmox, running Pi-hole in an LXC Container is a great option as it’s incredibly minimal and Proxmox servers are generally online 24/7. When paired with a Proxmox Cluster and High Availability, you can even ensure that it’ll stay online if one of the Proxmox servers goes down!
Thank you for checking out the tutorial on how to install Pi-hole on Proxmox. If you have any questions on how to install Pi-hole on Proxmox, feel free to leave them in the comments!
This Post Has 2 Comments
Apologies for hijacking a mostly-irrelevant post, but your comments get closed real fast…
I did set up Docker (LXC) on my Proxmox and then Handbrake on it, mostly thanks to your guides, but now I’m at a loss.
While HandBrake seems to be running fine, I don’t have the slightest idea on how to actually put files there from my main computer (which is on Windows 7).
From what I gathered I could “switch” the Docker LXC to privileged and then enable CIFS and such, but I can’t say I like the idea (of privilged LXC, that is).
Any other possibilities, before I have to get rid of that HandBrake container (for lack of actual usability) ?
Unfortunately, the comments close after two weeks because I can’t keep up with them all. As for your question, you can get it set up but there are a lot of steps and they’re not really container related. Ultimately, the easiest process is to probably set up an SMB share on your PC, but that then requires you to mount the SMB share, configure the fstab file so it mounts on boot, then mount that path to the container.
There are a ton of great resources on how to mount SMB shares online, but the container setup in this scenario is just really adding the path – it’s all done on the OS itself.
Comments are closed.