MCPcopy
hub / github.com/qdm12/ddns-updater

github.com/qdm12/ddns-updater @v2.10.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.10.0 ↗
1,327 symbols 4,252 edges 243 files 100 documented · 8%
README

Lightweight universal DDNS Updater program

Program to keep DNS A and/or AAAA records updated for multiple DNS providers

DDNS Updater logo

Build status

Last release Last Docker tag Last release size GitHub last release date Commits since release

Latest size

GitHub last commit GitHub commit activity GitHub closed PRs GitHub issues GitHub closed issues

Code size GitHub repo size Go version

MIT Visitors count

Versioned documentation

This readme and the docs/ directory are versioned to match the program version:

Version Readme link Docs link
Latest README docs/
v2.8 README docs/
v2.7 README docs/
v2.6 README docs/
v2.5 README docs/

Features

  • Available as a Docker image ghcr.io/qdm12/ddns-updater and qmcgaw/ddns-updater
  • Available as zero-dependency binaries for Linux, Windows and MacOS
  • 🆕 Available in the AUR as ddns-updater - see #808
  • Updates periodically A records for different DNS providers:
  • Aliyun
  • AllInkl
  • ChangeIP
  • Cloudflare
  • DD24
  • DDNSS.de
  • deSEC
  • DigitalOcean
  • Domeneshop
  • DonDominio
  • DNSOMatic
  • DNSPod
  • Dreamhost
  • DuckDNS
  • DynDNS
  • Dynu
  • DynV6
  • EasyDNS
  • FreeDNS
  • Gandi
  • GCP
  • GoDaddy
  • GoIP.de
  • He.net
  • Hetzner (legacy API)
  • Hetzner Cloud
  • Infomaniak
  • INWX
    • Ionos
    • ipv64
  • Linode
  • Loopia
  • LuaDNS
  • Myaddr
  • Name.com
  • Namecheap
  • NameSilo
  • Netcup
  • NoIP
  • Now-DNS
  • Njalla
  • OpenDNS
  • OVH
  • Porkbun
  • Route53
  • Scaleway
  • Selfhost.de
  • Servercow.de
  • Spaceship
  • Spdyn
  • Strato.de
  • Variomedia.de
  • Vultr
  • Zoneedit
  • Want more? Create an issue for it!
  • Web user interface (Desktop)

    Web UI

  • Web user interface (Mobile)

    Mobile Web UI

  • Send notifications with Shoutrrr using SHOUTRRR_ADDRESSES

  • Container (Docker/K8s) specific features:
  • Lightweight 12MB Docker image based on the Scratch Docker image
  • Docker healthcheck verifying the DNS resolution of your domains
  • Images compatible with amd64, 386, arm64, armv7, armv6, s390x, ppc64le, riscv64 CPU architectures
  • Persistence with a JSON file updates.json to store old IP addresses with change times for each record

Setup

Binary programs

  1. Download the pre-built program for your platform from the assets of a release in the releases page. You can alternatively download, build and install the latest version of the program by installing Go and then run go install github.com/qdm12/ddns-updater/cmd/ddns-updater@latest.
  2. For Linux and MacOS, make the program executable with chmod +x ddns-updater.
  3. In the directory where the program is saved, create a directory data.
  4. Write a JSON configuration in data/config.json, for example:

    json { "settings": [ { "provider": "namecheap", "domain": "sub.example.com", "password": "e5322165c1d74692bfa6d807100c0310" } ] }

    You can find more information in the configuration section to customize it. 1. Run the program with ./ddns-updater (./ddns-updater.exe on Windows) or by double-clicking on it. 1. The following is optional. - You can customize the program behavior using either environment variables or flags. For flags, there is a flag corresponding to each environment variable, where it's all lowercase and underscores are replaced with dashes. For example the environment variable LOG_LEVEL translates into --log-level.

Container

➡️ Qnap guide by @Araminta

  1. Create a directory, for example, data which is:

    • owned by user id 1000, which is the built-in user ID of the ddns-updater container
    • has user read+write+execute permissions

    sh mkdir data chown 1000 data chmod u+r+w+x data

    If you want to use another user ID, build the image yourself with --build-arg UID=<your-uid>. You could also just run the container as root with --user="0" but this is not advised security wise.

  2. Similarly, create a data/config.json file which is:

    • owned by user id 1000
    • has user read permissions

    sh touch data/config.json chmod u+r data/config.json

  3. Edit data/config.json, for example:

    json { "settings": [ { "provider": "namecheap", "domain": "sub.example.com", "password": "e5322165c1d74692bfa6d807100c0310" } ] }

    You can find more information in the configuration section to customize it.

  4. Run the container with

    sh docker run -d -p 8000:8000/tcp -v "$(pwd)"/data:/updater/data ghcr.io/qdm12/ddns-updater

  5. The following is optional.

    • You can customize the program behavior using environment variables
    • You can use docker-compose.yml with docker-compose up -d
    • Kubernetes: check out the k8s directory for an installation guide and examples.
    • Other Docker image tags are available
    • You can update the image with docker pull ghcr.io/qdm12/ddns-updater
    • You can set your JSON configuration as a single environment variable line (i.e. {"settings": [{"provider": "namecheap", ...}]}), which takes precedence over config.json. Note however that if you don't bind mount the /updater/data directory, there won't be a persistent database file /updater/updates.json but it will still work.

Configuration

Start by having the following content in config.json, or in your CONFIG environment variable:

{
    "settings": [
        {
            "provider": "",
        },
        {
            "provider": "",
        }
    ]
}

