Skip to main content

Install Pi-Hole 6 on Debian 12

As of 2025-07-16, the latest version of Pi-Hole is version 6, which brings forth significant changes to how Pi-Hole is installed. 

For starters, Pi-Hole 6 no longer uses PHP in its codebase, and comes with a built-in webserver that supports HTTPS out of the box. 

In this guide, I will show you how to install Pi-Hole 6 on Debian 12.

Prepare the Debian 12 System

As always, make sure your system is up to date.

sudo apt update && sudo apt upgrade -y

Screenshot_2025-07-16_002259.png

Install Pi-Hole 6

The Pi-Hole install script can be found at https://github.com/pi-hole/pi-hole 

In my previous guide. I used the one-line automated install method to install Pi-Hole. This method pipes the command striaght from the web to bash, which is a controversial method, as it does not show what is being run on your system. 

Instead, I will be using one of the alternative install method instead, which is downloading the bash script and then run it. 

wget -O basic-install.sh https://install.pi-hole.net

Screenshot_2025-07-14_212226.png

Run the install scrtipt

sudo bash basic-install.sh

Screenshot_2025-07-14_212623.png

The installer will start. Follow the prompts to continue.

Screenshot_2025-07-14_212246.png

Screenshot_2025-07-14_212259.png

Screenshot_2025-07-14_212316.png

Select the DNS server you would like to use. For my setup, I have Pi-Hole's upstream DNS set to Custom so that it can pointed to my pfSense, which in turn is pointing to Cloudflare and Quad9.

Screenshot_2025-07-14_212343.png

If you select Custom DNS, enter the DNS IP Address now. 

Screenshot_2025-07-14_212421.png

Review the Upstream DNS server setting.

Screenshot_2025-07-14_212433.png

The default Pi-Hole blocklist is the StevenBlack's list, as of 2025-07-16.

Screenshot_2025-07-14_212444.png

Select yes to enable logging for historical data.

Screenshot_2025-07-14_212452.png

Screenshot_2025-07-14_212459.png

That's it! Note down the temporary webGUI admin password. You will need this in order to login to the Pi-Hole webGUI.

Screenshot_2025-07-14_212524.png

If you have UFW enabled on the Debian system, make sure you have DNS and HTTP/HTTPS allow through. 

Screenshot_2025-07-14_220010.png

Now navigate to your Pi-Hole’s IP address in the web browser to access the web management portal. 

You will notice that the WebGUI now shows a banner for switching to HTTPS. This is one of the major chanegs in Pi-Hole 6 from Pi-Hole 5. 

Screenshot_2025-07-14_213038.png