{"id":23659266,"url":"https://github.com/hectorm/cloudflare-worker-ddns","last_synced_at":"2025-04-10T17:23:09.344Z","repository":{"id":270156674,"uuid":"909493802","full_name":"hectorm/cloudflare-worker-ddns","owner":"hectorm","description":"Dynamic DNS (DDNS) service implementation for Cloudflare Workers.","archived":false,"fork":false,"pushed_at":"2024-12-28T21:44:14.000Z","size":5,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T00:43:06.733Z","etag":null,"topics":["cloudflare","cloudflare-workers","ddns","dynamic-dns","ubiquiti","unifi","unifi-controller"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hectorm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"hectorm","custom":"https://hector.molinero.dev/donate"}},"created_at":"2024-12-28T21:43:10.000Z","updated_at":"2025-03-26T03:41:38.000Z","dependencies_parsed_at":"2024-12-29T01:15:11.762Z","dependency_job_id":null,"html_url":"https://github.com/hectorm/cloudflare-worker-ddns","commit_stats":null,"previous_names":["hectorm/cloudflare-worker-ddns"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hectorm%2Fcloudflare-worker-ddns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hectorm%2Fcloudflare-worker-ddns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hectorm%2Fcloudflare-worker-ddns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hectorm%2Fcloudflare-worker-ddns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hectorm","download_url":"https://codeload.github.com/hectorm/cloudflare-worker-ddns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261947,"owners_count":21074226,"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-workers","ddns","dynamic-dns","ubiquiti","unifi","unifi-controller"],"created_at":"2024-12-29T02:43:19.548Z","updated_at":"2025-04-10T17:23:09.311Z","avatar_url":"https://github.com/hectorm.png","language":"JavaScript","funding_links":["https://github.com/sponsors/hectorm","https://hector.molinero.dev/donate"],"categories":[],"sub_categories":[],"readme":"# Cloudflare Dynamic DNS worker\n\n[Dynamic DNS](https://help.dyn.com/remote-access-api/perform-update/) service implementation for Cloudflare Workers.\n\n## Deployment instructions\n\n 1. Create the desired DNS record(s) in Cloudflare.\n 2. [Deploy the worker](https://developers.cloudflare.com/workers/get-started/).\n 3. Set the following [variables and secrets](https://developers.cloudflare.com/workers/configuration/secrets/#via-the-dashboard) in the worker dashboard:\n    - `DDNS_USERNAME`: a username for the Dynamic DNS service.\n    - `DDNS_PASSWORD`: a password for the Dynamic DNS service.\n    - `DDNS_RECORD_ALLOWLIST`: a comma-separated list of DNS record(s) that the Dynamic DNS service is allowed to update (optional).\n    - `CF_API_TOKEN`: a [Cloudflare API token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) with the `Zone.DNS:Edit` permission.\n 4. Test the worker with the following command (optional):\n    ```sh\n    curl --verbose --user \"\u003cusername\u003e\" \"https://\u003cworker-name\u003e.\u003csubdomain\u003e.workers.dev/nic/update?hostname=\u003chostname\u003e\u0026myip=\u003cip\u003e\"\n    ```\n\n## Setup with UniFi OS\n\n\u003e [!NOTE]\n\u003e Tested on UDM-Pro-Max with UniFi OS 4.0.21 (Network 8.6.9 - inadyn 2.12.0).\n\n 1. Log in to the [UniFi OS Controller](https://unifi.ui.com) web interface.\n 2. Navigate to `Settings` -\u003e `Internet` -\u003e WAN interface -\u003e `Advanced` -\u003e `Dynamic DNS`.\n 3. Set the following options:\n    - `Service`: `custom`.\n    - `Hostname`: the DNS record to update, must be in the `DDNS_RECORD_ALLOWLIST` if set.\n    - `Username`: same as the `DDNS_USERNAME` worker variable.\n    - `Password`: same as the `DDNS_PASSWORD` worker variable.\n    - `Server`: `\u003cworker-name\u003e.\u003csubdomain\u003e.workers.dev/nic/update?hostname=%h\u0026myip=%i`, **do not include** the `https://` scheme (it is added automatically), `%h` and `%i` are placeholders that UniFi OS automatically fills in.\n 4. Test the configuration by running the following command in the [UniFi OS shell](https://help.ui.com/hc/en-us/articles/204909374-UniFi-Connect-with-Debug-Tools-SSH) (optional):\n    ```sh\n    inadyn --foreground --once --force --loglevel debug --config /run/ddns-ppp0-inadyn.conf\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhectorm%2Fcloudflare-worker-ddns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhectorm%2Fcloudflare-worker-ddns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhectorm%2Fcloudflare-worker-ddns/lists"}