araelespinosa.dev
Open Source

dns-sync

One binary. All your DNS.

A lightweight alternative to OctoDNS built on .NET. A single compiled binary that synchronizes your DNS records across providers and zones — no Python runtime, no complex setup, no lock-in.

What it does

  • Single compiled binary — download it and run, nothing else to install or manage
  • Multi-zone support — manage multiple domains from a single config file, no duplication
  • Single source of truth — one zone file is reused across all your domains automatically
  • Multi-provider targets — sync the same records to Cloudflare, GCP Cloud DNS, and more simultaneously
  • Declarative YAML — describe desired DNS state, dns-sync reconciles the difference
  • Plan before applying — preview every record change before it goes live
  • Built on .NET — cross-platform binary for Linux, macOS, and Windows
terminal
# Download the binary (no installation required)
curl -L https://github.com/cl8dep/dns-sync/releases/latest/download/dns-sync-linux-x64 \
  -o dns-sync && chmod +x dns-sync

# Preview DNS changes
./dns-sync plan --config dns.yaml

# Apply DNS changes
./dns-sync apply --config dns.yaml

Feature spotlight

Multi-zone, single source of truth

Define your DNS records once. Deploy to every domain. Both example.com and example.eu point to the same yaml_source, so the same zone file is applied to all of them — no duplication, no drift.

dns.yaml — config

dns.yaml
providers:
  yaml_source:
    type: yaml
    directory: ./domains
  cloudflare:
    type: cloudflare
    api_token: ${CLOUDFLARE_API_TOKEN}
    account_id: ${CLOUDFLARE_ACCOUNT_ID}
  gcp:
    type: gcp_cloud_dns
    project: my-gcp-project

zones:
  example.com.:
    source: yaml_source
    targets:
      - cloudflare
      - gcp
  example.eu.:
    source: yaml_source
    targets:
      - cloudflare
      - gcp

domains/zones.yaml — records

domains/zones.yaml
# domains/zones.yaml
# One file. Applied to every zone.

www:
  type: CNAME
  ttl: 3600
  value: app.example.com.

api:
  type: A
  ttl: 60
  value: 203.0.113.10

This single file is applied to all zones listed in your config. Add a new domain, point it to the same source — done.

In action

See the plan before you apply

Run plan to preview every change across all zones — zero surprises when you apply.

terminal
$ dns-sync plan -c config.yaml --config-file .env --verbose

[DBG] Auto-detected .env in current directory (2 variable(s) set)
Loading config from config.yaml
✓ Config valid (2 zone(s), 2 provider(s))

Running pre-flight checks...
✓ Source provider 'source' reachable
[DBG] POST https://api.cloudflare.com/client/v4/zones
[DBG] ← 200 (312 bytes)
[INF] Cloudflare API authenticated successfully
✓ Target provider 'cloudflare' reachable

Zone: example.com. → cloudflare
+ example.com. MX 3600
10 mail.example.com., 20 mail2.example.com.
+ example.com. TXT 600
"v=spf1 include:_spf.google.com ~all"
+ www.example.com. CNAME 3600
app.example.com.
+ api.example.com. A 300
203.0.113.10, 203.0.113.11
+ _dmarc.example.com. TXT 600
"v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"

5 create(s)

5 total change(s) — run dns-sync apply to apply.

Ready to sync your DNS?

The Getting Started guide walks you through installation, writing your first config, and running your first plan in under 5 minutes.

Getting Started

Compatibility

DNS providers

Google Cloud DNS and Cloudflare are fully supported today. More providers are on the roadmap — contributions welcome.

ProviderPlanApply
Google Cloud DNS
AvailableAvailable
Cloudflare
AvailableAvailable
Porkbun
AvailableAvailable
Amazon Route 53
PlannedPlanned

Open Source

Get involved

dns-sync is free and open source. Whether you use it, break it, or improve it — every contribution matters.