main
Build and Push Container / build-and-push (push) Successful in 1m19s
DDNS for Route53 and UniFi
This service automatically keeps IPv4 and IPv6 records updated in AWS Route53 and UniFi DNS policies.
Configuration
All environment variables can be set directly or via a .env file in the project root. The .env file is gitignored and should contain:
RECORDS_FILE=/etc/ddns/records.yaml
GLOBAL_SKIP_IPV4=false
GLOBAL_SKIP_IPV6=false
ROUTE53_HOSTED_ZONE_ID=ABC123
AWS_ACCESS_KEY_ID=your-access-key-here
AWS_SECRET_ACCESS_KEY=your-secret-key-here
UNIFI_HOST=https://unifi.local:8443
UNIFI_SITE_ID=default
UNIFI_API_TOKEN=your-api-token-here
UNIFI_VERIFY_SSL=false
Route53 Configuration
Set ROUTE53_HOSTED_ZONE_ID for the single hosted zone. Records in RECORDS_FILE with provider: route53 will use this zone.
AWS credentials are read from AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the .env file.
UniFi DNS Configuration
Set the following environment variables:
UNIFI_HOST- UniFi controller URL (e.g.,https://unifi.local:8443)UNIFI_SITE_ID- UniFi site IDUNIFI_API_TOKEN- UniFi API tokenUNIFI_VERIFY_SSL- Verify SSL certificates (true/false, default:false)
Testing
uv run pytest
Building Container Image
# Build
podman build -t gitea.reeseapps.com/services/ddns:latest -f ./Containerfile
# Run
podman run \
--env-file .env \
-v ./records:/records:z \
-it --rm \
gitea.reeseapps.com/services/ddns:latest
Description
Languages
Python
98.4%
Dockerfile
1.6%