Cloudflare DDNS

Automatically update Cloudflare DNS records for dynamic IPs. Features IPv4/IPv6 support, proxy control, WAF list management, and robust security features.

This is a small, feature-rich, and robust updater for Cloudflare Dynamic DNS (DDNS). It automatically detects your machine's public IP addresses (both IPv4 and IPv6) and updates your DNS records using the Cloudflare API, ensuring your domains always point to the correct location. It is designed with efficiency, security, and privacy in mind.

Key features include:

  • Lightweight Footprint: The Docker image is less than 5 MB, making it incredibly efficient to run.
  • Complete Domain Support: Manage standard, internationalized (日本。co。jp), and wildcard (*.example.org) domains with ease. You can toggle IPv4 (A) and IPv6 (AAAA) records for each domain.
  • Cloudflare-Specific Features: Toggle the Cloudflare proxy (orange cloud) for each domain and maintain IP address lists that can be used in other Cloudflare products like WAF.
  • Integrated Notifications: Receive alerts on update failures or successes through services like Healthchecks.io, Uptime Kuma, and any service supported by Shoutrrr, including email and major messaging platforms.
  • Secure and Private: IP detection is performed exclusively over secure protocols (HTTPS or DoH) using Cloudflare's own services, minimizing your privacy footprint and protecting against spoofing attacks.

Directory Structure

cloudflare-ddns
.env
docker-compose.yml

docker-compose.yml

services:
  cloudflare-ddns:
    image: favonia/cloudflare-ddns:latest
    container_name: cloudflare-ddns
    restart: unless-stopped
    # network_mode: host # Uncomment if you need to detect the IP of the host interface directly (e.g. for IPv6)
    security_opt:
      - no-new-privileges:true
    environment:
      - CF_API_TOKEN=${CF_API_TOKEN}
      - DOMAINS=example.com,www.example.com
      - PROXIED=true
      - IP4_PROVIDER=ipify-ipv4
      - IP6_PROVIDER=none
      - UPDATE_CRON=@every 5m
      - PUID=1000
      - PGID=1000
      - DELETE_ON_STOP=false
      - PRINT_ZONES=true

.env

CF_API_TOKEN=your_cloudflare_api_token_here
Categories:

Share:

Ad
Favicon

 

  
 

Similar to Cloudflare DDNS

Favicon

 

  
  
Favicon

 

  
  
Favicon