HUB
Sign inSign up
duckdns logo

dgcosenza/duckdns

By dgcosenza

•Updated about 9 hours ago

Hardened rootless DuckDNS dynamic DNS updater on Debian 13 (multi-arch, signed, 0 fixable CVEs).

Image
0

640

dgcosenza/duckdns repository overview

⁠DuckDNS — Hardened Debian 13 (trixie-slim) Dynamic DNS Updater

Daily CI OpenSSF Scorecard Workflow Gitleaks Secret Scan Public Content Check OpenSSF Scorecard OpenSSF Best Practices

Trivy + Grype: 0 Fixable CVEs Signed: Cosign OIDC SLSA Build L3 SBOM: SPDX + CycloneDX Base OS Architectures Healthcheck: CI Verified Renovate Enabled Dependabot Enabled Daily Rebuilds

Latest Release Release Date Last Commit Docker Pulls Docker Image Size Registries: Docker Hub + GHCR Packaging License: MIT Upstream License GitHub Issues FNX Labs Catalog

A minimal, rootless, read-only-rootfs-compatible DuckDNS dynamic DNS updater container built on Debian 13 (trixie-slim), maintained by Daniel G. Cosenza from FNX Labs.

⁠Overview

dgcosenza/duckdns is a drop-in, hardened replacement for lscr.io/linuxserver/duckdns without s6-overlay overhead or root privileges. It updates one or more DuckDNS subdomains over HTTPS on a configurable interval, passes credentials exclusively through curl's stdin config (never exposing tokens in /proc/<pid>/cmdline or container logs), supports Docker secrets (TOKEN_FILE / /run/secrets/duckdns_token), runs strictly as non-root UID/GID 1000:1000 with cap_drop: [ALL] and read_only: true, and exposes a real liveness + last-update HEALTHCHECK.

⁠Current Versions

ComponentResolved Version
DuckDNS updater1.0.0
Base OSDebian 13.8 (trixie-slim)
Architectureslinux/amd64, linux/arm64
Uncompressed size (per arch)amd64: 37.6 MB, arm64: 121.7 MB
Last verified build (UTC)2026-11-28
Published multi-arch digestdgcosenza/duckdns@sha256:a74a01a18453545f6746e795f449e618a25727e9bb0cfa16b465b0ef84928f28
GHCR mirrorghcr.io/dgcosenza/duckdns@sha256:a74a01a18453545f6746e795f449e618a25727e9bb0cfa16b465b0ef84928f28
Supply chainCosign OIDC signed + SPDX & CycloneDX SBOM attestations + SLSA Build L3 provenance
Security gate (Trivy + Grype on SBOM)0 fixable findings of any severity (15 upstream-unfixed)

⁠Supported Tags

TagPolicyDescription
latestMovingLatest verified multi-arch build passing all CVE, Dive, and smoke gates.
<version> (e.g. 1.0.0)MovingLatest verified build for that updater release.
<version>-<YYYYMMDD>ImmutableDate-stamped daily security rebuild.
sha-<short>ImmutableGit commit tag from this repository.

Pin production deployments by immutable digest: dgcosenza/duckdns@sha256:<digest> or ghcr.io/dgcosenza/duckdns@sha256:<digest>.

⁠Supported Architectures

ArchitectureStatusVerification
linux/amd64Published & natively testedNative x86_64 build, smoke test, Dive >= 95%, Trivy + Grype 0 fixable CVEs, Cosign OIDC, SLSA L3.
linux/arm64Published & natively testedNative ARM64 build, smoke test, Dive >= 95%, Trivy + Grype 0 fixable CVEs, Cosign OIDC, SLSA L3.

⁠Quick Start

Volume ownership note: docker-compose.example.yml defaults to a named Docker volume so non-root runtime permissions (1000:1000) are initialized automatically; if switching to a host bind mount, pre-create the directory owned by 1000:1000 (mkdir -p ./data && chown 1000:1000 ./data) before docker compose up -d.

mkdir -p ./secrets ./config
printf '%s\n' '<your-duckdns-token>' > ./secrets/duckdns_token.txt
chmod 600 ./secrets/duckdns_token.txt

docker run -d --name duckdns --restart unless-stopped \
  --read-only --tmpfs /tmp --cap-drop ALL --security-opt no-new-privileges:true \
  -v "$(pwd)/secrets/duckdns_token.txt:/run/secrets/duckdns_token:ro" \
  -v "$(pwd)/config:/config" \
  -e SUBDOMAINS="example-subdomain" \
  -e INTERVAL="300" \
  dgcosenza/duckdns:latest

⁠Compose Example

See docker-compose.example.yml⁠:

