Skip to content

Lightweight DynDNS updater for IONOS domains via API

License

Notifications You must be signed in to change notification settings

a-belhadj/ionos-ddns

Repository files navigation

IONOS DynDNS Updater

CI Build and Push Docker Image Go Report Card Docker Image License: AGPL v3

Automatically update your IONOS DNS records with your current public IP address.

The service periodically sends POST requests to https://api.hosting.ionos.com/dns/v1/dyndns to update your domain records. See the IONOS DynDNS API documentation for details.

How it works

graph LR
    A[ionos-ddns] -->|POST /dns/v1/dyndns| B[IONOS API]
    B -->|Updates DNS records| C[DNS]
    D[Ticker] -->|Every N seconds| A
    A -->|Heartbeat log| E[stdout]
Loading

The service runs as a lightweight container and periodically calls the IONOS DynDNS API to keep your DNS records pointing to your current public IP. It uses structured logging with configurable verbosity and a heartbeat mechanism to confirm the service is running without flooding the logs.

Quick Start

# Configure
cp .env.example .env
nano .env

# Run with Podman Compose
make up

# Or run locally
make run

Configuration

Configure via .env file:

IONOS_API_KEY=prefix_public.secret         # Required: Your IONOS API key
IONOS_DOMAINS=example.com,sub.example.com  # Required: Domains to update
UPDATE_INTERVAL_SECONDS=300                # Optional: Update interval in seconds (default: 300)
LOG_LEVEL=INFO                             # Optional: DEBUG, INFO, WARN, ERROR (default: INFO)
HEARTBEAT_INTERVAL_SECONDS=21600           # Optional: Heartbeat log interval in seconds (default: 21600 = 6h)
HEALTH_PORT=8080                          # Optional: Health check endpoint port (default: 8080)

Building

make run      # Run locally
make build    # Build binary
make up       # Start with podman-compose
make down     # Stop with podman-compose
make status   # Show container status
make logs     # Follow container logs

API

Uses the IONOS DynDNS API.