{"id":19608911,"url":"https://github.com/fire1ce/ddns-cloudflare-powershell","last_synced_at":"2025-04-06T08:11:25.619Z","repository":{"id":48971613,"uuid":"300930150","full_name":"fire1ce/DDNS-Cloudflare-PowerShell","owner":"fire1ce","description":"Cloudflare DDNS PowerShell Script for Windows OS. Choose any source IP address to update external or internal (WAN/LAN). Cloudflare's options proxy and TTL configurable via the parameters.","archived":false,"fork":false,"pushed_at":"2025-02-24T08:31:21.000Z","size":12,"stargazers_count":101,"open_issues_count":4,"forks_count":25,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-30T07:07:48.518Z","etag":null,"topics":["cloudflare","cloudflare-api","cloudflare-ddns","cloudflare-ddns-script","cloudflare-dns","ddns","windows","windows-server"],"latest_commit_sha":null,"homepage":"https://3os.org","language":"PowerShell","has_issues":false,"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/fire1ce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null},"funding":{"github":"fire1ce","patreon":"fire1ce","custom":["https://www.buymeacoffee.com/fire1ce"]}},"created_at":"2020-10-03T16:50:36.000Z","updated_at":"2025-03-27T16:21:44.000Z","dependencies_parsed_at":"2024-07-15T16:04:15.919Z","dependency_job_id":"97c0f428-8db4-4712-8ac9-0b8b142009ea","html_url":"https://github.com/fire1ce/DDNS-Cloudflare-PowerShell","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/fire1ce%2FDDNS-Cloudflare-PowerShell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire1ce%2FDDNS-Cloudflare-PowerShell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire1ce%2FDDNS-Cloudflare-PowerShell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire1ce%2FDDNS-Cloudflare-PowerShell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fire1ce","download_url":"https://codeload.github.com/fire1ce/DDNS-Cloudflare-PowerShell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451652,"owners_count":20940939,"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","cloudflare-ddns","cloudflare-ddns-script","cloudflare-dns","ddns","windows","windows-server"],"created_at":"2024-11-11T10:18:32.501Z","updated_at":"2025-04-06T08:11:25.602Z","avatar_url":"https://github.com/fire1ce.png","language":"PowerShell","readme":"# DDNS Cloudflare PowerShell Script\n\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/fire1ce/3os.org/tree/master/src)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://mit-license.org/)\n\n- DDNS Cloudflare PowerShell script for **Windows**.\n- Choose any source IP address to update **external** or **internal** _(WAN/LAN)_.\n- For multiple LAN interfaces like Wifi, Docker Networks and Bridges the script will automatically detect the primary Interface by priority.\n- Cloudflare's options for proxy and TTL configurable via the parameters.\n- Optional Telegram or Discord Notifications\n\n## Requirements\n\n- Cloudflare [api-token](https://dash.cloudflare.com/profile/api-tokens) with ZONE-DNS-EDIT Permissions\n- DNS Record must be pre created (api-token should only edit dns records)\n- Enabled running unsigned PowerShell\n\n### Creating Cloudflare API Token\n\nTo create a CloudFlare API token for your DNS zone go to [https://dash.cloudflare.com/profile/api-tokens][cloudflare-api-token-url] and follow these steps:\n\n1. Click Create Token\n2. Select Create Custom Token\n3. Provide the token a name, for example, `example.com-dns-zone-readonly`\n4. Grant the token the following permissions:\n   - Zone - DNS - Edit\n5. Set the zone resources to:\n   - Include - Specific Zone - `example.com`\n6. Complete the wizard and use the generated token at the `CLOUDFLARE_API_TOKEN` variable for the container\n\n## Installation\n\n[Download the DDNS-Cloudflare-PowerShell zip file](https://github.com/fire1ce/DDNS-Cloudflare-PowerShell/archive/refs/heads/main.zip) \u0026 Unzip,\nrename the folder to _DDNS-Cloudflare-PowerShell_ place in a directory of your choosing\n\n## Config Parameters\n\nUpdate the config parameters inside the update-cloudflare-dns_conf.ps1 by editing accordingly. See below for examples.\n\n| **Option**                | **Example**      | **Description**                                           |\n| ------------------------- | ---------------- | --------------------------------------------------------- |\n| what_ip                   | internal         | Which IP should be used for the record: internal/external |\n| dns_record                | ddns.example.com | DNS **A** record which will be updated                    |\n| cloudflare_zone_api_token | ChangeMe         | Cloudflare API Token **KEEP IT PRIVATE!!!!**               |\n| zoneid                    | ChangeMe         | Cloudflare's Zone ID                                      |\n| proxied                   | false            | Use Cloudflare proxy on dns record true/false             |\n| ttl                       | 120              | 120-7200 in seconds or 1 for Auto                         |\n\n### Optional Notifications Parameters for Telegram\n\n| **Option**             | **Example** | **Description**                   |\n| ---------------------- | ----------- | --------------------------------- |\n| notify_me_telegram     | yes         | Use Telegram notifications yes/no |\n| telegram_chat_id       | ChangeMe    | Chat ID of the bot                |\n| telegram_bot_API_Token | ChangeMe    | Telegram's Bot API Token          |\n\n### Optional Notification Parameters for Discord\n\n| **Option**             | **Example**                  | **Description**                               |\n| ---------------------- | ---------------------------- | --------------------------------------------- |\n| notify_me_discord      | yes                          | Use Discord notifications yes/no              |\n| discord_webhook_URL    | http://WebhookURL.com/asd/   | Webhook URL from your Discord server settings |\n\nTo generate a webhook URL, follow the [official Discord instructions](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks). \n## Running The Script\n\nOpen cmd/powershell\n\nExample:\n\n```bash\npowershell.exe -ExecutionPolicy Bypass -File C:\\DDNS-Cloudflare-PowerShell\\update-cloudflare-dns.ps1\n```\n\n## Automation With Windows Task Scheduler\n\nExample:\nRun at boot with 1 min delay and repeat every 1 min\n\n- Open Task Scheduler\n- Action -\u003e Crate Task\n- **General Menu**\n  - Name: update-cloudflare-dns\n  - Run whether user is logged on or not\n- **Trigger**\n  - New...\n  - Begin the task: At startup\n  - Delay task for: 1 minute\n  - Repeat task every: 1 minute\n  - for duration of: indefinitely\n  - Enabled\n- **Actions**\n  - New...\n  - Action: Start a Program\n  - Program/script: _C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe_\n  - Add arguments: _-ExecutionPolicy Bypass -File C:\\DDNS-Cloudflare-PowerShell\\update-cloudflare-dns.ps1_\n  - ok\n  - Enter your user's password when prompted\n- **Conditions**\n  - Power: Uncheck - [x] Start the task only if the computer is on AC power\n\n## Logs\n\nThis Script will create a log file with **only** the last run information  \nLog file will be located as same directory as _update-cloudflare-dns.ps1_\n\nLog file name:\n\n```bash\nupdate-cloudflare-dns.log\n```\n\n## Limitations\n\n- Does not support IPv6\n\n## License\n\n### MIT License\n\nCopyright© 3os.org @2020\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\u003c!-- urls --\u003e\n\u003c!-- appendices --\u003e\n\n[cloudflare-api-token-url]: https://dash.cloudflare.com/profile/api-tokens 'Cloudflare API Token'\n\n\u003c!-- end appendices --\u003e\n","funding_links":["https://github.com/sponsors/fire1ce","https://patreon.com/fire1ce","https://www.buymeacoffee.com/fire1ce"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffire1ce%2Fddns-cloudflare-powershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffire1ce%2Fddns-cloudflare-powershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffire1ce%2Fddns-cloudflare-powershell/lists"}