How qdm12/ddns-updater works
DDNS Updater periodically discovers the host’s public IPv4/IPv6 addresses and updates configured DNS records across many providers. The principal workflow starts with configuration and provider settings, then fetches addresses, decides which records need changes, updates DNS, and persists status/history. The application also exposes a web UI and health endpoints, creates periodic data backups, and supports notifications and healthcheck reporting. The main entry point shows how services are assembled; unsampled provider implementations are represented by their existing directory.
Main entry points: main.go Application startup · service.go Update scheduler · data.go Record database interface · publicip.go Public IP discovery
Components 27
Startup and configuration
- Application startup
cmd/ddns-updater/main.go - Runtime settings
internal/config/settings.go - Provider settings reader
internal/params/reader.go
Address and DNS updates
- DNS provider adapters
internal/provider/providers - Update scheduler
internal/update/service.go - Record update logic
internal/update/update.go - Public IP discovery
pkg/publicip/publicip.go - HTTP IP sources
pkg/publicip/http - DNS IP sources
pkg/publicip/dns - DNS record resolver
internal/resolver/resolver.go
Records and persistence
- Record and history model
internal/records/records.go - Record database interface
internal/data/data.go - JSON history store
internal/persistence/json/database.go
Web and health
- Web UI server
internal/server/server.go - UI and update handlers
internal/server/handler.go - Health server
internal/health/server.go - DNS health checks
internal/health/check.go
Operations
- Data backups
internal/backup/service.go - Backup archive writer
internal/backup/zip.go - Notifications
internal/shoutrrr/shoutrrr.go - Healthcheck reporting
internal/healthchecksio/healthchecksio.go
Other components
- Operator
- Public IP services
- Authoritative DNS providers
- Notification service
- Healthcheck service
- Web UI user
Connections 34
- Operator → Application startup: starts
- Application startup → Runtime settings: loads settings
- Application startup → Provider settings reader: reads providers
- Application startup → Update scheduler: starts scheduler
- Application startup → Web UI server: starts server
- Application startup → Health server: starts health
- Application startup → Data backups: starts backups
- Application startup → Notifications: sends notices
- Provider settings reader → DNS provider adapters: builds providers
- Update scheduler → Public IP discovery: fetches addresses
- Public IP discovery → HTTP IP sources: queries sources
- Public IP discovery → DNS IP sources: queries sources
- HTTP IP sources → Public IP services: requests address
- DNS IP sources → Public IP services: queries address
- Update scheduler → DNS record resolver: checks DNS records
- DNS record resolver → Authoritative DNS providers: resolves domain
- Update scheduler → Record update logic: updates records
- Record update logic → DNS provider adapters: dispatches update
- DNS provider adapters → Authoritative DNS providers: changes DNS
- Update scheduler → Record database interface: reads and updates
- Record database interface → JSON history store: persists history
- Application startup → Record and history model: loads record history
- Web UI user → Web UI server: uses UI
- Web UI server → UI and update handlers: dispatches requests
- UI and update handlers → Record database interface: reads records
- UI and update handlers → Update scheduler: forces update
- Health server → DNS health checks: runs checks
- DNS health checks → Record database interface: checks record state
- DNS health checks → DNS record resolver: resolves domains
- Data backups → Backup archive writer: writes archives
- Backup archive writer → JSON history store: backs up data
- Notifications → Notification service: sends messages
- Update scheduler → Healthcheck reporting: reports update state
- Healthcheck reporting → Healthcheck service: pings service