Configuration¶
Overview¶
There are two ways to configure ddns-route53:
Environment variables override file settings. Define the entire
hostedZones list in one source. A zone definition in both sources causes
startup to fail.
If an option is not set, its default value is used. The same applies to any nested option that is not set.
Configuration file¶
At startup, ddns-route53 searches for a file named ddns-route53.yml (or ddns-route53.yaml) in:
/etc/ddns-route53/$XDG_CONFIG_HOME/$HOME/.config/.(the working directory)
Discovery skips paths that reference an unset environment variable and entries that are not regular files. Symlinks to regular files are supported.
To select a specific file, set --config or CONFIG. Startup fails if that
path references an unset variable or does not resolve to a regular file.
See the CLI options.
ddns-route53.yml
credentials:
accessKeyID: "ABCDEFGHIJKLMNO123456"
secretAccessKey: "abcdefgh123456IJKLMN+OPQRS7890+ABCDEFGH"
hostedZones:
- id: "ABCEEFG123456789"
records:
- name: "ddns.example.com."
type: "A"
ttl: 300
- name: "ddns.example.com."
type: "AAAA"
ttl: 300
- id: "Z222222EXAMPLE"
records:
- name: "another.example2.com."
type: "A"
ttl: 600
wanip:
providers:
ipv4:
- "https://ipv4.example.com"
ipv6:
- "https://ipv6.example.com"
Environment variables¶
All file-based configuration can be mapped to environment variables. For example, the following configuration:
ddns-route53.yml
credentials:
accessKeyID: "ABCDEFGHIJKLMNO123456"
secretAccessKey: "abcdefgh123456IJKLMN+OPQRS7890+ABCDEFGH"
hostedZones:
- id: "ABCEEFG123456789"
records:
- name: "ddns.example.com."
type: "A"
ttl: 300
- name: "ddns.example.com."
type: "AAAA"
ttl: 300
- id: "Z222222EXAMPLE"
records:
- name: "another.example2.com."
type: "A"
ttl: 600
Can be expressed as:
environment variables
DDNSR53_CREDENTIALS_ACCESSKEYID=ABCDEFGHIJKLMNO123456
DDNSR53_CREDENTIALS_SECRETACCESSKEY=abcdefgh123456IJKLMN+OPQRS7890+ABCDEFGH
DDNSR53_HOSTEDZONES_0_ID=ABCEEFG123456789
DDNSR53_HOSTEDZONES_0_RECORDS_0_NAME=ddns.example.com.
DDNSR53_HOSTEDZONES_0_RECORDS_0_TYPE=A
DDNSR53_HOSTEDZONES_0_RECORDS_0_TTL=300
DDNSR53_HOSTEDZONES_0_RECORDS_1_NAME=ddns.example.com.
DDNSR53_HOSTEDZONES_0_RECORDS_1_TYPE=AAAA
DDNSR53_HOSTEDZONES_0_RECORDS_1_TTL=300
DDNSR53_HOSTEDZONES_1_ID=Z222222EXAMPLE
DDNSR53_HOSTEDZONES_1_RECORDS_0_NAME=another.example2.com.
DDNSR53_HOSTEDZONES_1_RECORDS_0_TYPE=A
DDNSR53_HOSTEDZONES_1_RECORDS_0_TTL=600
DDNSR53_WANIP_PROVIDERS_IPV4=https://ipv4.example.com,https://ipv4-backup.example.com
DDNSR53_WANIP_PROVIDERS_IPV6=https://ipv6.example.com,https://ipv6-backup.example.com