{"id":13473654,"url":"https://github.com/oznu/docker-cloudflare-ddns","last_synced_at":"2025-09-27T09:31:59.832Z","repository":{"id":39068959,"uuid":"100934061","full_name":"oznu/docker-cloudflare-ddns","owner":"oznu","description":"A small amd64/ARM/ARM64 Docker image that allows you to use CloudFlare as a DDNS / DynDNS Provider.","archived":true,"fork":false,"pushed_at":"2022-08-10T14:57:48.000Z","size":87,"stargazers_count":1066,"open_issues_count":18,"forks_count":213,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-09-21T16:20:19.988Z","etag":null,"topics":["aarch64","alpine-linux-image","amd64","arm","arm64","cloudflare","ddns","docker","dyndns","raspberry-pi","x86-64"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/oznu/cloudflare-ddns/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oznu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null},"funding":{"custom":"https://paypal.me/oznu"}},"created_at":"2017-08-21T09:07:28.000Z","updated_at":"2024-09-20T06:46:10.000Z","dependencies_parsed_at":"2022-07-11T09:00:18.130Z","dependency_job_id":null,"html_url":"https://github.com/oznu/docker-cloudflare-ddns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oznu%2Fdocker-cloudflare-ddns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oznu%2Fdocker-cloudflare-ddns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oznu%2Fdocker-cloudflare-ddns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oznu%2Fdocker-cloudflare-ddns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oznu","download_url":"https://codeload.github.com/oznu/docker-cloudflare-ddns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871971,"owners_count":16554475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aarch64","alpine-linux-image","amd64","arm","arm64","cloudflare","ddns","docker","dyndns","raspberry-pi","x86-64"],"created_at":"2024-07-31T16:01:05.713Z","updated_at":"2025-09-27T09:31:59.502Z","avatar_url":"https://github.com/oznu.png","language":"Shell","funding_links":["https://paypal.me/oznu"],"categories":["HarmonyOS","Shell","raspberry-pi","arm","DNS"],"sub_categories":["Windows Manager"],"readme":"[![Travis](https://img.shields.io/travis/oznu/docker-cloudflare-ddns.svg)](https://travis-ci.org/oznu/docker-cloudflare-ddns) [![Docker Pulls](https://img.shields.io/docker/pulls/oznu/cloudflare-ddns.svg)](https://hub.docker.com/r/oznu/cloudflare-ddns/)\n\n# Docker CloudFlare DDNS\n\nThis small Alpine Linux based Docker image will allow you to use the free [CloudFlare DNS Service](https://www.cloudflare.com/dns/) as a Dynamic DNS Provider ([DDNS](https://en.wikipedia.org/wiki/Dynamic_DNS)).\n\nThis is a multi-arch image and will run on amd64, aarch64, and armhf devices, including the Raspberry Pi.\n\n## Image Variants\n\n| Image Tag      | Architecture  | OS            | Size   |\n| :------------- | :-------------| :------------ | :----  |\n| latest         | x64           | Alpine Linux  | [![](https://images.microbadger.com/badges/image/oznu/cloudflare-ddns.svg)](https://microbadger.com/images/oznu/cloudflare-ddns) |\n| armhf          | arm32v6       | Alpine Linux  | [![](https://images.microbadger.com/badges/image/oznu/cloudflare-ddns:armhf.svg)](https://microbadger.com/images/oznu/cloudflare-ddns:armhf) |\n| aarch64        | arm64         | Alpine Linux  | [![](https://images.microbadger.com/badges/image/oznu/cloudflare-ddns:aarch64.svg)](https://microbadger.com/images/oznu/cloudflare-ddns:aarch64) |\n\n## Usage\n\nQuick Setup:\n\n```shell\ndocker run \\\n  -e API_KEY=xxxxxxx \\\n  -e ZONE=example.com \\\n  -e SUBDOMAIN=subdomain \\\n  oznu/cloudflare-ddns\n```\n\n## Parameters\n\n* `--restart=always` - ensure the container restarts automatically after host reboot.\n* `-e API_KEY` - Your CloudFlare scoped API token. See the [Creating a Cloudflare API token](#creating-a-cloudflare-api-token) below. **Required**\n  * `API_KEY_FILE` - Path to load your CloudFlare scoped API token from (e.g. a Docker secret). *If both `API_KEY_FILE` and `API_KEY` are specified, `API_KEY_FILE` takes precedence.*\n* `-e ZONE` - The DNS zone that DDNS updates should be applied to. **Required**\n  * `ZONE_FILE` - Path to load your CloudFlare DNS Zone from (e.g. a Docker secret). *If both `ZONE_FILE` and `ZONE` are specified, `ZONE_FILE` takes precedence.*\n* `-e SUBDOMAIN` - A subdomain of the `ZONE` to write DNS changes to. If this is not supplied the root zone will be used.\n  * `SUBDOMAIN_FILE` - Path to load your CloudFlare DNS Subdomain from (e.g. a Docker secret). *If both `SUBDOMAIN_FILE` and `SUBDOMAIN` are specified, `SUBDOMAIN_FILE` takes precedence.*\n\n## Optional Parameters\n\n* `-e PROXIED` - Set to `true` to make traffic go through the CloudFlare CDN. Defaults to `false`.\n* `-e RRTYPE=A` - Set to `AAAA` to use set IPv6 records instead of IPv4 records. Defaults to `A` for IPv4 records.\n* `-e DELETE_ON_STOP` - Set to `true` to have the dns record deleted when the container is stopped. Defaults to `false`.\n* `-e INTERFACE=tun0` - Set to `tun0` to have the IP pulled from a network interface named `tun0`. If this is not supplied the public IP will be used instead. Requires `--network host` run argument.\n* `-e CUSTOM_LOOKUP_CMD=\"echo '1.1.1.1'\"` - Set to any shell command to run them and have the IP pulled from the standard output. Leave unset to use default IP address detection methods.\n* `-e DNS_SERVER=10.0.0.2` - Set to the IP address of the DNS server you would like to use. Defaults to 1.1.1.1 otherwise. \n* `-e CRON=\"@daily\"` - Set your own custom CRON value before the exec portion. Defaults to every 5 minutes - `*/5 * * * *`.\n\n## Depreciated Parameters\n\n* `-e EMAIL` - Your CloudFlare email address when using an Account-level token. This variable MUST NOT be set when using a scoped API token.\n\n## Creating a Cloudflare API token\n\nTo create a CloudFlare API token for your DNS zone go to https://dash.cloudflare.com/profile/api-tokens and follow these steps:\n\n1. Click Create Token\n2. Provide the token a name, for example, `cloudflare-ddns`\n3. Grant the token the following permissions:\n    * Zone - Zone Settings - Read\n    * Zone - Zone - Read\n    * Zone - DNS - Edit\n4. Set the zone resources to:\n    * Include - All zones\n5. Complete the wizard and copy the generated token into the `API_KEY` variable for the container\n\n## Multiple Domains\n\nIf you need multiple records pointing to your public IP address you can create CNAME records in CloudFlare.\n\n## IPv6\n\nIf you're wanting to set IPv6 records set the envrionment variable `RRTYPE=AAAA`. You will also need to run docker with IPv6 support, or run the container with host networking enabled.\n\n## Docker Compose\n\nIf you prefer to use [Docker Compose](https://docs.docker.com/compose/):\n\n```yml\nversion: '2'\nservices:\n  cloudflare-ddns:\n    image: oznu/cloudflare-ddns:latest\n    restart: always\n    environment:\n      - API_KEY=xxxxxxx\n      - ZONE=example.com\n      - SUBDOMAIN=subdomain\n      - PROXIED=false\n```\n\n## License\n\nCopyright (C) 2017-2020 oznu\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the [GNU General Public License](./LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foznu%2Fdocker-cloudflare-ddns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foznu%2Fdocker-cloudflare-ddns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foznu%2Fdocker-cloudflare-ddns/lists"}