Skip to content

Updating and Restarting

Scope: the three kinds of "update" a Pi-hole household meets — new blocklist data, new software, and new settings — what each one actually does, and the restart semantics the lab tripped over so you don't have to. The settings parts were exercised; the software-update parts belong to the full install and are marked.

Update one: gravity (the data)

Your blocklists change constantly; gravity (chapter 3) re-downloads and recompiles them on a weekly timer a full install sets up for you, and on demand whenever you ask (pihole -g, or the interface's Update Gravity). A healthy rhythm needs no attention. Two things worth knowing: a list that vanishes from the internet gets reported in the gravity output rather than silently emptying your protection, and a fresh gravity is also how you find out whether a suddenly-broken site is a new false positive — check the log (chapter 6) before assuming your Pi-hole "broke the internet". The lab could not run gravity (its script is core, not engine — chapter 3 has the captured Gravity failed), so the claim here is about the mechanism as documented, while everything about the compiled result's behaviour is chapter 3's proven material.

Update two: the software [full install]

pihole -up updates Pi-hole itself — engine, core scripts, and web interface — checking each against the project's releases. Practical advice that survives every version: update deliberately, not automatically, because the house's DNS is down for the restart in the middle and because the one morning you need the network flawless is the morning an unattended update chooses you. Read the release notes when a major version lands; v6 itself was a ground-up change (one binary, one config file, the API this guide uses) and rewarded the people who read first. The engine's own version is always one command away:

$ pihole-FTL --version
v6.8

Update three: settings, and the disable switch

Settings are the update you'll make most, and they are mercifully undramatic: list and group changes through the interface or API apply to new questions as they arrive — the lab added rules mid-flight and the very next digs obeyed them (chapters 3 and 5), cache ghosts aside. The single most household-famous setting is the big switch, and it was exercised both ways (transcript t06): blocking disabled through the API, and the name gravity had refused all afternoon simply wasn't refused anymore; blocking enabled, and the same name went back to 0.0.0.0:

$ curl -X POST /api/dns/blocking {"blocking":false}
{"blocking":"disabled", ...}
$ dig ... ads.specimen.test ...   (no refusal)
$ curl -X POST /api/dns/blocking {"blocking":true}
{"blocking":"enabled", ...}
$ dig @127.0.0.1 -p 8053 ads.specimen.test A +tcp +short
0.0.0.0

The switch accepts a timer ("off for five minutes") for the classic one-site-breaks diagnosis, and the pihole disable/enable commands are its CLI form. Use it as a diagnostic, not a lifestyle: if a site only works with blocking off, the fix worth keeping is an allowlist entry for the one name in the log that the site actually needed (recipes, chapter 10).

Restarting, and the lesson the lab paid for

Two different restarts exist and confusing them is the chapter's cautionary tale:

  • Reload — reread the lists and clear the cache, engine stays up. This is what most changes need, and most apply without even this.
  • Restart — the whole FTL process stops and starts. Sessions, cache, and in-flight questions end; the long-term log persists (the startup log shows it being imported back, transcript t07).

The lab triggered the API's restart action on a bench with no service manager — and FTL terminated cleanly and stayed down, because a restart action means "exit, and trust your supervisor to relaunch you", and the bench had no supervisor. On a real install, systemd is that supervisor and the restart completes in seconds; the lesson generalises: Pi-hole expects to be run by something that restarts it, so run it that way (the installer and the container both arrange exactly this), and after any restart, prove answering with one dig before declaring victory.

Backups deserve one paragraph: Pi-hole's Teleporter (in the interface, full install) exports your settings, lists, groups, and local records to one file — the whole personality of your install, minus the query history. Take one before a major update and after any session of rule-tinkering you're pleased with. The lab's equivalent is smaller and sadder: its personality is examples/ in this repository, kept in files, which is the habit Teleporter exists to spare you.

Check: three updates, three mechanisms — gravity for data, pihole -up for software, the API/interface for settings — and a restart is a process exit that someone must be charged with undoing. Chapter 9 ends the argument honestly: what all of this cannot do.