Installing Pi Hole on Ubuntu

Raspberry Pi Jul 15, 2020

Following the use of a Raspberry Pi for my backups, I decided to go ahead and install Pi Hole on the same device. I've got nothing against content creators making money from their work.  I welcome it, as it means more content. But there are a lot of highly intrusive ads out there and I would like to make by browsing a smoother, less interrupted ride.

As I've already mentioned, I've got Ubuntu 20.04 installed on that particular Pi, so nothing too unusual for an installation.  The documentation for Pi Hole is pretty comprehensive, so I didn't envisage any issues.  As always, the best laid plans of mice and men often go awry.

The installation hit a hurdle pretty early on. I got the message "Error: Unable to update package cache." at the third check.  This wasn't looking promising. Fortunately, a quick web search of the issue found an AskUbuntu post (part of StackExchange) for "Explicitly accept change for PPA 'Label'. The relevant part of the topic is to run the following command:

sudo apt-get --allow-releaseinfo-change update

The installer ran successfully after that and gave a wizard for installing.  I accepted the defaults all the way through to make things fairly simple.

After being given the IP address and admin password for the dashboard, I moved on to the DNS settings to protect my devices. This wasn't as straight forward as I had hoped, due to the router provided by my ISP.  The "Advanced Settings" aren't at all advanced, so I couldn't set the DNS or DHCP server network wide to be the Pi.  Instead, I had to change each device I wanted protecting to use the Pi as the DNS server.

Now I can browse the web with significantly less adverts and pop-ups.  It's great, but also a damning indictment of the number of requests and adverts used by websites.  In the (roughly) 30 minutes I've had Pi Hole up and running, I've had it block nearly 400 requests across 2 devices.  Most of that time has been spent typing this up, and checking a couple of pages to make hits (some popular news sites).

Ultimately, installing Pi Hole is a great first project for someone at home, and fairly straight forward.  Totally worth it for less adverts, too.

It's worth noting that for those who play games on their phones, if the gateway is set to the Pi Hole, the in-game adverts stop working.  This can be both a blessing and a curse. For games where there's an advert after every level, it skips that whole fiasco of playing for 20 seconds, and having to wait 30 seconds to get to the next stage. You know, the games you uninstall after 5 minutes! For others where you opt to watch the videos for small upgrades, this may prevent you getting the upgrades.

Tags