{"id":13552668,"url":"https://github.com/dcerisano/cloudflare-dynamic-dns","last_synced_at":"2025-04-03T03:32:31.717Z","repository":{"id":37026767,"uuid":"193729118","full_name":"dcerisano/cloudflare-dynamic-dns","owner":"dcerisano","description":"Ditch your third-party DDNS service! Cloudflare DDNS curl scripts that call Cloudflare's API (v4) directly.","archived":false,"fork":false,"pushed_at":"2024-02-13T01:52:17.000Z","size":131,"stargazers_count":58,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-03T23:35:04.023Z","etag":null,"topics":["cloudflare","curl","ddns","dynamic-dns","service"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcerisano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-06-25T14:56:35.000Z","updated_at":"2024-10-26T09:23:51.000Z","dependencies_parsed_at":"2024-03-16T23:56:31.287Z","dependency_job_id":"78b93c42-4c17-4af6-9250-c6f36ed69e3d","html_url":"https://github.com/dcerisano/cloudflare-dynamic-dns","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/dcerisano%2Fcloudflare-dynamic-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcerisano%2Fcloudflare-dynamic-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcerisano%2Fcloudflare-dynamic-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcerisano%2Fcloudflare-dynamic-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcerisano","download_url":"https://codeload.github.com/dcerisano/cloudflare-dynamic-dns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246933421,"owners_count":20857049,"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","curl","ddns","dynamic-dns","service"],"created_at":"2024-08-01T12:02:07.549Z","updated_at":"2025-04-03T03:32:26.695Z","avatar_url":"https://github.com/dcerisano.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"![alt text](https://raw.githubusercontent.com/dcerisano/cloudflare-dynamic-dns/master/img/cloudflare-dns.png)\n\nCloudflare DDNS curl scripts that call CF-API (v4) ***directly***.\n\nMy third-party DDNS service stopped working recently with CF.\nIt seems CF has moved to a new API (v4).\n\nThe very good news is you can ditch third-party DDNS and simply run a DDNS shell script as a cron job every minute on your webserver. It calls the new CF API ***directly***.\n\nThis is a bare bones script that requires:\n* Internet connectivity is available.\n* CF API v4 service  is available\n* api.ipify.org service is available\n\nYou need the Zone ID,  Authorization key and A-record ID for your domain.\n\n**Fetch** the first two  from your CF account.\n\n**Create** the A-record in CF named \"dynamic\".\n\n**Create** the CNAME alias (example.com --\u003e dynamic.example.com) \n\n![alt text](https://raw.githubusercontent.com/dcerisano/cloudflare-dynamic-dns/master/img/cf.png)\n\n**Fetch** The A-record ID with [cloudflare-dns-id.sh](https://raw.githubusercontent.com/dcerisano/cloudflare-dynamic-dns/master/cloudflare-dns-id.sh)\n\n**Run** [cloudflare-ddns.sh](https://raw.githubusercontent.com/dcerisano/cloudflare-dynamic-dns/master/cloudflare-ddns.sh) as a cron job `* * * * *    /.../cloudflare-ddns.sh`\n\n**Test** by changing your A-record to a bogus IP and then deleting `/tmp/ip-record`\nThe cron job will change the A-record to your webserver IP address on it's next run.\n\n**Marvel** at your own dynamic dns service - no more surrendering your CF Authorization key to a third party DDNS service.\n\n**Note** that the CNAME alias masks your real IP address - a fundamental advantage of CF. Naming the A-record directly as your domain (example.com) would allow anyone to see your real IP address just by `ping example.com`. Try it!\n\n**Note** that you will need to update this script:\n* if your CF Zone ID, Authorization key, or A-record ID change. Only you can change these.\n* if CF API v4 is deprecated. It is currently new, so should be stable for many years.\n* if api.ipify.org is deprecated. There are many others. Or use `dig` if you like.\n\n**TO DO**\n* Convert curl from linux bash script to other platforms.\n* DONE: Windows BAT\n\n**DO NOT** commit your Authorization key to GitHub - thar be dragons. Purge any such commits and change your key.\n\n![alt text](https://raw.githubusercontent.com/dcerisano/cloudflare-dynamic-dns/master/img/dragon-key.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcerisano%2Fcloudflare-dynamic-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcerisano%2Fcloudflare-dynamic-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcerisano%2Fcloudflare-dynamic-dns/lists"}