• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Pihole Build Thread - A Complete Walkthrough

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
Joined
Dec 13, 2005
Location
Right Here Right Now
Howdy y'all. Doing a complete Pihole build thread. Figured this would be a good place to put it.


I realize this is real basic for many here, but using it as a walkthrough/guide for the curious.


For starters. My experience, I’ve done this once before. And in all honesty it wasn’t that bad. I have a basic Linux understanding – I used it in college, I used it at work, but it was basically low level. 3/10. I always had someone to ask.


Just like setting up a Pihole, there’s always someone to ask.


For hardware, you’ll need starters. Now this all comes down to what you have, and what you’re using. In my build I’m using a Raspberry Pi Zero 2 W. I’ve used the previous, non-wireless model, a Rpi Zero, and it worked flawlessly. When used just as a Pihole, there really isn’t much overhead.


So in my case, required hardware is -

-The Raspberry Pi Zero 2 W
-Case
-USB A to microUSB cable for power (depending on Pi model)
-USB wall power supply (doesn’t need to be high end)
-MicroSD card (The smallest you can find. 16-32GB is more than enough if using this for only a Pihole.)
-USB OTG cable (only if using a Pi 0, for install only)
-HDMI adapter and cable (model depending, for install only)
-Keyboard and monitor (for install only)
-USB to mSD converter (for loading OS only, alternatives can be used)

Now most of this doesn’t need to be too high end. It won’t draw much so you don’t need a 5V 4A supply, and it won’t put lots of writes to the mSD card so you don’t need an endurance model. When looking for bargains you can probably do this from absolute scratch for close to or under $50 plus shipping, minus the keyboard and monitor.

Installing the OS

The *Nix install. Big. Scary. Used to be one of the biggest turnoffs for the Linux novice. But don’t worry, it’s gone from a hardcore slalom of what’s-what to actually pretty straight forward. Still a little complex, but if you’ve ever installed a Windows 98 program you’re win95% of the way there.

Bad joke.

So for most RPi installs I stick to Raspbian. It’s solid, straightforward, and being the most popular RPi OS at the time of writing this, most project guides will be tailored towards it. For my Pihole, I go with Raspbian Lite.

Why Lite? Because this will be almost purely a Pihole. And that means after the initial OS installation, the system will run headless – no monitor or keyboard hooked up. Raspbian Lite doesn’t have a GUI, which cuts down on storage & RAM needs.

For anyone who hasn’t done much Linux Command Line Interface (CLI) work, don’t worry. The Pihole software itself has a web UI, like your router, so this is a good time to learn the basics without getting tangled in a new project as well.

So at the time of writing this, the latest release is the 10-10-2023 Bookworm distro. I played with their homegrown installer and it only has legacy releases, in this case the one from May.

An alternative I have used balenaEtcher, a small program used for writing OSes to flash drives and mSD cards. It picks up the .iso from Raspbian’s site, as well as the little 32GB mSD card from the local MicroCenter. Grabbed two for $8 total, and using a cheap USB adapter I got off Amazon. Honestly at 11-12MB/s writes, I’m impressed.

That will be it for the first post. I had the USB OTG adapter on my MC order, but upon getting home, it wasn’t in the bag. Wondered why it was cheaper than the quoted price…

I will run back over tomorrow.

Update

It's dangerous to go alone! Take this!

IMG_20231203_180642129.jpg

Turns out MC's inventory was off. Even though they had one microUSB OTG adapter left in stock, no dice. Upside Amazon has them for $4, downside just got it. Likely won't get to the actual install today, have to head into work early tomorrow.
 
Last edited:
Finally got a chance to try this thing. Broke out my old LG monitor and Das Keyboard from college. Tossed the mSD card in the RPi and the RPi in the case, wired everything up and...It lives! Got a blue dialogue box about generating SSH keys (seems a little early for that...), then the Raspbian logo, some scrolling lines of POST, and...now it's unresponsive...? Monitor went to sleep and nothing from the keyboard. Ok, hold on.

Quick search keeps looping back to the Raspbian homegrown installer.

This will take some hot and heavy head-on-desk action, posting this now to say I haven't forgotten this thread and will update when I start leaving bloody forehead prints on my desk.
 
So there's a suspicious red smear on my desk but finally got it up and running. Turns out I was trying to do it the hard way.

Ended up doubling back to the Raspbian homebrew installer, which has now been updated to include the 12-05 Raspbian release. Their installer includes the option to load in wifi login info, enable SSH, and set up a custom logon profile while loading the image to the mSD. After reloading Raspbian lite ~5 times due to this dang PEBKAC error that kept popping up I got it logged onto my network and was able to connect over SSH.

At this point I set the Pi to a static local IP in the router. It's rare that the DHCP server will bounce around a device, but just to play it safe.

Now, you can install pihole. As mentioned, it's really straight forward. just one command line entry -


It'll download the required files and start the installation process, asking a few questions. I recommend letting it install the webserver to give access to the web UI, just for a bit of ease-of-use down the line.

After the install entering

pihole -a -p

In the command line will allow changing the pihole password.

The semi-last step is setting the pihole as the local DNS. This can either be done in the router, which will let most devices set to "automatic" and they'll get the pihole IP automatically. Or it can be manually set at the device level.

The actual last step is optional. The blocklist that's loaded with pihole is decent, but you can load custom domains or add other maintained lists through the web UI. I recommend only adding one or two at a time so if your favorite PC support forum suddenly breaks, you know what caused it.
 
Back