Back to rankings

willswire/unifi-ddns

TypeScript

Cloudflare DDNS (Dynamic DNS) support for UniFi OS

cloudflarecloudflare-workersddnsddns-updaterdnsubiquitiunifiunifi-controller
Star Growth
Stars
1.3k
Forks
3.2k
Weekly Growth
Issues
2
5001k
Feb 2022Jul 2023Jan 2025Jul 2026
Artifactsnpmnpm install unifi-ddns
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.

Related repositories
honojs/hono

Web framework built on Web Standards

TypeScriptnpmMIT Licensecloudflareweb-framework
hono.dev
31.4k1.2k
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
28.9k2.3k
XIU2/CloudflareSpeedTest

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

GoGo ModulesGNU General Public License v3.0cloudflarecdn
28k5.3k
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.6k4.2k
mack-a/v2ray-agent

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

ShellGNU Affero General Public License v3.0cloudflarenginx
v2ray-agent.com
21.5k5.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.1k1.9k
MatrixTM/MHDDoS

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

PythonPyPIMIT Licenseddosddos-attacks
16.4k3.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
15.6k9.6k
cloudflare/cloudflared

Cloudflare Tunnel client

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

Proxy server to bypass Cloudflare protection

PythonPyPIMIT Licensepuppeteercloudflare
14.8k1.2k
ultrafunkamsterdam/undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)

PythonPyPIGNU General Public License v3.0chromedriverselenium
github.com/UltrafunkAmsterdam/undetected-chromedriver
12.8k1.3k
maillab/cloud-mail

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

JavaScriptnpmMIT Licenseemailcloudflare-email
skymail.ink
12.6k18.3k