This project is a Dynamic DNS (DDNS) client that updates your Cloudflare DNS records automatically. It allows you to keep your domain's DNS records up-to-date with your current IP address, which is useful if you have a dynamic IP address from your ISP.
- Automatically updates Cloudflare DNS records with your current IP address.
- Support for IPv4.
- Support for IPv6.
- Simple configuration file for easy setup.
- Support for Discord WebHook for logs.
- Python 3.x
requestslibrary (install withpip install requests)python-dotenvlibrary (install withpip install python-dotenv)
-
Clone the repository:
git clone https://github.com/rapha4lx/cloudflare-ddns.git cd cloudflare-ddns -
Install the required Python packages:
pip install -r requirements.txt
-
Edit the
.envfile with your details:nano .env
-
Add your Cloudflare API token, zone ID, and DNS record details to the
.envfile.
Add the DDNS client to crontab to run every 5 minutes:
*/5 * * * * python3 ~/cloudflare-ddns/main.py