{"id":37708848,"url":"https://github.com/timk153/docker-external-dns","last_synced_at":"2026-05-03T04:02:02.370Z","repository":{"id":253085493,"uuid":"842410285","full_name":"timk153/docker-external-dns","owner":"timk153","description":"External-dns for docker compose. Publish DNS entries to CloudFlare based on labels on docker containers, support for A, CNAME, NS and MX. Cloudflare proxy support for A and CNAME. Also features a DDNS updater (IPv4 only).","archived":false,"fork":false,"pushed_at":"2026-03-26T22:26:50.000Z","size":1048,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T02:19:07.375Z","etag":null,"topics":["cloudflare","cloudflare-dns","ddns","dns","docker","docker-compose"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timk153.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-14T09:45:08.000Z","updated_at":"2026-03-26T22:25:41.000Z","dependencies_parsed_at":"2024-08-24T00:50:17.120Z","dependency_job_id":"a414186b-a2b9-47ba-aad5-27c0a5464062","html_url":"https://github.com/timk153/docker-external-dns","commit_stats":null,"previous_names":["timk153/docker-external-dns"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/timk153/docker-external-dns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timk153%2Fdocker-external-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timk153%2Fdocker-external-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timk153%2Fdocker-external-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timk153%2Fdocker-external-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timk153","download_url":"https://codeload.github.com/timk153/docker-external-dns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timk153%2Fdocker-external-dns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32557698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T03:21:47.309Z","status":"ssl_error","status_checked_at":"2026-05-03T03:21:43.884Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","cloudflare-dns","ddns","dns","docker","docker-compose"],"created_at":"2026-01-16T13:13:12.199Z","updated_at":"2026-05-03T04:02:02.336Z","avatar_url":"https://github.com/timk153.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cmeta name=\"google-site-verification\" content=\"BxFtjK97fs8vIbZk_fUjQ96iyJRTzRkYnOcCMpUl2sk\" /\u003e\n\n![project-url][test-badge]\n![project-url][coverage-badge]\n![codacy-url][codacy-badge]\n\n[codacy-badge]: https://app.codacy.com/project/badge/Grade/d43ba19e75954648b5f79ce6db8e8cc3\n[codacy-url]: https://app.codacy.com/gh/timk153/docker-external-dns/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade\n[project-url]: https://github.com/timk153/docker-external-dns\n[test-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Ftimk153%2F26bea053b867128f6f37f5aac0ddcf8b%2Fraw%2F32d61159849411189d88f349d141c28dac0cbbaf%2Fdocker-external-dns-junit-tests.json\n[coverage-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Ftimk153%2F26bea053b867128f6f37f5aac0ddcf8b%2Fraw%2Fcaa38e5f9bd95657bd1f4f9ac76f5447b627600f%2Fdocker-external-dns-cobertura-coverage.json\n\n# Docker Compose external DNS (docker-external-dns)\n\nThis project was inspired by:\nhttps://github.com/kubernetes-sigs/external-dns\nhttps://github.com/dntsk/extdns\n\nIt is broadly similar to [extdns](https://github.com/dntsk/extdns) in functionality, but expands upon it.\n\nThis project was built using:\u003cbr/\u003e\n[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.\n\nThis project does the following:\n\n- Reads labels from containers sharing the same docker runtime.\u003cbr/\u003e\n  The labels contain DNS information.\n- Optionally include stopped containers DNS entires\n- Synchronises those records to CloudFlare\n- Runs at a regular interval (like a CRON job but interval is only programmable in seconds)\n- Supports DDNS (ipv4 only)\n- Supports multiple instances with different configurations\n- Writes identification comments to determine which records it controls\n- Supports the following record types only:\n  - A\n  - CNAME\n  - MX\n  - NS\n\n**IMPORTANT** Only CloudFlare is supported.\n\n# User guide\n\n## TL;DR\n\nThe project provides a Docker Compose external DNS container specifically for CloudFlare. It supports DNS entries of types A, CNAME, NS, and MX. Configuration is managed through environment variables and labels applied to Docker containers. Detailed examples for various configurations and DNS record types are provided in the [Examples](#examples) section. For more details on DNS record types, refer to the [DNS Entry Types](#dns-entry-types) section.\n\n## Troubleshooting\n\n### Hangs at startup\n\nCheck your supplied LOG_LEVEL.\u003cbr/\u003e\nEnsure it is one of: 'log', 'error', 'warn', 'debug', 'verbose', 'fatal'\n\nIf set to an invalid value the project will hand at start-up. I've tried to address this behavior unsuccessfully. For now awareness is the simplest solution.\n\n## How to Use\n\nUsing the Docker Compose External DNS container is very straightforward. You need to declare an instance of it within your Docker Compose definition (docker-compose.y(a)ml) with the appropriate volume mount and environment variables set. Then, add some labels to your containers.\n\nThis file comprises the following sections:\n\n- [Configuration](#configuration): All the configuration options available.\n  - [Environment Variables](#environment-variables): All the variables that can be set and what they do.\n  - [Labels](#labels): All the possible DNS entry types supported and how to use them.\n- [Examples](#examples): Common configurations.\n\n## Configuration\n\n### Environment Variables\n\nThe container is configured via environment variables. The following table describes the variable name, its default value (if any), and what it does.\nDetailed examples are available in the [Examples](#examples) section.\n\n| Variable Name                    | Default Value               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| -------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| PROJECT_LABEL                    | docker-compose-external-dns | Detailed example available in the [project Label and Instance ID section](#project_label-and-instance_id) section.\u003cbr/\u003e\u003cbr/\u003eForms part of the label the project looks for on Docker containers to interpret as DNS entries. Also written as a comment to Cloudflare DNS entries managed by this instance of the project.                                                                                                                                    |\n| INSTANCE_ID                      | 1                           | Detailed example available in the [project Label and Instance ID section](#project_label-and-instance_id) section.\u003cbr/\u003e\u003cbr/\u003eForms part of the label the project looks for on Docker containers to interpret as DNS entries. Also written as a comment to Cloudflare DNS entries managed by this instance of the project.                                                                                                                                    |\n| EXECUTION_FREQUENCY_SECONDS      | 60                          | How frequently the CRON job should execute to detect changes. Default is every 60 seconds. Undefined or empty uses the default. Minimum is every 1 second. There is no maximum. This must be an integer.                                                                                                                                                                                                                                                    |\n| DDNS_EXECUTION_FREQUENCY_MINUTES | 60                          | Determines how frequently the DDNS Service checks for a new public IP address. This setting only applies if you're using DDNS otherwise the service will not be started.                                                                                                                                                                                                                                                                                    |\n| PRESERVE_STOPPED                 | false                       | Determines if DNS entries for stopped containers are synchronised to the DNS server. `false` doesn't synchronise, meaning containers which are stopped will have their DNS entries removed. `true` means stopped containers won't have their entries removed. Removed containers will always have their DNS entries removed.                                                                                                                                |\n| API_TOKEN                        |                             | You must supply either API_TOKEN or API_TOKEN_FILE but not both.\u003cbr/\u003e\u003cbr/\u003eYour API token from Cloudflare. Must be granted Zone.Zone read and Zone.DNS edit.\u003cbr/\u003e\u003cbr/\u003e\u003cspan style=\"color: red; font-weight:bold\"\u003eIMPORTANT\u003c/span\u003e Use of this property is insecure as your API_TOKEN will be in plain text. It is recommended you use API_TOKEN_FILE. Use at your own risk.                                                                                  |\n| API_TOKEN_FILE                   |                             | You must supply either API_TOKEN or API_TOKEN_FILE but not both.\u003cbr/\u003e\u003cbr/\u003eSecure way to share your Cloudflare API Token with the project. Recommended approach for Docker Swarm. Compatible with Docker Compose (but less secure).\u003cbr/\u003e\u003cbr/\u003eRead Docker Compose docs for more information: [Docker Compose Secrets](https://docs.docker.com/compose/use-secrets/)                                                                                           |\n| LOG_LEVEL                        | error                       | The current logging level. The default is error, meaning only errors and fatal get logged.\u003cbr/\u003e\u003cbr/\u003eEach level includes the levels above it from most specific to least specific. By way of example, verbose will output everything. debug will ignore verbose. log will ignore debug and verbose.\u003cbr/\u003e\u003cbr/\u003eFrom most specific to least:\u003c/br\u003efatal\u003cbr/\u003eerror\u003cbr/\u003ewarn\u003cbr/\u003elog\u003cbr/\u003edebug\u003cbr/\u003everbose\u003cbr/\u003e\u003cbr/\u003eThese log levels come from the NestJS project. |\n\n#### PROJECT_LABEL and INSTANCE_ID\n\nThese two items combine to form the label which the project will look for on Docker Containers and write as the comment for that DNS entry into Cloudflare.\n\nIt is interpolated as follows: `${PROJECT_ID}:${INSTANCE_ID}`\u003cbr/\u003e\u003cbr/\u003e\nFor example:\n|PROJECT_ID|INSTANCE_ID|EXAMPLE|Use Case|\n|-|-|-|-|\n|docker-compose-external-dns|1|docker-compose-external-dns:1|The default|\n|docker-compose-external-dns|production|docker-compose-external-dns:production|Could be used to target a production Cloudflare subscription|\n|docker-compose-external-dns|production|docker-compose-external-dns:non-production|Targets the non-production Cloudflare subscription|\n|dns.com.mydomain|project|dns.com.mydomain:project|DNS entries for a specific subdomain of yours.\n\nPlease note, in a large deployment the project label and instance id will become cruitial to management.\u003cbr/\u003e\nFor best practice, establish a naming convension and apply it consistently.\n\n### Labels\n\nThe values of the Docker Compose labels correspond to DNS entries. You can find descriptions of the various DNS records here: [List of DNS Record Types](https://en.wikipedia.org/wiki/List_of_DNS_record_types).\n\nExamples for all of these can be found in the [Examples](#examples) section below.\nFor more details on the DNS record types, refer to the [DNS Entry Types](#dns-entry-types) section.\n\n#### A\n\nThe A record points a domain name to an IP address.  \n\u003cbr/\u003e\u003cbr/\u003e\nname = example.com\u003cbr/\u003e\nserver = 8.8.8.8\u003cbr/\u003e\u003cbr/\u003e\nLookup of example.com returns 8.8.8.8\u003cbr/\u003e\n\nThe properties required for this entry are as follows:\n\n| property | value                                         | description                                                                                                                                                                                                                                                      |\n| -------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| type     | A                                             | The type of the record. In this case it should be A                                                                                                                                                                                                              |\n| name     | \\\u003cyour domain name\\\u003e                          | This is the domain you want this A record to resolve for. For example: example-domain.com                                                                                                                                                                        |\n| address  | \\\u003cyour server's address (v4 or 6)\\\u003e OR \"DDNS\" | The address you want your domain name to resolve to.\u003c/br\u003e Or the string literal \"DDNS\" which instructs the project to compute your current public ipv4 address and use it for this record.                                                                       |\n| proxy    | true or false                                 | True uses Cloudflare's proxy to hide your address. False causes Cloudflare to act as a normal DNS server.\u003cbr/\u003e\u003cbr/\u003eDocumentation: [Proxied DNS Records](https://developers.cloudflare.com/dns/manage-dns-records/reference/proxied-dns-records/#proxied-records) |\n\n#### CNAME\n\nThe CNAME record aliases the name to another A or CNAME record. Causing the name when queried to resolve to the A record it (eventually) resolves to.  \n\u003cbr/\u003e\u003cbr/\u003e\ntype = A\u003cbr/\u003e\nname = example.com\u003cbr/\u003e\nserver = 8.8.8.8\u003cbr/\u003e\n\u003cbr/\u003e\ntype = CNAME\u003cbr/\u003e\nname = subdomain.example.com\u003cbr/\u003e\ntarget = example.com\u003cbr/\u003e\n\u003cbr/\u003e\ntype = CNAME\u003cbr/\u003e\nname = lower.subdomain.example.com\u003cbr/\u003e\ntarget = subdomain.example.com\u003cbr/\u003e\n\u003cbr/\u003e\nLookup of example.com returns 8.8.8.8\u003cbr/\u003e\nLookup of subdomain.example.com returns 8.8.8.8\u003cbr/\u003e\nLookup of lower.subdomain.example.com returns 8.8.8.8\u003cbr/\u003e\n\nThe properties required for this entry are as follows:\n\n| property | value                                  | description                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| -------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| type     | CNAME                                  | The type of the record. In this case it should be CNAME                                                                                                                                                                                                                                                                                                                                                                                                       |\n| name     | \\\u003cyour alias\\\u003e                         | This is the alias you want this CNAME record to resolve for. For example: subdomain.example-domain.com                                                                                                                                                                                                                                                                                                                                                        |\n| target   | \\\u003cyour full A record or CNAME record\\\u003e | The full name of the relevant A or CNAME record this should resolve to. For example, use 'example-domain.com' to point at the A record above.                                                                                                                                                                                                                                                                                                                 |\n| proxy    | true or false                          | True uses Cloudflare's proxy to hide your address. False causes Cloudflare to act as a normal DNS server.\u003cbr/\u003e\u003cbr/\u003eDocumentation: [Proxied DNS Records](https://developers.cloudflare.com/dns/manage-dns-records/reference/proxied-dns-records/#proxied-records)\u003cbr/\u003e\u003cbr/\u003ePlease note, only one level of subdomain can be proxied. If it's two subdomains deep (e.g. test.subdomain.example.com) it cannot be proxied unless you have a premium subscription. |\n\n#### MX\n\nThe MX record declares that a mail server handles mail for your domain or subdomain. The name is the domain or subdomain it handles mail for. The server points to an A or CNAME which resolves to your mail server. It's common to make a CNAME record for the mail server for this entry to point to.  \n\u003cbr/\u003e\u003cbr/\u003e\ntype = A\u003cbr/\u003e\nname = example.com\u003cbr/\u003e\nserver = 8.8.8.8\u003cbr/\u003e\n\u003cbr/\u003e\ntype = CNAME\u003cbr/\u003e\nname = mx1.example.com\u003cbr/\u003e\ntarget = example.com\u003cbr/\u003e\n\u003cbr/\u003e\ntype = MX\u003cbr/\u003e\nname = example.com\u003cbr/\u003e\ntarget = mx1.example.com\u003cbr/\u003e\n\u003cbr/\u003e\nLookup of example.com returns 8.8.8.8\u003cbr/\u003e\nLookup of mx1.example.com returns 8.8.8.8\u003cbr/\u003e\nLookup of mail server for example.com returns 8.8.8.8\u003cbr/\u003e\n\nThe properties required for this entry are as follows:\n\n| property | value                            | description                                                                                                                                                           |\n| -------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| type     | MX                               | The type of the record. In this case it should be MX                                                                                                                  |\n| name     | \\\u003cyour domain\\\u003e                  | This is the domain you want this mail server to handle mail for. For example: example-domain.com                                                                      |\n| server   | \\\u003cfull name of the mail server\\\u003e | The full name of the relevant A or CNAME entry this should resolve to. For example 'mx1.example-domain.com' (assuming you've made a CNAME or A record resolving mx1). |\n| priority | 0 to 65535                       | The priority of this mail server, allowing you to have more than one mail server for a domain. Must be an integer between the stated values.                          |\n\n#### NS\n\nThe NS record points a domain or subdomain name to an A or CNAME record. DNS queries that match that domain or subdomain are forwarded to the server. This is typically used to point traffic on a subdomain to another name server. Such as one only accessible within a private network.  \n\u003cbr/\u003e\u003cbr/\u003e\ntype = A\u003cbr/\u003e\nname = lan.example.com\u003cbr/\u003e\nserver = 192.168.0.1\u003cbr/\u003e\n\u003cbr/\u003e\ntype = NS\u003cbr/\u003e\nname = example.com\u003cbr/\u003e\nserver = lan.example.com\u003cbr/\u003e\n\u003cbr/\u003e\nLookup of example.com returns lan.example.com\u003cbr/\u003e\nLookup of lan.example.com returns 192.168.0.1\u003cbr/\u003e\n\nThe properties required for this entry are as follows:\n\n| property | value                | description                                                                                                 |\n| -------- | -------------------- | ----------------------------------------------------------------------------------------------------------- |\n| type     | NS                   | The type of the record. In this case it should be NS                                                        |\n| name     | \\\u003cyour domain name\\\u003e | This is the domain you want to forward queries for. For example: example-domain.com                         |\n| server   | \\\u003cyour server name\\\u003e | The full name of the relevant A or CNAME entry this should resolve to. For example 'lan.example-domain.com' |\n\n## Docker Image Tags\n\nThere are four types of image tag associated with this project:\n\n| tag                                         | example                                 | description                                                                                    |\n| ------------------------------------------- | --------------------------------------- | ---------------------------------------------------------------------------------------------- |\n| latest                                      | timk153/docker-external-dns:latest      | the latest release of the most recent major version                                            |\n| \\\u003cmajor version number\\\u003e-latest             | timk153/docker-external-dns:1-latest    | the latest release of that major version. In the example it's the latest release of version 1. |\n| semantic version number                     | timk153/docker-external-dns:1.4.2       | a specific release. In the example it's release 1.4.2                                          |\n| semantic version with additional identifier | timk153/docker-external-dns:1.4.2-alpha | a alpha, beta or development build. In the example it's an alpha release of version 1.4.2.     |\n\nAll available tags can be found in the [docker hub public registry](https://hub.docker.com/repository/docker/timk153/docker-external-dns/tags).\n\n## Examples\n\nBelow are a series of example configurations for the following usecases.\nPlease note, all examples use the image tagged with latest.\n\n### Minimal configuration\n\n#### API_TOKEN\n\nThis example demonstrates the most basic setup of the Docker Compose External DNS container with default values. It shows how to use the API_TOKEN environment variable and configure a single DNS entry.\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e API_TOKEN is insecure, API_TOKEN_FILE is recommended\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003cyour api token here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[{ \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"8.8.8.8\", \"proxy\": false }]'\n```\n\nExplanation: This setup includes the docker-compose-external-dns service configured with the API_TOKEN environment variable. It will use the token to authenticate with Cloudflare. The other-service has a label that specifies a DNS A record for my-domain.com pointing to 8.8.8.8 with no proxy.\n\n#### API_TOKEN_FILE\n\nThis configuration demonstrates the preferred method of passing the API token securely using Docker secrets. This is more secure than using API_TOKEN.\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN_FILE=/run/secrets/CLOUDFLARE_API_TOKEN\n    secrets:\n      - CLOUDFLARE_API_TOKEN\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[{ \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"8.8.8.8\", \"proxy\": false }]'\n\nsecrets:\n  CLOUDFLARE_API_TOKEN:\n    environment: 'CLOUDFLARE_API_TOKEN'\n```\n\nExplanation: This setup uses Docker secrets to securely manage the Cloudflare API token. The API_TOKEN_FILE environment variable points to the secret file, which contains the API token. This approach is recommended for better security, especially in production environments.\n\n### PRESERVE_STOPPED\n\nThis example demonstrates a configuration which preserves the DNS records for containers which become stopped.\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003cyour api token here\u003e\n      - PRESERVE_STOPPED=true\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[{ \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"8.8.8.8\", \"proxy\": false }]'\n```\n\nExplanation: This setup sets PRESERVE_STOPPED to true, meaning if other-service became stopped, the DNS entry would be preserved\n\n### Bespoke label, instance id, frequency and log level\n\nThis example shows how to customize the label, instance ID, execution frequency, and log level settings.\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e example uses insecure option \"API_TOKEN\" for simplicity.\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - PROJECT_LABEL=dns.com.example\n      - INSTANCE_ID=project-subdomain\n      - EXECUTION_FREQUENCY_SECONDS=120\n      - LOG_LEVEL=info\n      - API_TOKEN=\u003cyour api token here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'dns.com.example:project-subdomain=[{ \"type\": \"CNAME\", \"name\": \"project.example.com\", \"target\": \"example.com\", \"proxy\": true }]'\n```\n\nExplanation: In this configuration:\u003cbr/\u003e\n\u003cbr/\u003e\nPROJECT_LABEL is set to dns.com.example, which is used as part of the label on Docker containers.\u003cbr/\u003e\nINSTANCE_ID is set to project-subdomain to differentiate this instance.\u003cbr/\u003e\nEXECUTION_FREQUENCY_SECONDS is set to 120, meaning the DNS updates will occur every 2 minutes.\u003cbr/\u003e\nLOG_LEVEL is set to info to log informational messages as well as warnings and errors.\u003cbr/\u003e\nThe other-service has a CNAME record pointing project.example.com to example.com with proxy enabled.\u003cbr/\u003e\n\n### Two domains, one service\n\nThis example illustrates managing DNS entries for multiple domains using a single docker-compose-external-dns service.\nPlease note, your API_TOKEN(\\_FILE) will require permissions for both domains.\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e example uses insecure option \"API_TOKEN\" for simplicity.\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003cyour api token here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[\n        { \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"8.8.8.8\", \"proxy\": false },\n        { \"type\": \"A\", \"name\": \"my-other-domain.org\", \"address\": \"8.8.8.8\", \"proxy\": true }]'\n```\n\nExplanation: This setup shows how to handle DNS records for two different domains (my-domain.com and my-other-domain.org) with one instance of docker-compose-external-dns. Each domain has its own A record configuration. The my-other-domain.org entry uses Cloudflare's proxy.\n\n### Two domains, two services\n\nThese configurations demonstrates how to manage DNS records for different domains using separate docker-compose-external-dns services.\n\n#### INSTANCE_ID\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e example uses insecure option \"API_TOKEN\" for simplicity.\n\n```yaml\nservices:\n  docker-compose-external-dns-1:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003capi token for my-domain.com here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\ndocker-compose-external-dns-2:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - INSTANCE_ID=2\n      - API_TOKEN=\u003capi token for my-other-domain.org here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[{ \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"8.8.8.8\", \"proxy\": false }]'\n      - 'docker-compose-external-dns:2=[{ \"type\": \"A\", \"name\": \"my-other-domain.org\", \"address\": \"8.8.8.8\", \"proxy\": true }]'\n```\n\nExplanation: This setup uses two separate docker-compose-external-dns services to manage DNS entries for my-domain.com and my-other-domain.org. Each service is configured with its own API token and instance ID. This allows for independent management of DNS entries for each domain.\n\n#### PROJECT_LABEL\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e example uses insecure option \"API_TOKEN\" for simplicity.\n\n```yaml\nservices:\n  docker-compose-external-dns-1:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - PROJECT_LABEL=dns.com.my-domain\n      - API_TOKEN=\u003capi token for my-domain.com here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\ndocker-compose-external-dns-2:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - PROJECT_LABEL=dns.org.my-other-domain\n      - API_TOKEN=\u003capi token for my-other-domain.org here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'dns.com.my-domain:1=[{ \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"8.8.8.8\", \"proxy\": false }]'\n      - 'dns.org.my-other-domain:1=[{ \"type\": \"A\", \"name\": \"my-other-domain.org\", \"address\": \"8.8.8.8\", \"proxy\": true }]'\n```\n\nExplanation: This setup uses two separate docker-compose-external-dns services to manage DNS entries for my-domain.com and my-other-domain.org. Each service is configured with its own API token and project label. This allows for independent management of DNS entries for each domain.\n\n### DNS Entry types\n\nThe final set of examples demonstrates different types of DNS records (A, CNAME, NS, MX) and how to configure them using Docker Compose labels.\nPlease note, these labels may live on one or more services spead across one or more docker-compose files running on Docker. They are all on \"other-service\" in this instance for simplicity sake.\n\n#### A\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e example uses insecure option \"API_TOKEN\" for simplicity.\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003cyour api token here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[{ \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"8.8.8.8\", \"proxy\": false }]'\n```\n\nExplanation: This example configures an A record for my-domain.com pointing to 8.8.8.8 without using Cloudflare's proxy.\n\n##### DDNS Variant\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e example uses insecure option \"API_TOKEN\" for simplicity.\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003cyour api token here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[{ \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"DDNS\", \"proxy\": false }]'\n```\n\nExplanation: This example configures an A record for my-domain.com. The project will start the DDNS Service when this record is processed. The service will fetch your current public ipv4 address and use it for this record. The DDNS Service will check at regular intervals for a new ipv4 address. If one is detected then this record will be updated to the new value when the next DNS synchronisation interval is reached.\n\nSettings to control interval are explained in the [configuration section](#configuration).\n\n#### CNAME\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e example uses insecure option \"API_TOKEN\" for simplicity.\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003cyour api token here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[\n        { \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"8.8.8.8\", \"proxy\": false },\n        { \"type\": \"CNAME\", \"name\": \"sub.my-domain.com\", \"target\": \"my-domain.com\", \"proxy\": false }]'\n```\n\nExplanation: This setup includes a CNAME record that aliases sub.my-domain.com to my-domain.com, following the A record configuration for my-domain.com.\n\n#### NS\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e example uses insecure option \"API_TOKEN\" for simplicity.\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003cyour api token here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[\n        { \"type\": \"A\", \"name\": \"lan.my-domain.com\", \"address\": \"192.168.0.1\", \"proxy\": false },\n        { \"type\": \"CNAME\", \"name\": \"ns1.lan.my-domain.com\", \"target\": \"lan.my-domain.com\", \"proxy\": false },\n        { \"type\": \"NS\", \"name\": \"lan.my-domain.com\", \"server\": \"ns1.lan.my-domain.com\" }]'\n```\n\nExplanation: This configuration includes an NS record specifying ns1.lan.my-domain.com as the nameserver for lan.my-domain.com, alongside an A record for lan.my-domain.com.\n\n#### MX\n\n\u003cspan style=\"color: red; font-weight: bold;\"\u003eIMPORTANT\u003c/span\u003e example uses insecure option \"API_TOKEN\" for simplicity.\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003cyour api token here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[\n        { \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"8.8.8.8\", \"proxy\": false },\n        { \"type\": \"CNAME\", \"name\": \"mx1.my-domain.com\", \"target\": \"my-domain.com\", \"proxy\": false },\n        { \"type\": \"MX\", \"name\": \"my-domain.com\", \"server\": \"mx1.my-domain.com\", \"priority\": 0 }]'\n```\n\nExplanation: This example sets up an MX record for my-domain.com that points to mx1.my-domain.com with a priority of 0. This is used to specify the mail server for the domain.\n\n#### All together\n\n```yaml\nservices:\n  docker-compose-external-dns:\n    image: 'timk153/docker-external-dns:latest'\n    environment:\n      - API_TOKEN=\u003cyour api token here\u003e\n    volumes:\n      # Used to read labels from containers - readonly\n      - '/var/run/docker.sock:/var/run/docker.sock:ro'\n\n  other-service:\n    image: 'busybox:latest'\n    command: 'sleep 3600'\n    labels:\n      - 'docker-compose-external-dns:1=[\n        { \"type\": \"A\", \"name\": \"my-domain.com\", \"address\": \"DDNS\", \"proxy\": false },\n        { \"type\": \"CNAME\", \"name\": \"mx1.my-domain.com\", \"target\": \"my-domain.com\", \"proxy\": false },\n        { \"type\": \"MX\", \"name\": \"my-domain.com\", \"server\": \"mx1.my-domain.com\", \"priority\": 0 },\n        { \"type\": \"CNAME\", \"name\": \"subdomain.my-domain.com\", \"target\": \"my-domain.com\", \"proxy\": false },\n        { \"type\": \"A\", \"name\": \"lan.my-domain.com\", \"address\": \"192.168.0.1\", \"proxy\": false },\n        { \"type\": \"CNAME\", \"name\": \"ns1.lan.my-domain.com\", \"target\": \"lan.my-domain.com\", \"proxy\": false },\n        { \"type\": \"NS\", \"name\": \"lan.my-domain.com\", \"server\": \"ns1.lan.my-domain.com\" }]'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimk153%2Fdocker-external-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimk153%2Fdocker-external-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimk153%2Fdocker-external-dns/lists"}