Python script to update Cloudflare record with public dynamic IP
pip install requests python-dotenv
- Create zone and record to be updated on Cloudflare.
- Add environment variables to
.env
file:- CLOUDFLARE_API_KEY
- CLOUDFLARE_ZONE_ID
- CLOUDFLARE_RECORD_ID
- Run
python3 cloudflare-ddns.py
recurrently in crontab to keep the record updated.