free alternative to paid dynamic DNS services like NoIP.com
free alternative to paid dynamic DNS services like NoIP.com
This project provides a free alternative to paid dynamic DNS services like NoIP.com. It allows you to update your DNS records on Cloudflare automatically using a free Cloudflare account and a cronjob on your computer.
Clone this repository to your local machine.
Create a keys.json file in the ~/.cloudflare-noip/ directory with the following structure:
{
"api_key": "your_cloudflare_api_key",
"email": "your_cloudflare_email",
"zone_ids": {
"website_name1":"cloudflare_zone_id1",
"website_name2":"cloudflare_zone_id2"
}
}To get your Cloudflare API key and zone ID:
records.json file in the ~/.cloudflare-noip/ directory with the following structure:[
{
"record_name": "sub.domain.xyz",
"record_type": "A",
"proxied": true
"website_name": "domain.xyz"
},
{
"record_name": "sub.domain1.xyz",
"record_type": "A",
"proxied": true
"website_name": "domain1.xyz"
}
]The content field will be automatically updated with the IP address of the machine running the script.
Ubuntu/Debian:
crontab -eAdd the following line to run the script every minute, this script will run every second for 60 times. (one HN user rightly pointed out that since it's a home server 1 second update is more appropriate; this frequency is your max downtime. Update: from this version onwards, this program will only update Cloudflare if IP changes.)
*/1 * * * * cd /path/to/cloudflare-noip && /usr/bin/python3 main.pyrestart cron (optional)
sudo systemctl restart cronmacOS (using launchd):
~/Library/LaunchAgents/ called com.example.cloudflare-noip.plist with the following contents:
Label
com.example.cloudflare-noip
ProgramArguments
/usr/bin/python3
/Users/d/Projects/cloudflare-noip/main.py
StartInterval
60
launchctl load ~/Library/LaunchAgents/com.example.cloudflare-noip.plistWindows (using Task Scheduler):
taskschd.msc, and press Enter.python.exe with the argument /path/to/cloudflare_noip.py.The script will update the DNS records on Cloudflare with the current IP address of the machine running the script at the specified interval.
No open issues yet, or sync has not completed.