aribasadme/cloudflare-ddns

By aribasadme

Updated about 1 year ago

Automated Cloudflare DDNS updater for dynamic IP environments

Image
Networking
0

687

aribasadme/cloudflare-ddns repository overview

Cloudflare DDNS Updater

Automatically update Cloudflare DNS records with your current IP address. This container provides a reliable solution for dynamic DNS management, perfect for home labs, self-hosted services, and Raspberry Pi deployments.

Key Features

  • Automatic IPv4 address detection and updates
  • Support for multiple domains and subdomains
  • Configurable update intervals
  • Secure authentication using Cloudflare API tokens
  • Lightweight Alpine Linux base image
  • Comprehensive logging with configurable verbosity
  • Multi-architecture support (amd64, arm64, armv7, armv8)

Available Tags

  • latest: Most recent stable build from main branch
  • x.x.x: Specific version releases (e.g., 1.2.3)
  • x.x: Minor version releases (e.g., 1.2)
  • x: Major version releases (e.g., 1)
  • sha-xxxxxx: Specific commit builds for tracking changes

Quick Start

docker run -d \
  --name cloudflare-ddns \
  --restart unless-stopped \
  --env-file .env \
  -v $(pwd)/config.json:/app/config.json:ro \
  aribasadme/cloudflare-ddns

If you prefer to use docker-compose.yml

services:
  ddns-updater:
    image: aribasadme/cloudflare-ddns:latest
    volumes:
      - ./config.yaml:/app/config.yaml:ro
    environment:
      CF_DDNS_API_TOKEN: ${CF_DDNS_API_TOKEN}
      CF_DDNS_ZONE_ID: ${CF_DDNS_ZONE_ID}
    restart: unless-stopped

And then run:

docker compose up -d

Environment Variables

Required environment variables in your .env file:

  • CF_DDNS_API_TOKEN: Your Cloudflare API token. Needs Edit DNS capability
  • CF_DDNS_ZONE_ID: Your Cloudflare Zone ID
Configuration

Create a config.yaml file with your domain settings. You can add multiple subdomains:

cloudflare:
  - authentication:
      api_token: "your-cloudflare-api-token"
    zone_id: "your-zone-id"
    subdomains:
      - name: "@" # root (example.com)
        proxied: false
      - name: "foo" # foo.example.com
        proxied: false
ttl: 300

Security

  • Built with security best practices
  • No root privileges required
  • Read-only file system where possible
  • Regular security updates

Use Cases

  • Home server DNS management
  • Dynamic IP address tracking
  • Self-hosted service accessibility
  • IoT device discovery
  • Remote access to home lab

Built with ❤️ for the self-hosting community.

Author

Albert Ribas

Website

GitHub profile

Tag summary

Content type

Image

Digest

sha256:58dd4419a

Size

54.6 MB

Last updated

about 1 year ago

docker pull aribasadme/cloudflare-ddns