Skip to content

Releases

v0.1.1 – Fix repeated DNS restarts on secondaries

Choose a tag to compare

@joshuapack joshuapack released this 02 Dec 00:19
8759f91

A bug-fix release. Everyone on v0.1.0 should update.

Fixed

  • Secondary Pi-hole's DNS could restart every interval. A Teleporter import always restarts FTL on the secondary. v0.1.0 started the gravity rebuild and the settings sync immediately afterwards, so they could hit FTL mid-restart and fail. Any failure then made the next run import again, which restarted FTL again, about once a minute.
    • piholesync now waits for the secondary to come back after an import or a settings change before its next step.
    • An import counts as done once it's applied. If the gravity rebuild afterwards fails, only the rebuild is retried, not the import.
    • After a failed sync, later runs no longer repeat the full sync.
  • App passwords failed with 403 ... (read-only). Pi-hole treats app-password sessions as read-only unless webserver.api.app_sudo is enabled. The error message now says how to fix it, and the README and example config document it.

Upgrade notes

If you use an app password, enable app_sudo on every Pi-hole, or switch to the web password. In a Pi-hole's docker-compose.yml:

environment:
  FTLCONF_webserver_api_app_sudo: "true"

Or in the web UI: Settings → All settings (expert mode) → Webserver and API → webserver.api.app_sudo.

No changes to config.yaml are needed otherwise.

Docker Compose:

docker compose pull && docker compose up -d

Binary: download the archive for your platform below and replace the old piholesync binary.

Good to know

Every gravity sync (a change to groups, adlists, domains or clients) restarts FTL on the secondary, so it stops answering DNS for a few seconds. That's how Pi-hole's import works. piholesync only imports when something changed on the primary, plus once per full_sync_interval (default 24h).

Full changelog: v0.1.0...v0.1.1

What's Changed

  • Wait for FTL restarts after imports; document app_sudo by @joshuapack in #2

Full Changelog: v0.1.0...v0.1.1

v0.1.0 – First release

Choose a tag to compare

@joshuapack joshuapack released this 01 Dec 23:01
efdf142

First release of piholesync, which keeps one or more secondary Pi-hole v6 servers in sync with a primary. Make changes on the primary's web UI, and they reach the secondaries within a minute.

What gets synced

  • Groups, adlists, allow/deny domains and regexes, and clients, including group assignments. These are copied with a selective Teleporter import, and gravity is rebuilt on the secondary when adlists change.
  • Settings from pihole.toml: by default the dns section, which covers upstream DNS servers, Local DNS records and CNAME records. Settings are compared key by key, and only the differences are sent.

Some things are never synced: the web interface password, port and TLS, DHCP leases, query logs, and host-specific keys (dns.interface, dns.listeningMode, dns.reply; you can change this list in settings.exclude).

Features

  • Detects changes by fingerprinting the primary every interval (default 1m). Adlist domain counts and other values that change on their own are ignored.
  • Pushes everything again every full_sync_interval (default 24h) to undo edits made directly on a secondary.
  • Supports more than one secondary.
  • -dry-run logs what would change without changing anything, and -once runs a single sync for cron or systemd timers.
  • Accepts web passwords or app passwords. ${VAR} in the config is filled from environment variables.
  • Reuses one API session per Pi-hole and logs out on shutdown.

Install

Docker Compose: the image ghcr.io/joshuapack/piholesync:latest covers amd64, arm64, armv7 and armv6. See docker-compose.yml and the README.

Binaries: download the archive for your platform below.

Platform File
Linux x86-64 linux_amd64
Raspberry Pi 3/4/5, 64-bit OS linux_arm64
Raspberry Pi 2/3/4, 32-bit OS linux_armv7
Raspberry Pi Zero / 1 linux_armv6
macOS (Apple Silicon / Intel) darwin_arm64 / darwin_amd64
Windows windows_amd64 / windows_arm64
FreeBSD freebsd_amd64

You can check your download against checksums.txt.

Requirements and notes

  • Requires Pi-hole v6. v5 has no REST API.
  • Settings set with FTLCONF_* environment variables in a Pi-hole's docker-compose.yml can't be changed through the API. If one differs between your Pi-holes, add it to settings.exclude.
  • This is an early release. Start with -dry-run, and after the first real sync check that groups, lists and domains appear on the secondary.

What's Changed

  • Add CI/CD pipelines and improve Docker/release setup by @joshuapack in #1

New Contributors

Full Changelog: https://github.com/joshuapack/piholesync/commits/v0.1.0