No description
Find a file
2024-05-31 19:25:11 +02:00
code fix: infinite append 2024-05-31 19:25:11 +02:00
.gitignore fix: txt records not working 2024-05-31 16:04:38 +02:00
config.json feat: docker image 2024-04-08 15:04:01 +02:00
docker-compose.yml docs: improve 2024-05-31 16:16:27 +02:00
Dockerfile feat: docker image 2024-04-08 15:04:01 +02:00
readme.md docs: improve 2024-05-31 16:16:27 +02:00

dyncldns

a docker container to automatically update cloudflare dns records

setup

  1. get zone ID for your domain under "overview" on the right side
  2. 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
  3. edit docker-compose.yml and 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.
  4. deploy the container with docker compose: docker compose up -d --build
    • overwrite the default location for the config by setting the DYNCLDNS_CFG env var as the path to the config

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"
      }
    ]
  }
]

resources