Skip to content

πŸš€ Simple dynamic DNS update script for Cloudflare.

License

Notifications You must be signed in to change notification settings

tbshfr/ddns-cloudflare-bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Simple dynamic DNS update script for Cloudflare

Access your home network through your own domain without a static IP!

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.

Features:


  • 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

Quick start


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
    */5 * * * * /path/to/script/dyndns.sh > /dev/null 2>&1
    
    This cronjob will execute the script every 5 minutes.

Privacy:

  • 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

About

πŸš€ Simple dynamic DNS update script for Cloudflare.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages