Skip to content

Installing Pi-hole

Scope: the shapes Pi-hole comes in and how they honestly differ, what it needs, and the step that decides whether any of it matters — getting your network to actually ask it questions. The installer and container routes are described from the project's documentation; the bare-engine route is the one the lab ran.

The decision under the decision

Pi-hole must be always on and at a fixed address. Every device in the house will be told "ask that box", and the house's internet manners depend on it answering at 3 a.m. as happily as at noon. That argues for the classic home: a small, frugal, always-plugged machine — the Raspberry Pi the project is named for, a spare mini-PC, a virtual machine or container host you already keep running. It argues against your daily laptop. The box also needs a static IP address on your network (set by a router reservation or configured on the box itself), because a DNS server whose address wanders is a house whose names stop resolving.

Performance is rarely the question. DNS questions are tiny and the engine is light; the lab's FTL answered from a shared sandbox without effort, and FTL's own statistics reported its replies in fractions of a millisecond. Judge a candidate box by reliability and power draw, not speed.

Shape one: the installer (most people)

On a supported operating system (the project publishes the list; Debian and Ubuntu and their Pi variants are the home turf), the standard install is one command run as root:

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

What it does, in the open: installs the FTL engine and the core scripts, creates a pihole user, fetches the web interface, sets up a systemd service, builds the first gravity database from a starter blocklist, and asks you the few questions that matter — which upstream resolver, whether to install the web interface, what to log. It ends by setting an admin password and telling you the address of the web interface. Two honest notes. Piping a downloaded script into a root shell is a real trust decision; the project publishes the script for reading first, and an alternative install from the git repository is documented for people who prefer it. And the installer is a system change — packages, a user, a service — which is exactly why this guide's sandbox didn't run it: the bench keeps its experiments inside the lab. On your own box, that trade is the normal one.

Shape two: the container

The project publishes an official image (pihole/pihole), typically run with Docker and both the DNS and web ports published, your configuration kept in a mounted /etc/pihole volume so it survives the container. This suits households already running a container host, and it isolates Pi-hole's system footprint to almost nothing. The honest costs: port 53 on the host must be free for the container to claim (a host running its own stub resolver can make this a small fight), and you now maintain the container's updates alongside Pi-hole's (chapter 8). This sandbox had no Docker daemon, so the route is documented here, not benchmarked; the engine inside the image is the same FTL the lab ran.

Shape three: the bare engine (the lab)

FTL is a single self-contained binary, and running it directly is a legitimate way to learn what Pi-hole is underneath — it is this guide's lab, and a fair preview of the moving part every other shape wraps:

  1. Download the binary for your architecture from the FTL project's releases, with its checksum file, and check one against the other. The lab's:

$ sha1sum pihole-FTL 212b1e42f1d970e8d61cdb25f6a19e1668826e8f pihole-FTL

  1. Give it its config directory and ask it to manage its own settings — the same command the later chapters use as a screwdriver:

$ pihole-FTL --config dns.port 8053 8053

The first --config call writes the full commented /etc/pihole/pihole.toml. The lab set its ports, an upstream, two local names, and a web password this way; examples/pihole-lab.toml keeps the resulting settings.

  1. Supply the one piece the engine doesn't create — the gravity database — from the project's published schema, or accept a blocklist-free resolver until a full install provides it (the lab's assembly is written up in examples/lab-notes.txt).

  2. Start it, and test with dig before pointing anything real at it (chapter 1's three questions are the test).

What the bare route lacks is everything around the engine: no pihole command, no web interface files (the engine redirects /admin/ to a login page it cannot serve — transcript t03 shows the seam), no gravity script, no service manager keeping it alive. As a way to run your house it is the wrong shape. As a way to understand the thing, it is unbeatable, and the rest of this guide is written from it.

The step that matters: being asked

However it was installed, Pi-hole does nothing until devices ask it questions. There are three ways to arrange that, in descending order of sanity:

  • The router's DHCP setting (the normal way): your router hands out addresses and settings to everything on the network — including "your DNS server is…" — so set that one field to the Pi-hole's address and the whole house follows, device by device as leases renew. One setting, every device, and undoing it is the same setting back.
  • Pi-hole as the DHCP server (chapter 7): turn the router's DHCP off and let Pi-hole hand out addresses too. More moving parts, real benefits for naming and per-device rules; a decision to make on purpose.
  • Per device, by hand: every modern OS lets you set a DNS server manually. Fine for testing one laptop before committing the house; misery as a permanent plan, and anything you can't configure (the TV) simply never joins.

A consequence worth planning for: the Pi-hole becomes a small piece of critical infrastructure. If it is down, names don't resolve and the house concludes the internet is broken. Chapter 8 covers keeping it updated without drama; the troubleshooting chapter covers the five minutes after it stops. Some households run a second Pi-hole as the router's secondary DNS — know that many devices treat "secondary" as "use whichever", which can quietly route questions around your filter; a backup is a design, not a checkbox.

Check: name the three things a full install adds around the FTL engine — the web interface files, the pihole command, and gravity — and the one router setting that puts the whole house behind it. Chapter 3 opens the list machinery itself.