{"id":16575509,"url":"https://github.com/jmrplens/cloudflare-dns-updater","last_synced_at":"2026-04-08T02:01:17.055Z","repository":{"id":173780585,"uuid":"651279075","full_name":"jmrplens/Cloudflare-DNS-Updater","owner":"jmrplens","description":"Bash script to update, create or delete IPv4 and IPv6 records in @Cloudflare.","archived":false,"fork":false,"pushed_at":"2026-04-01T14:20:18.000Z","size":6977,"stargazers_count":22,"open_issues_count":0,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-01T16:19:18.550Z","etag":null,"topics":["bash","bats","cloudflare","coverage","dynamic-dns","dyndns","ipv4","ipv6","script","shell","unittest"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/jmrplens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"jmrplens","patreon":null,"open_collective":null,"ko_fi":"jmrplens","tidelift":null,"community_bridge":null,"liberapay":"jmrplens","issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-06-08T22:48:03.000Z","updated_at":"2026-04-01T14:20:20.000Z","dependencies_parsed_at":"2024-08-18T18:45:36.437Z","dependency_job_id":"da697580-331b-44e0-832c-3e41c02069de","html_url":"https://github.com/jmrplens/Cloudflare-DNS-Updater","commit_stats":null,"previous_names":["jmrplens/dyndns_cloudflare_ipv4-6","jmrplens/cloudflare-dns-updater"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/jmrplens/Cloudflare-DNS-Updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrplens%2FCloudflare-DNS-Updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrplens%2FCloudflare-DNS-Updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrplens%2FCloudflare-DNS-Updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrplens%2FCloudflare-DNS-Updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmrplens","download_url":"https://codeload.github.com/jmrplens/Cloudflare-DNS-Updater/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrplens%2FCloudflare-DNS-Updater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31536473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","bats","cloudflare","coverage","dynamic-dns","dyndns","ipv4","ipv6","script","shell","unittest"],"created_at":"2024-10-11T21:48:16.720Z","updated_at":"2026-04-08T02:01:17.048Z","avatar_url":"https://github.com/jmrplens.png","language":"Shell","funding_links":["https://github.com/sponsors/jmrplens","https://ko-fi.com/jmrplens","https://liberapay.com/jmrplens"],"categories":[],"sub_categories":[],"readme":"# Cloudflare DNS Updater\n\nA Bash-based script to automatically update Cloudflare DNS records with your dynamic public IP address. Designed for efficiency and compatibility across **Linux**, **macOS**, and **Windows**.\n\n![Binaries Build](https://github.com/jmrplens/Cloudflare-DNS-Updater/actions/workflows/binaries.yml/badge.svg)\n![Lint Check](https://github.com/jmrplens/Cloudflare-DNS-Updater/actions/workflows/lint.yml/badge.svg)\n\n## Key Features\n\n-   **Batch Updates**: Updates multiple DNS records in a single API call to minimize latency.\n-   **IP Detection**:\n    -   **Local**: Detects global IPv6 addresses directly from the network interface.\n    -   **External**: Uses multiple fallback services (`icanhazip`, `ifconfig.co`, `ipify`) for redundancy.\n-   **Cross-Platform**: Runs on Linux, macOS, and Windows (via bundled binaries or Bash).\n-   **Notifications**: Support for Telegram and Discord alerts upon IP changes.\n-   **Logging**: Rotation-aware logs with optional debug mode.\n-   **Safety**: Lockfile mechanism to prevent concurrent executions.\n\n---\n\n## Installation\n\n### Option A: Standalone Binaries\nPre-compiled binaries are available that bundle all necessary dependencies (Bash, Curl, JQ).\n\n1.  **Download** the latest release for your OS from the [Releases Page](../../releases).\n    *   **Linux**: `cf-updater-linux-x86_64` (Intel/AMD) or `cf-updater-linux-aarch64` (ARM/Raspberry Pi)\n    *   **macOS**: `cf-updater-macos-x86_64` (Intel) or `cf-updater-macos-aarch64` (Apple Silicon)\n    *   **Windows**: `cf-updater-windows-x86_64.exe`\n2.  **Make Executable** (Linux/macOS only):\n    ```bash\n    chmod +x cf-updater-linux-x86_64\n    ```\n\n### Option B: Run from Source\nIf you prefer to run the script directly, ensure you have the required dependencies installed.\n\n**Dependencies:**\n*   [Bash](https://www.gnu.org/software/bash/) (4.0+)\n*   [Curl](https://curl.se/)\n*   [JQ](https://jqlang.github.io/jq/)\n\n**Setup:**\n1.  Clone the repository:\n    ```bash\n    git clone https://github.com/jmrplens/Cloudflare-DNS-Updater.git\n    cd Cloudflare-DNS-Updater\n    ```\n2.  Run the script:\n    ```bash\n    ./cloudflare-dns-updater.sh\n    ```\n\n---\n\n## Configuration\n\nCopy the example configuration file and edit it with your details.\n\n```bash\ncp config.example.yaml cloudflare-dns.yaml\n```\n\n**Example `cloudflare-dns.yaml`:**\n\n```yaml\n---\ncloudflare:\n  zone_id: \"your_zone_id_here\"\n  api_token: \"your_api_token_here\"\n\noptions:\n  proxied: true   # true for Orange Cloud (Proxy), false for DNS only\n  ttl: 1          # 1 for Auto, or value in seconds (60-3600)\n  interface: \"\"   # Optional: Force specific interface (e.g., \"eth0\")\n\ndomains:\n  # Update both IPv4 and IPv6 (default)\n  - name: \"example.com\"\n\n  # Update only IPv4\n  - name: \"ipv4.example.com\"\n    ip_type: \"ipv4\"\n\n  # Update only IPv6\n  - name: \"ipv6.example.com\"\n    ip_type: \"ipv6\"\n\n  # Override global proxy setting\n  - name: \"direct.example.com\"\n    proxied: false\n\nnotifications:\n  telegram:\n    enabled: false\n    bot_token: \"\"\n    chat_id: \"\"\n\n  discord:\n    enabled: false\n    webhook_url: \"\"\n```\n\n---\n\n## Usage Examples\n\n### CLI Options\n*   `-s, --silent`: Run without console output (ideal for Cron).\n*   `-d, --debug`: Enable verbose logging and API response output.\n*   `-f, --force`: Force an update even if the IP has not changed.\n\n### Linux / macOS Automation (Cron)\nTo run the updater every 5 minutes:\n\n1.  Open crontab: `crontab -e`\n2.  Add the line:\n    ```bash\n    */5 * * * * /path/to/cf-updater-linux-x86_64 --silent\n    ```\n\n### Windows Automation (Task Scheduler)\n1.  Open **Task Scheduler** and \"Create Basic Task\".\n2.  Name it \"Cloudflare DNS Updater\".\n3.  Set Trigger to **Daily**, then in properties set \"Repeat task every X minutes\" (e.g., 5 or 10).\n4.  Action: **Start a Program**.\n5.  Program/script: Browse to `cf-updater-windows-x86_64.exe`.\n6.  Add arguments: `--silent`.\n\n---\n\n## Development\n\nFor detailed instructions on building, testing, and understanding the project structure, please see [CONTRIBUTING.md](CONTRIBUTING.md).\n\nQuick start for building binaries:\n\n1.  **Validate Code**:\n    ```bash\n    ./tools/validate.sh\n    ```\n2.  **Build All Binaries**:\n    ```bash\n    ./tools/build-all.sh --all\n    ```\n    Artifacts will be created in the `dist/` directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrplens%2Fcloudflare-dns-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmrplens%2Fcloudflare-dns-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrplens%2Fcloudflare-dns-updater/lists"}