{"id":18965221,"url":"https://github.com/suleman-elahi/cfddns","last_synced_at":"2025-04-19T12:50:51.844Z","repository":{"id":169995056,"uuid":"629438952","full_name":"Suleman-Elahi/Cfddns","owner":"Suleman-Elahi","description":"A no nonsense python script to treat Cloudflare as a dynamic DNS. Run as Docker container/scheduled task. Ipv4 and Ipv6 support.","archived":false,"fork":false,"pushed_at":"2024-07-14T18:39:06.000Z","size":16,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-16T05:45:17.393Z","etag":null,"topics":["cloudflare","cloudflare-api","ddns","ddns-client","ddns-script","ddns-updater","dynamicdns","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Suleman-Elahi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-18T10:10:57.000Z","updated_at":"2025-03-31T04:17:12.000Z","dependencies_parsed_at":"2024-07-14T20:13:03.726Z","dependency_job_id":null,"html_url":"https://github.com/Suleman-Elahi/Cfddns","commit_stats":null,"previous_names":["suleman-elahi/cfddns"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suleman-Elahi%2FCfddns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suleman-Elahi%2FCfddns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suleman-Elahi%2FCfddns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suleman-Elahi%2FCfddns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Suleman-Elahi","download_url":"https://codeload.github.com/Suleman-Elahi/Cfddns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249699360,"owners_count":21312383,"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","cloudflare-api","ddns","ddns-client","ddns-script","ddns-updater","dynamicdns","python"],"created_at":"2024-11-08T14:28:22.603Z","updated_at":"2025-04-19T12:50:51.826Z","avatar_url":"https://github.com/Suleman-Elahi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Cfddns\n\n![enter image description here](https://res.cloudinary.com/suleman/image/upload/v1686394440/Cfddns.png)\n\nA no nonsense python script to treat Cloudflare as a dynamic DNS. Run as Docker container/scheduled task.\n\nI couldn't find a decent tool to dynamically update IP address in my Cloudflare account, so I created this one here. It is based on Cloudflare and by default is set to update the IP address hourly. But the schedule can be changed and record type as well.\n\n**Only requires domain and API token !!**\n\nThere are various ways to set it up.\n\n## 1. Run Directly\nPerhaps the easiest way. Run the script directly if you have Python and `requests` library installed. Or, grab one of the binary releases if you don't want to install Python and dependencies.\n\n**Run it like this**:\n\n    python3 cfddns.py \u003cDomain\u003e \u003cAPI_Key\u003e \u003cRecord_Type\u003e \n\nExample:\n\n    python3 cfddns.py test.example.com sjdgbueioengfai-sdfjkbf A\n![enter image description here](https://res.cloudinary.com/suleman/image/upload/v1685180449/cfddn.png)\n## 2. Via Task Scheduler on Windows\nI have already provided the `task.scheduler.bat` file in the repository.\nOpen it with a text editor and change the path to the script and path to the python.\n\nNext, just double click on the bat file and a task will be created.\n\n![enter image description here](https://res.cloudinary.com/suleman/image/upload/v1681814326/taskschcfddns.png)\n\nThis task will run hourly, but you can also tweak the schedule to make it run at desired interval.\n## 3. Run as a Docker Container\nThere is a Dockerfile so that you can make it run as a docker container.\nMake sure that Docker is installed. On Debian and Ubuntu based systems and servers, you can install Docker via Snapcraft by running:\n\n    snap install docker\n\nHere's next.\n\n 1. Clone the repo: `git clone https://github.com/Suleman-Elahi/Cfddns`\n 2. Change directory: `cd Cfddns`\n 3. Edit the **crontab** file. Enter your API Key, Record Type to update, and domain.\n 4. Build image: `docker build -t cfddns .`\n 5. Run the container: `docker run -d --name cfddns --restart=always cfddns`\n \n Or, you can also run it in interactive mode:\n\n    docker run -it --rm cfddns\n**Note**: On personal computers, you may need to use `sudo docker` instead of just `docker` in the above commands.\n\n--------------------------------\nThe script only updates the IP if your machine's public IP and IP on Cloudflare do not match.\n\nPRs are welcome :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuleman-elahi%2Fcfddns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuleman-elahi%2Fcfddns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuleman-elahi%2Fcfddns/lists"}