Pi-hole released a new version – called v6.
It offers several benefits (see Introducing Pi-hole v6) as well as using an internal webserver. This leads to a change in the installation process within DietPi.
This blog post gives an installation description to see how easy it is achievable using DietPi.
The fresh Pi-hole v6 installation as well as an update installation from Pi-hole v5 to v6 is given.
The target is to have Pi-hole and Unbound installed and running. Unbound fits perfect to Pi-hole and offers a safer internet access from the local network on top.

This blog post is based on our older post and is an updated contents of it:
Pi-Hole & Unbound: How to have ad-free & safer internet in just few minutes.
- Overview
- Fresh installation of Pi-hole v6 / Unbound
- Update installation from Pi-hole v5
- Web interface of Pi-hole
- References
1. Overview

1.1 Pi-hole – Network-wide ad blocking
Pi-hole is an open source project, which can be installed for free, offering much more than a pleasant web browsing and gaming experience. It brings safety and gives ways to avoid ransomware attacks. It may be tempting to open a disguised email, which seems to be received from the bank, school, or a close friend who invites to click on a certain button or link. Pi-hole neutralizes these links making them ineffective.
The Pi-hole web admin provides an awesome dashboard to monitor various stats on ad blocking as well as configuring dialogs.
It relies on 3rd party lists, that block ads, trackers, malware link and other not desired queries from the entire network without needing to install anything on smartphones, laptops, media players, TVs, tablets or any other devices. It improves privacy and security for all network devices.
1.2 Unbound
Unbound is a fast and secure DNS server, primarily developed by NLnet Labs.
Essentially Unbound will look up a DNS query by asking TLD servers for DNS in a recursive manner. The major benefit is more security: There is no need to trust an upstream DNS traffic monitoring of an internet provider.
Unbound is helpful in many ways and here are a few advantages:
- Privacy – as Unbound is directly contacting the responsive servers, no server can fully log the exact paths the users are going resp. giving unwanted DNS query results. As an additional result, an upstream provider cannot monitor users DNS traffic.
- Validation – If a user wants to check the hostname of its bank, he wants to make sure that hostname matches its bank’s actual IP address and not some phishing site somewhere in the world.
- Caching – A local DNS reduces the traffic across the Internet by reducing load on authoritative name servers, particularly root name servers. DietPi configures both systems (Pi-hole & Unbound) to use caching. All the DNS queries are answered quickly, increasing the performance of any application that use DNS.
The only drawback is a lower performance for initial queries, as they need to traverse which takes time. But with caching, the speed of running any additional query increases a lot!
2. Fresh installation of Pi-hole v6 / Unbound
As mentioned, this post targets the combined installation of Pi-hole and Unbound. If Unbound shall not be installed, the Unbound installation can easily be omitted resp. skipped.
The prerequisite of this installation description is a DietPi base installation. See How to install DietPi for details.
Pi-hole and Unbound are installed via dietpi-software
. It should be called without arguments and comes up with its menu interface.
dietpi-software
Then, Browse Software has to be chosen. In the following dialog Pi-hole and Unbound have to be selected (pressing space to mark them for installation).

dietpi-software
The installation is then started via <Confirm>
(selectable with the <tab> key).
Pi-hole needs a static IP. DietPi assists setting it in the following dialog. Unless it is not already enabled, select OK.


dietpi-config
launch dialogIn dietpi-config
a static IP address resp. mask, gateway and DNS have to be set (in the example screenshot the IP address was set to 192.168.178.250).

dietpi-config
: Setting a static IP address (example 192.168.178.250)The static IP address has to be enabled via the selection of Apply.
After the static IP address is applied, dietpi-config
is exited. This automatically jumps back to dietpi-software
and the Pi-hole installation is resumed by selecting Install.

dietpi-software
The installation start then has to be finally confirmed via Ok.

The installation process installs Unbound (silently, without any necessary inputs) and afterwards Pi-hole.

During the Pi-hole installation, the static IP address is queried again. If already set like described above, just <Continue>
needs to be selected.

The following dialog can be omitted, it is automatically set to Unbound by the installation process.

The Pi-hole installation gives the option of loading a basic blocklist from Steven Black. We propose to use it by confirming with <Yes>
.

We also propose to leave the privacy settings for the web interface log output to its default which is perfect for local installations.

At last, the installation prints some information about the specialities of DietPi’s configuration of Pi-Hole.

That’s it: Pi-hole and Unbound are up and running!
3. Update installation from Pi-hole v5
Generally, after the update to Pi-hole v6 via pihole -up
from the command line, the DietPi-Update procedure needs to be run. This step uninstalls unnecessary software (web server, PHP) if possible.
In case that the system is already at DietPi v9.11 or higher, DietPi-Update needs to be re-run.
3.1 Case 1: Pi-hole update with DietPi < v9.11 (preferred)
In this case the first step is to update Pi-hole to v6 via
pihole -up
Afterwards, DietPi is updated via
dietpi-update
During the update, the the removal of existing web servers and PHP is queried. In case that no other software package needs them, the removal can be acknowledged (<Confirm>
).

3.2 Case 2: Pi-hole update with DietPi >= v9.11
If DietPi was already updated to a version higher or equal to DietPi v9.11, in the first step, Pi-hole is updated via
pihole -up
Afterwards, a DietPi update re-run can be achieved via
dietpi-update -1
This executes the DietPi update process with the removal of the web server resp. PHP once again.
Generally, there is no need to directly run dietpi-update -1
because the software update of the next DietPi version will do all necessary steps. Executing it directly after the update of Pi-hole has the advantage that the deinstallation of the web browser and PHP is during the time the user is aware of this process step.
4. Web interface of Pi-hole
DietPi v9.11 and higher bind the Pi-hole web interface to port 8089 during the installation/update procedure.
This is a slight change to before. The web admin interface can be accessed via port 8089:
http://pi-hole.fritz.box:8089/admin
This port might also be changed in the web interface to a different port number.
5. References
- Pi-hole website: https://pi-hole.net/
- Pi-hole discource channel: Introducing Pi-hole v6
- DietPi documentation – installation: https://dietpi.com/docs/install/
- DietPi documentation – Pi-hole software: https://dietpi.com/docs/software/dns_servers/#pi-hole
Thanks for posting this. I’ve been hesitant to upgrade since it seemed like extra work. From this post it really doesn’t seem so.
Especially since I am still on DietPi 9.10. And if I want to keep lighttpd around for another purpose I can now see how.