Sync multiple Pi-Hole Configs

,

For my home network, I run Pi-Hole in docker containers in separate hosts. Whenever making a change such as creating a local DNS entry on one Pi-hole means logging into the other Pi-hole and making the same change, not ideal. So I’ve tried looking for a solution to this. I did give Gravity sync a go however seemed a little hard to get going. Doing my Google search I also stumbled on Orbital-Sycn on GitHub which seems to do the same thing albeit much easier to configure and get going.

Using Orbital sync, it behaves similar to a HA pair where one becomes the primary and the config is synchronised to the secondary nodes. It was super simple to get going, making sure that it was on the correct docker network so it can see all the Pi-Hole containers in my network I then just creating the additional container using the docker compose file below.

version: '3'
services:
  orbital-sync:
    image: mattwebbio/orbital-sync:1
    environment:
      PRIMARY_HOST_BASE_URL: 'https://pihole1.home.lab'
      PRIMARY_HOST_PASSWORD: 'supersecretpassword'
      SECONDARY_HOSTS_1_BASE_URL: 'https://pihole2.home.lab'
      SECONDARY_HOSTS_1_PASSWORD: 'supersecretpassword'
      INTERVAL_MINUTES: 5

Replace the environment variables with settings for your setup. Based on this compose file, orbital-sync connects my two Pi-Hole containers and synchronises them every 5 minutes.

Additional configuration variables can be found on the CONFIG page on the orbital-sync GitHub.


Leave a Reply

More Posts

Enable the Intel 82579V Giagbit NIC on Server 2016

An old draft I’ve had for a while, just posting for posterity and safe keeping. So I’ve done a few upgrades to my VM Host machine and decided to go up to Windows Server 2016, once installed and at the desktop, I found my onboard LAN port wasn’t coming up, so I downloaded the driver […]

How to protect all existing Organizational Units (OUs) in your Active Directory domain from Accidental Deletion by using PowerShell

We recently took on a new hire, although I was confident in their ability in managing Active Directory I wanted to take an extra step in protecting Organizational units from deletion.  I was sure that I could do this quickly using PowerShell instead of right-clicking each of our 80 odd OUs and going into their […]

How to quickly Document Conditional Access Policies into PowerPoint

I was recently engaged to review a organisation’s Entra configuration around Password Security and their Conditional Access policies. Now I’ve seen tenants with the number of policies ranging from a handful to hundreds of policies over the years, these guys had about 50, which is still quite a few to go through by hand. Now […]