Caution
This project has only been tested against UDM 1.x firmware, and is no longer actively maintained. For firmware versions 2.x and up, see https://github.com/micahhausler/route53-dynamic-dns or https://github.com/nckslvrmn/unifi_ddns_route53 instead.
Route53 Dynamic DNS support for the UDM and UDM Pro, using boostchicken's on_boot.d package and the awslabs Route53 Dynamic DNS stack.
- UniFi Dream Machine (UDM) or Dream Machine Pro (UDMP) running firmware 1.6.4+ (required for on_boot.d support).
- (Optional) Docker, for building your own image.
If you do not build your own image, the default will be used, as shown in the example config.
- Clone this repository with
--recurse-submodules
- Run
docker-build.sh
- Tag
route53-ddns:unifi
to your remote repository anddocker push
- During Installation, set
DDNS_IMAGE
in your global config file.
- Set up a DDNS endpoint for each domain, using the awslabs CloudFormation template.
- Install the on_boot.d package on the UDM.
- Install container-common to limit container log size and avoid filling the UDM's storage.
- Copy the on_boot.d script from this repo to
/mnt/data/on_boot.d/
chmod +x /mnt/data/on_boot.d/53-route53-ddns.sh
- (Optional) If using a custom Docker image, set
DDNS_IMAGE
in the global config file. - Create
${DOMAIN}.conf
for each domain. See the per-domain config for an example. - Run
/mnt/data/on_boot.d/53-route53-ddns.sh
or reboot the UDM.
To apply configuration changes without rebooting:
- SSH to the UDM.
podman restart route53-ddns
To update to a new version:
- SSH to the UDM.
podman stop route53-ddns
docker rmi route53-ddns:unifi
- Copy the on_boot.d script from this repo to
/mnt/data/on_boot.d/
chmod +x /mnt/data/on_boot.d/53-route53-ddns.sh
- Run
/mnt/data/on_boot.d/53-route53-ddns.sh
To check status of the container:
- SSH to the UDM.
docker ps
should show theroute53-ddns
container, if running.docker logs route53-ddns
to show the container log.
# /mnt/data/route53-ddns/config
# (Optional) Replace this with your own image built from this repo
# Defaults to: josephvusich/route53-ddns:unifi
DDNS_IMAGE=""
# Per-domain configuration now lives in separate .conf files. For
# backwards-compatibility, the global config file is still checked
# for a valid domain configuration.
# /mnt/data/route53-ddns/*.conf
# apiKey from CloudFormation Outputs
DDNS_API_KEY=""
# shared_secret field from DynamoDB
DDNS_SECRET=""
# hostname field from DynamoDB, including any trailing dot
# Example: "dynamic.example.com."
DDNS_HOSTNAME=""
# apiUrl from CloudFormation Outputs, with 'https://' prefix
# Example: "https://api-gateway.example.com"
DDNS_URL=""
# Comma-delimited list of IP versions
# 'ipv4' = A record
# 'ipv6' = AAAA record
# Both records must have the same ${DDNS_SECRET}
DDNS_IPVERSIONS="ipv4,ipv6"
# (Optional) Refresh rate in seconds
# Less or equal to the TTL configured in DynamoDB
# Defaults to: 60
DDNS_TTL=""