Cloudflare Worker for handling DDNS requests.
Here's a quick guide on how to get this working:
- Clone this repository.
- Run
npm install
to install the dependencies. - Run
npm deploy
to deploy your worker. - Open your UniFi controller and go to Settings > Internet > Your WAN Connection.
- Make sure Advanced mode is set to Manual.
- Click the "Create New Dynamic DNS" button and enter the following settings:
- Service: custom
- Hostname: your DDNS domain
- Username: the name of the record you want to update
- Password: an API token that has access to modify DNS in your Cloudflare zone
- Server:
your-worker.your-account.workers.dev/update?z=your-zone-id&r=your-record-id&i=%i
- Click the "Create" button.
Now you can test your setup by:
- SSH into your UniFi controller.
- Run
ps aux | grep inadyn
and copy the path to your inadyn configuration file. - Run
inadyn -n -1 --force -f /path/to/inadyn.conf
. - Check the comments in your DDNS record to see if it was updated.