This script is modified from GoDaddyDNS to keep Cloudflare's DNS records updated with your current external IP address. This creates a Dynamic DNS solution for domain names that use Cloudflare as their authoritative nameservers.
This script assumes that you already have a Cloudflare account and your domain(s) are added and active.
- Cloudflare account
- Domain name added and active on Cloudflare
- Cloudflare API Token via Cloudflare Dashboard
- Python 3.12.6 64 bit
- cloudflare-python 3.1.0
- pif 0.8.2 module for Python
- Download and install Python
- Install cloudflare-python module for Python
- Install the pif module for Python (pip install pif)
- Copy CloudflareDynDNS.py to the system you will run from (only one system per network is needed)
- Copy and modify the CloudflareDynDNS.ini
- Edit CloudflareDynDNS.py to point to your CloudflareDynDNS.ini and select a location for the log file
- Schedule a recurring job to run CloudflareDynDNS.py
-
Python - Python is a programming language that lets you work quickly and integrate systems more effectively.
-
PyCharm - The Python IDE for Professional Developers
-
cloudflareDynDNS - Python library useful for updating DNS settings through the GoDaddy v1 API
-
pif - Public IP address checker