For each setting, you need to fill in parameters. Check the documentation for your DNS provider:

Note that:

  • you can specify multiple owners/hosts for the same domain using a comma separated list. For example with "domain": "example.com,sub.example.com,sub2.example.com",. ⚠️ this is a bit different for DuckDNS and GoIP, see their respective documentation.

Environment variables

🆕 There are now flags equivalent for each variable below, for example --log-level.

Environment variable Default Description
CONFIG One line JSON object containing the entire config (takes precedence over config.json file) if specified
PERIOD 5m Default period of IP address check, following this format
PUBLICIP_FETCHERS all Comma separated fetcher types to obtain the public IP address from http and dns
PUBLICIP_HTTP_PROVIDERS all Comma separated providers to obtain the public IP address (ipv4 or ipv6). See the Public IP section
PUBLICIPV4_HTTP_PROVIDERS all Comma separated providers to obtain the public IPv4 address only. See the Public IP section
PUBLICIPV6_HTTP_PROVIDERS all Comma separated providers to obtain the public IPv6 address only. See the Public IP section
PUBLICIP_DNS_PROVIDERS all Comma separated providers to obtain the public IP address (IPv4 and/or IPv6). See the Public IP section
PUBLICIP_DNS_TIMEOUT 3s Public IP DNS query timeout
UPDATE_COOLDOWN_PERIOD 5m Duration to cooldown between updates for each record. This is useful to avoid being rate limited or banned.
HTTP_TIMEOUT 10s Timeout for all HTTP requests
SERVER_ENABLED yes Enable the web server and web UI
LISTENING_ADDRESS :8000 Internal TCP listening port for the web UI
ROOT_URL / URL path to append to all paths to the webUI (i.e. /ddns for accessing https://example.com/ddns through a proxy)
HEALTH_SERVER_ADDRESS 127.0.0.1:9999 Health server listening address
HEALTH_HEALTHCHECKSIO_BASE_URL https://hc-ping.com Base URL for the healthchecks.io server
HEALTH_HEALTHCHECKSIO_UUID UUID to idenfity with the healthchecks.io server
DATADIR /updater/data Directory to read and write data files from internally
CONFIG_FILEPATH /updater/data/config.json Path to the JSON configuration file
BACKUP_PERIOD 0 Set to a period (i.e. 72h15m) to enable zip backups of data/config.json and data/updates.json in a zip file
BACKUP_DIRECTORY /updater/data Directory to write backup zip files to if BACKUP_PERIOD is not 0.
RESOLVER_ADDRESS Your network DNS A plaintext DNS address to use to resolve your domain names defined in your settings only. For example it can be 1.1.1.1:53. This is useful for split dns, see #389
LOG_LEVEL info Level of logging, debug, info, warning or error
LOG_CALLER hidden Show caller per log line,

Extension points exported contracts — how you extend this code

UpdaterInterface (Interface)
(no doc) [59 implementers]
internal/update/interfaces.go
Provider (Interface)
(no doc) [57 implementers]
internal/provider/provider.go
Client (Interface)
go:generate mockgen -destination=mock_$GOPACKAGE/$GOFILE . Client Client is an interface for the DNS client used in the [2 …
pkg/publicip/dns/client.go
Erroer (Interface)
(no doc) [2 implementers]
internal/shoutrrr/interfaces.go
PersistentDatabase (Interface)
(no doc) [1 implementers]
internal/data/interfaces.go
Database (Interface)
(no doc) [1 implementers]
internal/server/interfaces.go
AllSelecter (Interface)
(no doc) [1 implementers]
internal/health/interfaces.go
Logger (Interface)
(no doc)
internal/backup/interfaces.go

Core symbols most depended-on inside this repo

String
called by 297
internal/provider/provider.go
Close
called by 131
internal/data/interfaces.go
Error
called by 65
internal/health/interfaces.go
SetUserAgent
called by 59
internal/provider/headers/headers.go
ToString
called by 57
internal/provider/utils/provider.go
BuildDomainName
called by 57
internal/provider/utils/domain.go
CheckDomain
called by 56
internal/provider/utils/domain.go
BodyToSingleLine
called by 40
internal/provider/utils/singleline.go

Shape

Method 803
Function 326
Struct 161
Interface 24
TypeAlias 8
FuncType 5

Languages

Go100%

Modules by API surface

internal/update/service.go21 symbols
internal/update/interfaces.go20 symbols
internal/provider/providers/namesilo/provider.go20 symbols
internal/provider/providers/linode/provider.go20 symbols
internal/provider/providers/luadns/provider.go19 symbols
internal/provider/providers/dreamhost/provider.go18 symbols
internal/config/pubip.go16 symbols
internal/provider/providers/porkbun/provider.go15 symbols
internal/provider/providers/cloudflare/provider.go15 symbols
internal/provider/providers/vercel/provider.go14 symbols
internal/provider/providers/scaleway/provider.go14 symbols
internal/provider/providers/ovh/provider.go14 symbols

Dependencies from manifests, versioned

cloud.google.com/go/compute/metadatav0.9.0 · 1×
github.com/breml/rootcertsv0.3.5 · 1×
github.com/containrrr/shoutrrrv0.8.0 · 1×
github.com/davecgh/go-spewv1.1.1 · 1×
github.com/go-logr/logrv1.4.3 · 1×
github.com/mattn/go-colorablev0.1.14 · 1×
github.com/mattn/go-isattyv0.0.20 · 1×
github.com/miekg/dnsv1.1.72 · 1×
github.com/pmezard/go-difflibv1.0.0 · 1×

For agents

$ claude mcp add ddns-updater \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact