{"id":17684408,"url":"https://github.com/andcool-systems/ddns-js","last_synced_at":"2026-03-04T13:32:30.395Z","repository":{"id":256455009,"uuid":"855359236","full_name":"Andcool-Systems/DDNS-js","owner":"Andcool-Systems","description":"Implementation a DDNS via CloudFlare API","archived":false,"fork":false,"pushed_at":"2025-02-01T20:45:52.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T09:06:42.807Z","etag":null,"topics":["cloudflare","ddns","ddns-updater","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Andcool-Systems.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,"publiccode":null,"codemeta":null}},"created_at":"2024-09-10T18:30:44.000Z","updated_at":"2025-02-01T20:45:56.000Z","dependencies_parsed_at":"2024-09-14T00:07:21.357Z","dependency_job_id":"6d5330bf-8d12-4e47-a6c2-6a2a5df916ea","html_url":"https://github.com/Andcool-Systems/DDNS-js","commit_stats":null,"previous_names":["andcool-systems/ddns.js","andcool-systems/ddns-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andcool-Systems%2FDDNS-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andcool-Systems%2FDDNS-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andcool-Systems%2FDDNS-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andcool-Systems%2FDDNS-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Andcool-Systems","download_url":"https://codeload.github.com/Andcool-Systems/DDNS-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248759134,"owners_count":21157096,"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","ddns-updater","nodejs","typescript"],"created_at":"2024-10-24T10:20:40.170Z","updated_at":"2026-03-04T13:32:30.355Z","avatar_url":"https://github.com/Andcool-Systems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌐 DDNS over CloudFlare\n\n\u003e [!TIP]\n\u003e **Dynamic Domain Name System (DDNS)** is a mechanism for automatically updating DNS records for domain names whenever the IP address changes.\n\n**When is DDNS useful?**\n\n- If you have a **public IP address** that changes periodically.\n- When you need to access your device from the internet using a stable domain name.\n- In cases where your internet provider assigns dynamic IP addresses.\n\n---\n\n## ✨ Features\n\n- 📡 **Automatic IP Update** — Automatically tracks changes to your IP address and updates DNS records.\n- 🔐 **Security** — Uses a CloudFlare token with minimal required access permissions.\n- ⏱️ **Flexible Check Intervals** — Configurable frequency for checking IP addresses.\n- 📋 **Multiple Record Support** — Allows monitoring and updating multiple DNS records simultaneously.\n- 🐳 **Docker Compatibility** — Easy deployment via Docker Compose.\n- 🌐 **IP Address Detection** — Uses the [cdn-cgi/trace](https://www.cloudflare.com/cdn-cgi/trace) service to determine the current IP address.\n\n---\n\n## 🛠️ Configuration — `config.yaml`\n\nTo run the project, a configuration file `config.yaml` must be located in the root directory. Example:\n\n```yaml\nzone: \u003czone id\u003e\nperiod: 30\ntoken: \u003ctoken\u003e\nrecords:\n  - hostname: example.com\n    proxied: false\n  - hostname: test.example.com\n    proxied: true\n```\n\n### Parameters:\n\n- **`zone`** – CloudFlare zone ID.\n- **`period`** – Interval (in seconds) for checking the current IP address *(recommended: 30 seconds)*.\n- **`token`** – Bearer [CloudFlare token](https://dash.cloudflare.com/profile/api-tokens) with permissions to read and modify DNS records.\n- **`records`** – List of DNS records for monitoring and updating:\n  - **`hostname`** – DNS record name.\n  - **`proxied`** – Enables (true) or disables (false) proxying through CloudFlare.\n\n---\n\n## 🚀 Getting Started\n\n### Run via Docker Compose:\n\n```bash\ndocker compose up -d\n```\n\n### Standard TypeScript Run:\n\n1. Install dependencies:\n\n```bash\nnpm install\n```\n\n2. Compile TypeScript code:\n\n```bash\nnpm run build\n```\n\n3. Start the project:\n\n```bash\nnpm run start\n```\n\n---\n\n## ⚙️ How It Works\n\n1. On startup, the application checks for DNS records in CloudFlare based on the parameters in `config.yaml`.\n2. If a record is missing, it creates one with the current IP address.\n3. The program enters an infinite loop, checking the IP address every `period` seconds:\n   - Checks the current IP address.\n   - Updates it in CloudFlare if it has changed.\n\n\u003e [!TIP]\n\u003e It is recommended to set the check interval to at least 30 seconds to avoid excessive requests to the CloudFlare API.\n\n---\n\nCreated with ❤ by AndcoolSystems — *September 10, 2024.*\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandcool-systems%2Fddns-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandcool-systems%2Fddns-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandcool-systems%2Fddns-js/lists"}