Linux

Where Does Pi-hole Store Its Config and Blocklists?

Pi-hole keeps blocklists, settings and query history in /etc/pihole, with version 6 moving config into a TOML file.

Last updated

Almost everything Pi-hole knows sits in one directory. Adlists, the gravity database of blocked domains, the long term query database, DHCP leases, and the settings files share /etc/pihole.

Version 6 reshuffled the settings layer into pihole.toml while keeping the databases where they were, which dates half the tutorials online. Docker installs map this directory to a host volume, so upgrades and reinstalls survive as long as the volume does. Back up the directory and you back up the whole filter.

Where Pi-hole stores this, by platform

Linux
/etc/pihole/

pihole.toml holds v6 settings, gravity.db the blocklists, pihole-FTL.db the history. Docker installs map this path to a host volume worth backing up.

Frequently asked questions

Where did setupVars.conf go after upgrading?

Version 6 consolidated settings into pihole.toml, leaving setupVars.conf behind. Gravity.db still holds the blocklists and pihole-FTL.db still holds history. Back up the whole directory and both eras travel together.

How do I rebuild the blocklist database?

Run pihole -g to rebuild gravity from your adlists. The web UI exposes the same update under Tools. A corrupt gravity.db heals this way without touching the rest of the config.

Notice an outdated path? Let us know.