services:
  duckdns:
    image: dgcosenza/duckdns:latest
    container_name: duckdns
    restart: unless-stopped
    read_only: true
    cap_drop: [ALL]
    security_opt: ["no-new-privileges:true"]
    tmpfs: ["/tmp"]
    environment:
      TZ: "Etc/UTC"
      SUBDOMAINS: "example-subdomain"
      TOKEN_FILE: "/run/secrets/duckdns_token"
      UPDATE_IP: "ipv4"
      INTERVAL: "300"
      LOG_FILE: "false"
    secrets: [duckdns_token]
    volumes: ["./config:/config"]
secrets:
  duckdns_token:
    file: ./secrets/duckdns_token.txt

⁠Configuration

VariableDefaultDescription
SUBDOMAINS(required)Comma-separated DuckDNS subdomains (without .duckdns.org).
TOKEN(empty)DuckDNS API token (prefer TOKEN_FILE or /run/secrets/duckdns_token).
TOKEN_FILE(empty)Path to secret file containing the DuckDNS token.
UPDATE_IPipv4IP family to update: ipv4, ipv6, or both.
INTERVAL300Update interval in seconds (>= 10).
LOG_FILEfalseSet to true to also append timestamped logs to /config/duck.log.
TZEtc/UTCContainer timezone.

Ports: None (outbound HTTPS 443/tcp only). Volumes: /config (optional log storage, owned by 1000:1000). User: duckdns (UID/GID 1000:1000). PID 1: tini.

⁠Healthcheck

HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
  CMD ["/usr/local/bin/duckdns-healthcheck"]

Verifies the updater process PID is alive and that /tmp/duckdns.state recorded status=OK within 2 * INTERVAL + 60 seconds. Verified on both amd64 and arm64 in CI; do not disable in Compose.

⁠Upgrade / Migration from linuxserver/duckdns

  1. Replace the image with dgcosenza/duckdns@sha256:<digest>.
  2. Keep SUBDOMAINS, UPDATE_IP, LOG_FILE, and /config (owned by 1000:1000); move TOKEN to a Docker secret (TOKEN_FILE=/run/secrets/duckdns_token).
  3. Enable read_only: true, tmpfs: [/tmp], and cap_drop: [ALL].

⁠Supply-Chain Verification

cosign verify \
  --certificate-identity-regexp="^https://github\.com/dgcosenza/duckdns-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
  --certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
  ghcr.io/dgcosenza/duckdns:latest

gh attestation verify oci://ghcr.io/dgcosenza/duckdns:latest --owner dgcosenza

⁠Security

  • 0 fixable vulnerabilities of any severity: Hard-gated in CI by Trivy (UNKNOWN–CRITICAL, --ignore-unfixed, exit 1) and Grype on the Syft SPDX SBOM (--only-fixed --fail-on negligible) on both amd64 and arm64.
  • Zero credential exposure: Tokens are passed via curl -K - stdin and never appear in process arguments or logs.
  • Rootless & immutable: Runs as UID/GID 1000:1000 with cap_drop: [ALL] and read_only: true.
  • Report issues via SECURITY.md⁠.

⁠Build Locally

docker buildx build --platform linux/amd64 --load -t dgcosenza/duckdns:local .
./tests/smoke.sh dgcosenza/duckdns:local

⁠Update Policy

.github/workflows/daily.yml⁠ runs daily at 05:11 UTC with --no-cache: refreshes the debian:13.8-slim digest and OS security patches, runs smoke + Dive + Trivy + Grype gates on amd64 and arm64, publishes identical Cosign-signed SLSA L3 digests to Docker Hub and GHCR (plus optional Quay.io, GitLab, Codeberg, and Amazon ECR Public mirrors when configured), creates a signed GitHub Release, syncs docs & Docker Hub overview, and manages a single ci-failure issue.

⁠Design Decisions

  • Pure curl + bash + tini on debian:13.8-slim: Avoids cron daemons, root privileges, and s6-overlay layers for a minimal attack surface and Dive efficiency >= 95%.
  • stdin curl config: Prevents API tokens from leaking to ps / /proc.

⁠License

Packaging, scripts, workflows, and documentation (packaging: MIT, upstream: MIT) are licensed under the MIT License⁠ — copyright Daniel G. Cosenza from FNX Labs. Third-party OS package notices: THIRD-PARTY-NOTICES.md⁠.

⁠Credits

Maintained by Daniel G. Cosenza from FNX Labs. Compatible with the DuckDNS⁠ API.

Tag summary

Content type

Image

Digest

sha256:a74a01a18…

Size

35.8 MB

Last updated

about 9 hours ago

docker pull dgcosenza/duckdns