Simple Node.js Service will update your Cloudflare DNS records whenever your IP Adreess changes. It will check for your ip address in Cloudflare and your current ip and update it as provied in fixed intervals.
- Supports both IPv4 (
A
) & IPv6 (AAAA
). - Depends on
https://cloudflare.com/cdn-cgi/trace
&https://www.ipify.org/
Make a config.json file with all info (in root dir of app).
{
"auth":{
// Create a token with Edit DNS permission: https://developers.cloudflare.com/fundamentals/api/get-started/create-token/
"token":"CLOUDFLARE_AUTH_TOKEN",
"email": "CLOUDFLARE_EMAIL"
},
"records": [
{
"name":"example.com",
"type":"A",
"proxied":false,
// Open a domain, the ZoneId should be visible on the right panel
"zoneId":"ZONE_ID_OF_DOMAIN"
}
],
}
version: '3'
services:
cloudflare-updater:
image: ghcr.io/rohit267/cloudflare-node-ddns:latest
container_name: cloudflare-updater
restart: unless-stopped
volumes:
- ./config.json:/app/config.json
network_mode: "host"