adguardhome-sync
If you’re running multiple instances of AdGuard Home across your self-hosted environments, you know the pain of keeping configurations synchronized. That’s where adguardhome-sync comes in handy. This lightweight tool helps automatically sync configuration changes across all your AdGuard Home nodes — making multi-instance management a breeze!
What is adguardhome-sync?
adguardhome-sync is a Dockerized application that syncs settings between multiple AdGuard Home instances. Whether you’ve got a primary DNS server at home and another at a remote location, or you’re using AdGuard Home in a multi-container setup, this tool ensures all your blocklists, DNS rewrites, and settings stay consistent.
It’s perfect for:
- Home and travel routers
- Remote office setups
- Redundant failover servers
Setting it up with Docker Compose
To get started, all you need is Docker and Docker Compose. You can find the official example at LinuxServer.io Documentation. Here’s a basic example of a docker-compose.yml
file to get you going:
version: '3.8'
services:
adguardhome-sync:
image: lscr.io/linuxserver/adguardhome-sync:latest
container_name: adguardhome-sync
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- ./config:/config
ports:
- 8080:8080
restart: unless-stopped
Of course, update PUID
, PGID
, and TZ
to match your environment.
Configuring adguardhome-sync
Once the container is running, you’ll want to configure it by defining the upstream and downstream AdGuard Home instances. This is typically done via environment variables or through a config.yaml
file inside the /config
volume.
Here’s an example of a config.yaml
:
logLevel: info
primaryHost: http://primary-adguard:3000
primaryUsername: admin
primaryPassword: password
targets:
- url: http://secondary-adguard:3000
username: admin
password: password
This way, adguardhome-sync monitors your primaryHost
for changes and pushes configurations out to the listed targets. Easy peasy!
Running with Security in Mind
As always, make sure to secure your AdGuard Home instances and especially protect the API access with strong passwords. Consider placing them behind a VPN or reverse proxy with authentication for extra hardening when remotely accessible.
Conclusion
adguardhome-sync is a powerful yet simple tool that solves a real-world problem for selfhosters. Keep your DNS configurations unified across all your nodes with minimal hassle. It’s another step towards your fully automated, self-hosted dream home network!
Happy selfhosting, and I will see you in the next post!
Leave a Reply