No description
| code | ||
| .gitignore | ||
| config.json | ||
| docker-compose.yml | ||
| Dockerfile | ||
| readme.md | ||
dyncldns
a docker container to automatically update cloudflare dns records
setup
- get zone ID for your domain under "overview" on the right side
- edit the config.json in the root of the repository to your needs
- each domain has its own object, identified by the zone
- a domain can have multiple records, specified in the records array
- name and type are both visible on the cloudflare dashboard when editing the DNS. So far only AAAA, A and TXT records are supported
- the format is determining how the record is gonna look afterwards. for A and AAAA records this should be just %s. TXT records can also look like this
- if the record name is the domain name (e.g. example.com) then write an @ instead
- edit
docker-compose.ymland insert your cloudflare api token.- you can generate a token here. Choose the DNS template and then specify to which zones (domains) it should have access to.
- deploy the container with docker compose:
docker compose up -d --build- overwrite the default location for the config by setting the
DYNCLDNS_CFGenv var as the path to the config
- overwrite the default location for the config by setting the
what records does it support?
currently it supports the following records:
- A
- AAAA
- TXT
example config
[
{
"zone": "d58e3582afa99040e27b92b13c8f2280",
"records": [
{
"name": "subdomain-1",
"format": "%s",
"type": "A"
},
{
"name": "subdomain-2",
"format": "%s",
"type": "AAAA"
}
]
},
{
"zone": "7c4fc64fd7afb2246e67c9697d944e8d",
"records": [
{
"name": "@",
"format": "%s",
"type": "A"
},
{
"name": "root-domain-above",
"format": "%s",
"type": "AAAA"
},
{
"name": "txt-record",
"format": "%s",
"type": "TXT"
}
]
}
]