A (currently) quick and dirty utility to sync your Pi-hole v6 configuration to multiple Pi-hole instances.
The sync goes one-to-many. One main instance is specified and it's configuration is distributed to all other (secondary) instances.
- Syncs everything contained in Pi-hole's Teleporter backups
- Acquire app passwords for Pi-hole API
- Modify and add Pi-hole instances via CLI
I'm trying to provide pre-compiled binaries in the near future.
But for the time being, installation is only available via git clone
and cargo build
, so to install, run the following commands:
git clone https://github.com/deg0nz/pihole-sync.git
cd pihole-sync
cargo build --release
Note: On Debian, you may need to install
libssl-dev
andpkg-config
before building!
Note: The default config location is
/etc/pihole-sync/config.toml
, you need to specify--config /path/to/config.toml
via CLI, if you don't use the default path.
- Configure your main and secondary instances in
config.toml
. (Please refer to example config)- Leave the password free for now. You can generate one via the CLI command
pihole-sync app-password
(add--config /path/to/config.toml
if you don't use the default path ;)) - Add the printed password hash to your respective Pi-hole instance under Settings > Webserver and API > webserver.api.app_pwhash (Refer to Pi-hole API documentation for more information: https://ftl.pi-hole.net/master/docs/#get-/auth/app)
- Add the printed app password to the config.toml
- Leave the password free for now. You can generate one via the CLI command
- Run
pihole-sync sync
for running in sync mode- You can also run
pihole-sync sync --once
to run the sync once and exit.
- You can also run