willswire/unifi-ddns

TypeScript

Cloudflare DDNS (Dynamic DNS) support for UniFi OS

cloudflarecloudflare-workersddnsddns-updaterdnsubiquitiunifiunifi-controller
スター成長
スター
1.3k
フォーク
3.2k
週間成長
+2
Issue
2
5001k
2022年2月2023年8月2025年2月2026年9月
成果物npm
README

🌩️ Cloudflare DDNS for UniFi OS

CodeQL Code Coverage Dependabot Updates Deploy

A Cloudflare Worker script that enables UniFi devices (e.g., UDM-Pro, USG) to dynamically update DNS A/AAAA records on Cloudflare.

Why Use This?

Note: UniFi Network Application 9.1.92+ includes native Cloudflare DDNS support. If your gateway runs this firmware or newer, you may not need this worker. However, the native implementation does not support multi-hostname updates, dual-stack (IPv4 + IPv6), or preserving proxy status — this worker remains useful for those use cases and for older firmware.

UniFi devices running older firmware do not natively support Cloudflare as a DDNS provider. This script bridges that gap, allowing your UniFi device to keep your DNS records updated with your public IP address.

🚀 Setup Overview

1. Deploy the Cloudflare Worker

Option 1: Click to Deploy

Deploy to Cloudflare Workers

  1. Click the button above.
  2. Complete the deployment.
  3. Note the *.workers.dev route.

Option 2: Deploy with Wrangler CLI

  1. Clone this repository.
  2. Install Wrangler CLI.
  3. Run:
    npm i
    wrangler login
    wrangler deploy
    
  4. Note the *.workers.dev route.

2. Generate a Cloudflare API Token

  1. Go to the Cloudflare Dashboard.
  2. Navigate to Profile > API Tokens
  3. Create a token using the Edit zone DNS template.
  4. Scope the token to one specific zone.
  5. Save the token securely.

3. Configure UniFi OS

  1. Log in to your UniFi OS Controller.
  2. Go to Settings > Internet > WAN > Dynamic DNS.
  3. Create New Dynamic DNS with the following information:
    • Service: custom
    • Hostname: subdomain.example.com or example.com
    • Username: Cloudflare Account Email Address (e.g., you@example.com)
    • Password: Cloudflare User API Token (not an Account API Token)
    • Server: <worker-name>.<worker-subdomain>.workers.dev/update?ip=%i&hostname=%h (Omit https://)

🛠️ Testing & Troubleshooting

Using this script with various Ubiquiti devices and different UniFi software versions can introduce unique challenges. If you encounter issues, start by checking the FAQ in /docs/faq.md. If you don’t find a solution, you can ask a question on the discussions page. If the problem persists, please raise an issue here.

関連リポジトリ
honojs/hono

Web framework built on Web Standards

TypeScriptnpmlibraryMIT Licensecloudflareweb-framework
hono.dev
32.1k1.3k
CloakHQ/CloakBrowser

Stealth Chromium that passes every bot detection test. Drop-in Playwright replacement with source-level fingerprint patches. 30/30 tests passed.

PythonPyPIMIT Licenseanti-detectbot-detection
cloakbrowser.dev
31.3k2.6k
feder-cr/Jobs_Applier_AI_Agent_AIHawk

Open source AI job application toolkit in Python: generate a resume and cover letter tailored to each job posting, and drive a stealth browser from any AI client over MCP.

GNU Affero General Public License v3.0automationpython
30.3k4.6k
XIU2/CloudflareSpeedTest

🌩「自选优选 IP」测试 Cloudflare CDN 延迟和速度,获取最快 IP !当然也支持其他 CDN / 多个解析 IP 的网站 ~

GoGo ModulescliGNU General Public License v3.0cloudflarecdn
28.9k5.4k
kriasoft/react-starter-kit

Modern React starter kit with Bun, TypeScript, Tailwind CSS, tRPC, Stripe, and Cloudflare Workers. Production-ready monorepo for building fast web apps.

TypeScriptnpmMIT Licensereactboilerplate
reactstarter.com
23.7k4.2k
mack-a/v2ray-agent

Xray、Tuic、hysteria2、sing-box 八合一一键脚本

ShellcliGNU Affero General Public License v3.0cloudflarenginx
v2ray-agent.com
21.8k5.5k
jeessy2/ddns-go

Simple and easy to use DDNS. Support Aliyun, Tencent Cloud, Dnspod, Cloudflare, Callback, Huawei Cloud, Baidu Cloud, Porkbun, GoDaddy, Namecheap, NameSilo...

GoGo ModulesMIT Licenseddnsalidns
17.3k1.9k
MatrixTM/MHDDoS

Best DDoS Attack Script Python3, (Cyber / DDos) Attack With 56 Methods

PythonPyPIcliMIT Licenseddosddos-attacks
16.7k3.6k
yonggekkk/Cloudflare-vless-trojan

CF-workers/pages代理脚本:支持Vless-ws(tls)、Trojan-ws(tls);Socks5/http本地代理脚本:可选ECH-TLS、普通TLS、无TLS三种代理模式

JavaScriptnpmcdnvless
ygkkk.blogspot.com/2023/07/cfworkers-vless.html
16k9.7k
cloudflare/cloudflared

Cloudflare Tunnel client

GoGo ModulesApache License 2.0cloudflarereverse-proxy
developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/
15.5k1.4k
FlareSolverr/FlareSolverr

Proxy server to bypass Cloudflare protection

PythonPyPIMIT Licensepuppeteercloudflare
15.5k1.2k
maillab/cloud-mail

A Cloudflare-based email service | 基于 Cloudflare 的邮箱服务 | Cloudflare Email 邮箱 Mail

JavaScriptnpmappMIT Licenseemailcloudflare-email
skymail.ink
14k21.2k