The PiHole project is a program meant to run on a Raspberry Pi which is described as "A black hole for Internet advertisements". Basically, it acts as a local network-wide ad and tracker blocker! This means that all computers connected to the same network as the Pi will have ads blocked automatically.
A little over a year ago I wrote about how to set up a PiHole. If you have not read that article head over here before continuing on this post.
This article is a quick update after successfully running the PiHole for over a year with some lessons learned and a few housekeeping items. There are a few tasks that need to be run infrequently to ensure that the system is running as efficiently as possible. By infrequently I mean that I have only had to run these maybe 2 or 3 times in the past year! Other than that the PiHole has been running very well with minimal maintenance.
Updating Block List
The block list is perhaps the heart of the PiHole configuration. This is the list which the system checks domains against to determine if they should be blocked.
For the most part, this list can be left at the default which the install process sets up. However, the community has a lot of more updated lists which can add many more domains to the block list. The more domains in the list the most ads and trackers that will be blocked.
A great resource for finding new blocklists and getting updated lists is The Big Blocklist Collection. There are many community-generated lists here and just adding a few of them will bump the blocklist up to millions of domains.
Linked from the collection is an article here on how to add blocklists to your PiHole. The process is pretty easy since the list is just a plain text file of newline-separated domain names.
Removing Dead Domains from Blocklist
After adding a bunch of domains as shown above, eventually, the list domains will either no longer respond or give 404 not found exceptions as the lists are removed. After a year of running the same blocklist, I had 6 lists out of about 30 that no longer worked. Now, this is not an issue as the gravity update process (that pulls down the domains from the lists into the PiHoles database) will retry these domains then move on. However, having a bunch of retries will slow down the update process. To remove these dead lists simply run the gravity update process, either through the admin GUI or the command-line, and then remove those lists. Simple!
During the update process look for list domains that return like the following:
Then head over to the GUI and remove that list from the blocklist registry:
After removing all of the dead lists click the "Save and Update" button at the bottom of the page. This will save the changes then run the gravity update process. Hopefully, this process should run faster now that it does not have to retry those domains.
At the bottom of the PiHole admin GUI, there is a footer that displays the current version installed. If these are red/yellow then there is an update available!
To install the latest update head over to the GitHub page here and follow the update directions.
One of the few issues that I have run in to during the past year was the Pi itself overheating. At one point I moved the Pi into a closet where my router is located so that it could be plugged directly in. This worked out well for a few hours but then the Pi kept shutting down. Eventually, the problem was discovered to be the Pi was overheating!
An easy way of checking on the Pi's temperature is through the PiHoles admin GUI. On the top left of the screen is a small status block with various metrics on the Pi. One of which is the current temp of the CPU.
As long as the fire icon next to the "Temp" label is blue then everything is running fine. If the icon changes to orange or red then the CPU is overheating and some action should be taken. In my case, I moved the Pi back out from the closet and onto my desk behind my desktop where the airflow was better. This combined with the AC and fans running keeps the Pi much cooler.
Transferring to another Pi
After the successful use of the PiHole project, I have set up Pi's on several other people's networks. The install process is so simple that this process is relatively quick. One useful thing is transferring the blacklist, blocklist, and whitelists from one PiHole install to another.
In the admin GUI there is a tab under the Settings page called "Teleporter" which is set up for just such a task.
On the existing PiHole click the "Export" button to download a tar gz file with the list files. Then on the new PiHole click the "Browse..." button then "Import" to upload that tar gz. This will set up the new PiHole with the same settings as the old PiHole.
Supporting the Project
The last thing I would suggest to keeping your PiHole running smoothly is to consider donating to the project. The project is completely open-source and relies on donations to keep going. On the GitHub page, there is a section that outlays how to support the project.
After over a year of successfully running the PiHole ad blocker, I have found a few tasks which can be used to make the most out of the system. These tasks need to be run very infrequently and on the whole I have had very few issues with it!