{"id":13760687,"url":"https://github.com/hugomd/cloudflare-ddns","last_synced_at":"2025-05-15T10:32:09.782Z","repository":{"id":48459605,"uuid":"143393381","full_name":"hugomd/cloudflare-ddns","owner":"hugomd","description":"Zero dependency dynamic DNS 🐳","archived":false,"fork":false,"pushed_at":"2021-07-25T03:12:29.000Z","size":72,"stargazers_count":67,"open_issues_count":0,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T07:43:14.749Z","etag":null,"topics":["cloudflare","ddns","dns","docker","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/hugomd.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":null,"security":null,"support":null}},"created_at":"2018-08-03T07:25:47.000Z","updated_at":"2025-01-31T01:17:49.000Z","dependencies_parsed_at":"2022-09-19T04:52:14.287Z","dependency_job_id":null,"html_url":"https://github.com/hugomd/cloudflare-ddns","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugomd%2Fcloudflare-ddns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugomd%2Fcloudflare-ddns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugomd%2Fcloudflare-ddns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugomd%2Fcloudflare-ddns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugomd","download_url":"https://codeload.github.com/hugomd/cloudflare-ddns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254322980,"owners_count":22051696,"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":["cloudflare","ddns","dns","docker","golang"],"created_at":"2024-08-03T13:01:16.869Z","updated_at":"2025-05-15T10:32:04.771Z","avatar_url":"https://github.com/hugomd.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Dynamic DNS\n[![](https://images.microbadger.com/badges/image/hugomd/cloudflare-ddns.svg)](https://microbadger.com/images/hugomd/cloudflare-ddns \"Get your own image badge on microbadger.com\") [![](https://images.microbadger.com/badges/version/hugomd/cloudflare-ddns.svg)](https://microbadger.com/images/hugomd/cloudflare-ddns \"Get your own version badge on microbadger.com\") \n\n\u003e Updates a given a DNS record with your current IP\n\nExample with the Cloudflare [provider](#supported-providers):\n```\ndocker run \\\n  -e PROVIDER=cloudflare \\\n  -e CLOUDFLARE_APITOKEN=YOUR_API_TOKEN \\\n  -e CLOUDFLARE_ZONEID=YOUR_ZONE_ID \\\n  -e CLOUDFLARE_HOST=YOUR_DOMAIN \\\n  hugomd/cloudflare-ddns:2.1.0\n```\n\nExample running as a persistant daemon:\n```\ndocker run -d --restart always \\\n  -e PROVIDER=cloudflare \\\n  -e CLOUDFLARE_APITOKEN=YOUR_API_TOKEN \\\n  -e CLOUDFLARE_ZONEID=YOUR_ZONE_ID \\\n  -e CLOUDFLARE_HOST=YOUR_DOMAIN \\\n  hugomd/cloudflare-ddns:2.1.0 -duration 2h\n```\n\nYou can load environment variables through a config file of key/value pairs.\n\n```sh\necho \"PROVIDER=YOUR_PROVIDER\" \u003e config.env\ndocker run \\\n  -v $PWD/config.env:/tmp/config.env \\\n  hugomd/cloudflare-ddns -config /tmp/config.env\n```\n\n**A note about Docker image tags**: `latest` currently points to a now deprecated version of `cloudflare-ddns`, please use versioned tags e.g. `hugomd/cloudflare-ddns:2.0.0`.\n\n# Supported Providers\n\n| Provider                             | Reference (used for `PROVIDER` environment variable) |\n|--------------------------------------|------------------------------------------------------|\n| [Cloudflare](https://cloudflare.com) | `cloudflare`                                         |\n\n# CLI\n\n| Parameter             | Description                                                                                                                                                                | Example           | Required |\n|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|----------|\n| `-duration`           | Runs program perpetually and recheck after specified interval; parses time strings such as `5m`, `15m`, `2h30m5s`. If not specified, or if equal to 0s, run once and exit. | 2h                | `false`  |\n| `-config`             | Loads environment variables from a given file. Variables should be specified as lines of `key=value` pairs. No variables will be loaded if a file is not specified.        | `/tmp/config.env` | `false`  |\n| `-ipv4`             | Enable updates for IPv4 records. Default is `true`        | `false` | `false`  |\n| `-ipv6`             | Enable updates for IPv6 records. Default is `false`        | `true` | `false`  |\n\n\n# Environment Variables\n\nAll providers require the following environment variable:\n\n| Environment Variable            | Description                             | Example       | Required |\n|---------------------------------|-----------------------------------------|---------------|----------|\n| `PROVIDER`                      | The name of the provider you wish to use | `cloudflare` | `true`   |\n\n## Cloudflare\n\n| Environment Variable               | Description                                                                                                                                                | Example                 | Required |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | -------- |\n| `CLOUDFLARE_APITOKEN`              | An [API Token](https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys), with permission to edit DNS records for your zone | `12345`                 | `true`   |\n| `CLOUDFLARE_ZONEID`                | The Zone ID of your domain in Cloudflare (you can find this in the \"Overview\" tab at the bottom of the page)                                               | `dd255baaaaad2e8...`    | `true`   |\n| `CLOUDFLARE_HOST`                  | The record you want to update                                                                                                                              | `subdomain.example.com` | `true`   |\n\n### Deprecated Environment Variables\n\nCloudflare now [supports API tokens](https://blog.cloudflare.com/api-tokens-general-availability/) as a more secure way of interacting with their API. Instead of using your global API key/email, you should use a token with limited permissions.\n\nWhen upgrading, you'll need to replace a few existing environment variables.\n\nInstead of providing a `CLOUDFLARE_ZONE` with your domain name, you should specify the Zone ID (`CLOUDFLARE_ZONEID`) of your domain. You can find this in the \"Overview\" tab for your domain.\n\nInstead of your `CLOUDFLARE_EMAIL` and `CLOUDFLARE_APIKEY`, you should [generate a token](https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys#12345680) (`CLOUDFLARE_APITOKEN`) with permission to edit DNS records for your desired zone.\n\nYou don't need to make any changes to your `CLOUDFLARE_HOST`.\n\n# Contributing\n\n## Adding a new provider\n\nTo add a new provider:\n1. Create a new folder in [`lib/providers`](https://github.com/hugomd/cloudflare-ddns/tree/master/lib/providers), called `your_provider`\n2. Create a package for your provider in the previously created folder, `your_provider`.\n3. Ensure your provider implements the `Provider` interface\n4. Import your provider in [`lib/providers/_all/all.go`](https://github.com/hugomd/cloudflare-ddns/blob/master/lib/providers/_all/all.go)\n5. Open a PR 🎉\n\n# License\n\nMIT, see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugomd%2Fcloudflare-ddns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugomd%2Fcloudflare-ddns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugomd%2Fcloudflare-ddns/lists"}