On most Linux versions, you just have to run the script; there is no need to install anything. The script should be executed periodically by a cronjob.
If your public IP has changed since the last run, your Cloudflare A record will be updated.
Connections to the Cloudflare API are only made if the record has to be updated.
- works with Zone API Tokens; no need to use your global API key
- receive updates via Telegram notifications
- easy configuration
- fast and lightweight
- quick access to your IP history
Whole walkthrough with screenshots is coming soon!
- create an Cloudflare API token (CF Documentation)
- find your Zone ID (CF Documentation)
- create your A record on the CF Webinterface (doesn't matter where it points to)
- (Optional) create Telegram Bot; contact Botfather with /newbot and follow the instructions
- (Optional) send a message to @userinfobot to get your chat ID
- copy the dyndns.sh script and edit the variables
- make it executable with
chmod +x dyndns.sh
- add a cronjob with
crontab -e
This cronjob will execute the script every 5 minutes.*/5 * * * * /path/to/script/dyndns.sh > /dev/null 2>&1
- it uses icanhazip.com to get your public IP; this service is also operated by Cloudflare (source)
- if you choose to use telegram notifications, the script will connect to the Telegram API