Roll your own free dynamic DNS (DynDNS) service with these simple steps:
- Host your DNS zone with a provider offering API access.
- Deploy a DynDNS script to a FaaS platform.
For Cloudflare, follow these instructions:
- Add your domain to Cloudflare.
- Set up your development environment.
- Deploy the DynDNS worker:
- Obtain the worker script and run
npm i
. - Modify the domain in
wrangler.jsonc
. - Add subdomain tokens to
src/tokens.json
. - Execute
wrangler deploy
.
- Obtain the worker script and run
Verify operation with these commands:
# Sets the A/AAAA record to the IP address from the request.
curl https://dyndns.your.domain/your_token
# Explicitly sets the A/AAAA records.
curl https://dyndns.your.domain/your_token?ipv4=1.2.3.4&ipv6=::1
# Removes the A/AAAA records.
curl -XDELETE https://dyndns.your.domain/your_token
That’s all there is to it!