This project has been made to sync full v6.x configuration (teleporter) from one pihole (master) to replicas (slaves)
- Full sync: Use Pi-hole Teleporter for full synchronization.
- Cron schedule: Run on chron schedule.
services:
pihole-sync:
image: olivierprotips/ph-sync:latest
container_name: ph-sync
environment:
- PIHOLE_MASTER=http://pihole.master|password123
- PIHOLE_SLAVES=http://pihole.slave1|password123,http://pihole.slave2|password123
- CRON_SCHEDULE=0 * * * *
- TZ=Europe/Paris
restart: unless-stoppeddocker run --rm \
--name ph-sync \
-e PIHOLE_MASTER="http://pihole.master|password123" \
-e PIHOLE_SLAVES="http://pihole.slave1|password123,http://pihole.slave2|password123" \
-e TZ="Europe/Paris" \
-e CRON_SCHEDULE="0 * * * *" \
olivierprotips/ph-sync:latestYou can use ph-sync.py directly than create a cron job manually. Remember to change PIHOLE_MASTER and PIHOLE_SLAVES in py script.
| Name | Exemple | Description |
|---|---|---|
| PIHOLE_MASTER | http://pihole.master|password123 | Specifies the primary Pi-hole configuration |
| PIHOLE_SLAVES | http://pihole.slave1|password123,http://pihole.slave2|password123 | Specifies the list of replica Pi-hole configurations |
| Name | Default | Description |
|---|---|---|
| CRON_SCHEDULE | 0 * * * * | Specifies the cron schedule for synchronization |
| TZ | UTC | Specifies the timezone for logs and cron |
- Add https support
- Add "first start at launch" environment variable
- Add next launch in logs
- Add dates in logs