NAME
relayd
A simple set and forget DNS synchronization agent for Docker and Docker Swarm.
DESCRIPTION
Relayd is a lightweight set and forget external DNS synchronization agent for Docker. It updates DNS records across providers based on your Docker container labels.
Hostnames come straight from relayd.hosts labels and Traefik rules. A and AAAA records stay in sync for IPv4 and IPv6, and companion TXT records mark ownership so relayd never overwrites a domain it does not own.
Sync public domains to Cloudflare while internal names go to Pi-hole, UniFi, or PowerDNS. Native Docker Swarm support lets a single instance on a manager node discover every swarm service that carries the relayd.enable label.
FEATURES
- Docker native: hostnames come from relayd.hosts and Traefik rule labels
- Dual-stack: A (IPv4) and AAAA (IPv6) records synchronized at the same time
- Safe ownership through companion TXT records so foreign records are never touched
- Multi-provider: Cloudflare, Pi-hole, UniFi, PowerDNS, Route53, and more
- Native Docker Swarm support with a single instance on a manager node
- Automatic local and public IP discovery with manual overrides
QUICK START
services:
relayd:
image: ghcr.io/mizuchilabs/relayd:latest
network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- RELAYD_PROVIDER_CLOUDFLARE_TYPE=cloudflare
- RELAYD_PROVIDER_CLOUDFLARE_TOKEN=your-api-token
- RELAYD_PROVIDER_CLOUDFLARE_ZONES=example.comservices:
whoami:
image: traefik/whoami
labels:
- relayd.enable=true
- relayd.hosts=whoami.example.com,test.example.comCONFIGURATION
| Name | Description |
|---|---|
| RELAYD_INTERVAL | Background sync interval such as 5m or 1h. Default: 5m. |
| RELAYD_INSTANCE | Instance name such as my-nas. Default: the hostname. |
| RELAYD_IP_FAMILY | IP family to synchronize: ipv4, ipv6, or dual. Default: ipv4. |
| RELAYD_LOCAL_OVERRIDE_IPV4 | Hardcode the local IPv4 address instead of auto-discovering. |
| RELAYD_PUBLIC_OVERRIDE_IPV4 | Hardcode the public IPv4 address instead of auto-discovering. |
| RELAYD_PROVIDER_CLOUDFLARE_TYPE | Configures the Cloudflare provider. Providers are discovered from RELAYD_PROVIDER_ prefixed variables that end in _TYPE. |
RELATED
- tetherA central configuration hub for distributed Traefik setups.
- tetherdThe lightweight agent for the Tether ecosystem.
- Ditching DNS Duct Tapeblog/relayd
LINKS
Self-hosting relayd is free under the Apache-2.0 license. Run it on your own iron. Commercial licensing, support, and managed offerings for businesses are on the business page.