- Notifications
You must be signed in to change notification settings - Fork3.5k
Cloudflare DDNS (Dynamic DNS) support for UniFi OS
License
NotificationsYou must be signed in to change notification settings
willswire/unifi-ddns
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A Cloudflare Worker script that enables UniFi devices (e.g., UDM-Pro, USG) to dynamically update DNS A/AAAA records on Cloudflare.
UniFi devices 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.
- Click the button above.
- Complete the deployment.
- Note the
*.workers.dev
route.
- Clone this repository.
- InstallWrangler CLI.
- Run:
wrangler loginwrangler deploy
- Note the
*.workers.dev
route.
- Go to theCloudflare Dashboard.
- Navigate toProfile > API Tokens
- Create a token using theEdit zone DNS template.
- Scope the token toone specific zone.
- Save the token securely.
- Log in to yourUniFi OS Controller.
- Go toSettings > Internet > WAN > Dynamic DNS.
- Create New Dynamic DNS with the following information:
- Service:
custom
- Hostname:
subdomain.example.com
orexample.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
(Omithttps://
)
- Service:
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 thediscussions page. If the problem persists, please raise an issuehere.
About
Cloudflare DDNS (Dynamic DNS) support for UniFi OS