Configuration¶
Overview¶
There are two ways to configure ddns-route53:
Configuration sources are evaluated in the order listed above.
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)
You can override this using the --config flag or the CONFIG environment variable.
ddns-route53.yml
credentials:
accessKeyID: "ABCDEFGHIJKLMNO123456"
secretAccessKey: "abcdefgh123456IJKLMN+OPQRS7890+ABCDEFGH"
route53:
hostedZoneID: "ABCEEFG123456789"
recordsSet:
- name: "ddns.example.com."
type: "A"
ttl: 300
- name: "ddns.example.com."
type: "AAAA"
ttl: 300
- 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"
route53:
hostedZoneID: "ABCEEFG123456789"
recordsSet:
- name: "ddns.example.com."
type: "A"
ttl: 300
- name: "ddns.example.com."
type: "AAAA"
ttl: 300
- 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_ROUTE53_HOSTEDZONEID=ABCEEFG123456789
DDNSR53_ROUTE53_RECORDSSET_0_NAME=ddns.example.com.
DDNSR53_ROUTE53_RECORDSSET_0_TYPE=A
DDNSR53_ROUTE53_RECORDSSET_0_TTL=300
DDNSR53_ROUTE53_RECORDSSET_1_NAME=ddns.example.com.
DDNSR53_ROUTE53_RECORDSSET_1_TYPE=AAAA
DDNSR53_ROUTE53_RECORDSSET_1_TTL=300
DDNSR53_ROUTE53_RECORDSSET_2_NAME=another.example2.com.
DDNSR53_ROUTE53_RECORDSSET_2_TYPE=A
DDNSR53_ROUTE53_RECORDSSET_2_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