Skip to content

Dynamic DNS client for Cloudflare managed domains

License

Notifications You must be signed in to change notification settings

milgradesec/ddns

Repository files navigation

ddns

CI CodeQL codecov Go Report Card Latest Release Go Reference GitHub

Dynamic DNS for Cloudflare

ddns is a dynamic DNS client for domains managed by Cloudflare.

Usage

📜 CLI Reference

Usage: 
  ddns [options]

Options:
  -service string
        Manage DDNS as a system service
  -version
        Show version information.
  -help
        Show help.

🐋 Docker

docker-compose.yaml example:

version: "3.8"

secrets:
  api_token:
    file: API_TOKEN

services:
  ddns:
    image: ghcr.io/milgradesec/ddns:latest
    environment:
      # Set DDNS_PROVIDER
      - DDNS_PROVIDER=Cloudflare
      # Set DDNS_ZONE
      - DDNS_ZONE=example.com
      # Set the API Token
      - CLOUDFLARE_API_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXX
      # Or use a docker secret
      - CLOUDFLARE_API_TOKEN_FILE=/run/secrets/api_token
    secrets:
      - api_token
    deploy:
      restart_policy:
        condition: any
        delay: 5s

Development

Create a file named .env inside test/ directory and set the appropriate environment variables. DO NOT COMMIT THIS FILE.

.env file example:

DDNS_PROVIDER=
DDNS_ZONE=
CLOUDFLARE_API_TOKEN=

📜 License

MIT License