Cloudflare Worker for updating DDNS records for QNAP NAS devices.
- Clone the repository and install dependencies.
- Login to Cloudflare via
npx wrangler login - Run
npx wrangler deployto deploy the Cloudflare Worker.
- Go to QNAP NAS Dashboard -> Network & Virtual Switch -> Access Services -> DDNS
- Add a new DDNS service with "custom" DDNS server.
- Set the "URL" to
https://your.workers.dev?username=%USER%&api_token=%PASS%&hostname=%HOST%&myip=%IP%(replaceyour.workers.devwith your actual Cloudflare Worker URL)
Available parameters for the Cloudflare Worker.
| Parameter | Description | Required | Default |
|---|---|---|---|
username |
The username for the Cloudflare account. | Yes | |
api_token |
The API token for the Cloudflare account. (created in Cloudflare Account Profile -> API Tokens) | Yes | |
hostname |
The hostname to update. | Yes | |
myip |
The IP address to update. | Yes | |
ttl |
The TTL for the DNS record. | No | 1 (means 'automatic') |
proxied |
Whether to proxy the DNS record. | No | true |
comment |
The comment for the DNS record. | No |