I run six Pi-holes on three different networks at three different physical locations. I wanted all six Pi-holes to share the same blocklists, blacklists, whitelists, and regex files, but it was time-consuming to manually synchronize all of them.
I wanted to use Pi-hole's built-in web UI to manage only one set of lists on one Pi-hole -- and then securely synchronize an unlimited number of additional Pi-holes. I couldn't find an existing script that did exactly what I wanted... so I wrote one:
pihole-cloudsync allows you to use any Pi-hole on any network to act as the "Master" or "Primary." This is the only Pi-hole whose list settings you will need to manage using Pi-hole's web UI. The Primary Pi-hole then uses pihole-cloudsync in Push mode to upload its blocklist, blacklist, whitelist, and regex files to a private Git repository that you control (such as GitHub).
All other Pi-holes that you wish to keep synchronized use pihole-cloudsync in Pull mode to download the Primary Pi-hole's blocklist, blacklist, whitelist, and regex files from your private Git repository.
The script is designed to work with any Git repo that your Pi-holes have access to, but I have only personally tested it with GitHub.
Feedback, suggestions, bug fixes, and code contributions are welcome.