User Tools

Site Tools


pi-hole:synchronize_multiple_pi-holes

Pi-Hole - Synchronize multiple pi-holes

A simple way to keep the configurations identical between multiple pi-holes.

Gravity Sync is a handful of core bash commands, that uses rsync to reach out to a remote host, copy the running gravity.db file that contains the Pi-hole blocklist, and then replaces the copy on the local system; running in the background.

Gravity Sync will not overwrite device specific settings such as local network configuration, admin/API passwords/keys, local hostfiles, upstream DNS resolvers, etc.

  • It will also not keep DHCP settings or device leases synchronized.

One Pi-Hole need to be designated as primary and one as secondary.

  • This primary is where all your configuration changes are made through the Web UI, doing things such as; manual whitelisting, adding blocklists, device/group management, and other list settings.
  • Gravity Sync will pull the configuration of the primary pi-hole to the secondary.
  • It will also bring over the downloaded blocklist files after a pihole -g update on the primary, so there is no need to reach out to all the blocklist hosts for updates after syncing.

The designation of primary and secondary is purely at your discretion and depends on your desired use case.


References

pi-hole/synchronize_multiple_pi-holes.txt · Last modified: 2023/04/27 16:00 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki