adguardhome-sync

adguardhome-sync

Welcome back to the Selfhosters Blog! Today, we’re diving into an awesome tool for anyone using multiple instances of AdGuard Home on their network: adguardhome-sync. If you’ve ever wished your configurations could be effortlessly synchronized between different AdGuard Home setups, then you’re in for a treat.

What is adguardhome-sync?

adguardhome-sync is a lightweight tool designed to synchronize settings between multiple AdGuard Home instances. This makes it incredibly useful for those managing several devices, or operating in high-availability or failover configurations. Built and maintained by the great folks at LinuxServer.io, this Docker image helps you keep your DNS configurations in sync without the hassle of doing it manually.

Why Use adguardhome-sync?

  • Simplified multi-instance management
  • Sync upstream DNS servers, filter lists, rewrites, and more
  • Lightweight and dockerized for easy deployment
  • Supports one-way or bi-directional syncing

Setting It Up

Thanks to Docker, setting up adguardhome-sync is a breeze. Here’s a step-by-step guide to spin up your own instance.

1. Prerequisites

  • Running Docker and Docker Compose
  • Multiple AdGuard Home instances running
  • Admin access and tokens for each server

2. Sample Docker Compose

LinuxServer.io provides an excellent sample docker-compose file. Here’s a basic example (visit their documentation for more advanced usage):

version: "3.8"
services:
  adguardhome-sync:
    image: lscr.io/linuxserver/adguardhome-sync:latest
    container_name: adguardhome-sync
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - ./config:/config
    ports:
      - 8080:8080 # Sync WebUI Port
    restart: unless-stopped

3. Configure Sync Settings

Once it’s up and running, head over to http://your-server-ip:8080 to access the adguardhome-sync web interface. From here you can:

  • Add your primary (master) and secondary (target) AdGuard Home instances
  • Input authentication tokens and server addresses
  • Select which data you want to sync (DNS settings, filters, rewrites, etc.)
  • Choose the sync direction: push, pull, or both
  • Schedule sync intervals or sync manually

Use Case Scenarios

Some great examples of where adguardhome-sync shines:

  • Failover Setups: Keep secondary AdGuard Home instances in sync in case your primary goes down.
  • Multiple Location Networks: Seamlessly propagate DNS settings across geographically distributed networks.
  • Segregated Networks: Maintain consistent redirection rules and filters across VLANs or tenant environments.

Where to Go Next

Head over to the official LinuxServer documentation page to explore more configuration options, environment variables, and usage tips.

Whether you’re running a small home lab or managing multiple DNS servers for an office network, adguardhome-sync is a must-have tool in your selfhosting toolbox.

Happy selfhosting, and I will see you in the next post!

Leave a Reply

Your email address will not be published. Required fields are marked *