Dynamic DNS (DDNS) service based on Cloudflare! Access your home network remotely via a custom domain name without a static IP! Written in pure BASH~
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Joel Gray ef7d980da9 Add start service instructions 1 year ago
LICENSE Initial commit 5 years ago
README.md Add start service instructions 1 year ago
cloudflare-dns-updater-v6.sh Update readme 1 year ago
cloudflare-dns-updater.sh Update readme 1 year ago

README.md

Cloudflare Dynamic DNS IP Updater

This script is used to update Dynamic DNS (DDNS) service based on Cloudflare! Access your home network remotely via a custom domain name without a static IP! Written in pure BASH.

This version of this script allows you to update multiple domains/sub domains with the same public IP for IPv4, IPv6 version remains per single domain.

Clone

git clone https://github.com/joeltgray/cloudflare-ddns-updater.git

Usage

This version of the script is used with systemd. Update the paths in config below to match your setup. If you need to know how to use systemd services check out my blog here: Running A Service on Systemd

Make the service file

nano /etc/systemd/system/cloudflare-ddns-updater.service

[Unit]
Description=Service to update Cloudflare servers with this servers public IP

[Service]
ExecStart=/bin/bash  /path/to/your/cloudflare-ddns-updater/cloudflare-updater.sh
Restart=
EnvironmentFile=/etc/environment

[Install]
WantedBy=multi-user.target

Make the service timer file

nano /etc/systemd/system/cloudflare-ddns-updater.timer

[Unit]
Description=Run the script for Cloudflare SDNS updates every 5 minutes

[Timer]
OnCalendar=*-*-* *:00/5:05
OnBootSec=5
Persistent=true

[Install]
WantedBy=timers.target

Enable and start the service

systemctl daemon-reload systemctl enable cloudflare-ddns-updater.service systemctl enable cloudflare-ddns-updater.timer systemctl start cloudflare-ddns-updater.timer

Tested Environments:

Original:
macOS Mojave version 10.14.6 (x86_64)
AlmaLinux 9.3 (Linux kernel: 5.14.0 | x86_64)
Debian Bullseye 11 (Linux kernel: 6.1.28 | aarch64)

This version:
Debian 11 (Linux kernel: 6.1.0-0.deb11.13-amd64 | x86_64)
Arch rolling (Linux kernel: 6.7.4-arch1-1 | x86_64)
Raspbian 11 (Linux kernel: 6.1.21-v8+ | aarch64)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Reference

This script was originally made by Keld Norman video, I've adapted from Jason K's version

License

MIT