Skip to main content

Intsalling Pi-Hole on Raspberry Pi

In this guide, I will guide you through how to set up Pi-Hole for your network. Because Pi-Hole is very resource efficient, it can run on any version of Raspberry Pi. You can even run it over Wi-Fi on a Raspberry Pi Zero!

Prerequisites

A working Raspberry Pi with Raspberry Pi OS on it.

Install Pi-Hole

The developers at Pi-Hole project have a simple one line install script for installing Pi-Hole. Enter the following command to start the installation process:

sudo curl -sSL https://install.pi-hole.net | bash

Screenshot 2021-05-11 223647.png

Follow through the steps to continue with the installation.

Screenshot 2021-05-11 223723.png

Screenshot 2021-05-11 223736.png

Screenshot 2021-05-11 223747.png

For the upstream DNS provider, you can set this to any DNS provider you want. I personally use Cloudflare DNS 1.1.1.1 and 1.0.0.1 as Cloudflare DNS are known to be more privacy focus than the other DNS providers.

Screenshot 2021-05-11 223814.png

Pi-Hole comes with one default block list now days, so keep it and continue on.

Screenshot 2021-05-11 224434.png

I usually keep both IPv4 and IPv6 on. You can deselect the IPv6 option if you do not run an IPv6 network.

Screenshot 2021-05-11 224451.png

Screenshot 2021-05-11 224525.png

Screenshot 2021-05-11 224545.png

Screenshot 2021-05-11 224600.png

Screenshot 2021-05-11 224612.png

Screenshot 2021-05-11 224623.png

Screenshot 2021-05-11 224634.png

Screenshot 2021-05-11 224858.png

That's it! Pi-Hole is now installed.

Reduce disk writes

If you are running Raspberry Pi OS on a microSD card, you may want to adjust the following parameter to reduce the number of writes Pi-Hole does to the local storage.

Use your preferred text editor, open the /etc/pihole/pihole-FTL.conf file.

Add the following lines to the file, and save.

DBINTERVAL=60  #Writes to SQLite DB after this many minutes
MAXDBDAYS=14   #Caps the max days of data in DB

Screenshot 2022-11-01 202641.png

You can proceed to my other guides on Pi-Hole to start configuring and using Pi-Hole for your network.