Hardened Debian 13 build of Syncthing from official Go source, drop-in for linuxserver/syncthing.
2.1K
A source-built, multi-arch, continuously rebuilt Debian 13 (trixie-slim) container image of Syncthing, compiled with -no-upgrade, CGO_ENABLED=0, the latest Go toolchain, and patched Go security dependencies, maintained by Daniel G. Cosenza from FNX Labs.
dgcosenza/syncthingghcr.io/dgcosenza/syncthing (identical signed multi-arch digest)dgcosenza/syncthing-dockersyncthing/syncthing (MPL-2.0)dgcosenza/syncthing compiles official Syncthing Go source tags with refreshed security-sensitive Go modules (golang.org/x/{net,crypto,sys}) on Debian 13 (trixie-slim) for both linux/amd64 and linux/arm64:
linuxserver/syncthing: Preserves /config (cert.pem, key.pem, config.xml, index-v2/), PUID/PGID, UMASK/UMASK_SET, STGUIADDRESS=0.0.0.0:8384, ports 8384/22000/21027, and /rest/noauth/health — without s6-overlay overhead, using tini and setpriv --no-new-privs.PUID/PGID mode and strict rootless mode (--user 1000:1000 --read-only --cap-drop ALL --security-opt no-new-privileges:true).>= 95%, <= 5% wasted), Syft SPDX + CycloneDX SBOMs, Trivy + Grype (SBOM) zero-fixable all-severity gates, Cosign keyless OIDC signatures & SBOM attestations, SLSA Build L3 provenance, dual-registry publishing, and signed GitHub Releases.| Component | Resolved Version |
|---|---|
| Syncthing | v2.1.7 |
| Go toolchain | 1.27.4 |
| Base OS | Debian 13.8 (trixie-slim) |
| Architectures | linux/amd64, linux/arm64 |
| Compressed size (per arch) | amd64: 52.8 MB, arm64: 52.1 MB |
| Last verified build (UTC) | 2026-11-28 |
| Published multi-arch digest | dgcosenza/syncthing@sha256:6da4fa46cf4b10e76dbf3eb9e2ccc910189e2d249297631ec38baa132041577f |
| GHCR mirror | ghcr.io/dgcosenza/syncthing@sha256:6da4fa46cf4b10e76dbf3eb9e2ccc910189e2d249297631ec38baa132041577f |
| Supply chain | Cosign 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) |
Currently tracked upstream-unfixed findings (no fix released): CVE-2025-69720, CVE-2026-107494, CVE-2026-119373, CVE-2026-119374, CVE-2026-119379, CVE-2026-12064, CVE-2026-124709, CVE-2026-16742, CVE-2026-54369, CVE-2026-76642 (+5 more in CI artifacts).
Identical multi-arch OCI digests are published to Docker Hub (dgcosenza/syncthing) and GHCR (ghcr.io/dgcosenza/syncthing), accompanied by an automated signed GitHub Release:
| Tag | Policy | Description |
|---|---|---|
<version>-<YYYYMMDD> (e.g. 2.1.7-20261125) | Immutable | Date-stamped daily rebuild pinning the Syncthing release and UTC build date. |
sha-<short> | Immutable | Packaging repository Git commit tag. |
<version> (e.g. 2.1.7) | Moving | Latest verified Debian 13 + patched Go rebuild of that Syncthing release. |
latest | Moving | Latest verified build tracking the newest official Syncthing release. |
Production pinning: Pin by immutable digest:
image: dgcosenza/syncthing:2.1.7@sha256:<digest>
# or via GitHub Container Registry (identical digest):
image: ghcr.io/dgcosenza/syncthing:2.1.7@sha256:<digest>
| Architecture | Status | Verification |
|---|---|---|
linux/amd64 | Published & natively tested | Compiled with latest Go trixie + patched x/* modules, smoke-tested (both drop-in and --user 1000:1000 --read-only --cap-drop ALL), Dive-gated, Syft/Trivy/Grype-scanned, and Cosign-signed on native x86_64 CI runners. |
linux/arm64 | Published & natively tested | Compiled with latest Go trixie + patched x/* modules, smoke-tested (both drop-in and --user 1000:1000 --read-only --cap-drop ALL), Dive-gated, Syft/Trivy/Grype-scanned, and Cosign-signed on native ARM64 CI runners. |
docker run (hardened, rootless, read-only)docker run -d --name syncthing \
--restart unless-stopped \
--user 1000:1000 \
--read-only \
--cap-drop ALL \
--security-opt no-new-privileges:true \
--tmpfs /tmp:noexec,nosuid,size=32m \
-e TZ=Etc/UTC \
-e UMASK_SET=022 \
-p 127.0.0.1:8384:8384/tcp \
-p 22000:22000/tcp \
-p 22000:22000/udp \
-p 21027:21027/udp \
-v ./config:/config \
dgcosenza/syncthing:latest
Verify health:
curl -fsS http://127.0.0.1:8384/rest/noauth/health
See docker-compose.example.yml for a hardened compose example running rootless (user: "1000:1000") with read_only: true, cap_drop: [ALL], no-new-privileges:true, /tmp tmpfs, and resource limits. (When migrating a host directory with mixed ownership from linuxserver/syncthing, omit user: and cap_drop: [ALL] so the entrypoint repairs ownership and drops to PUID:PGID via setpriv.)
| Resource | Details | Purpose |
|---|---|---|
8384/tcp | Web GUI / REST API | Bind to loopback or a management IP (192.0.2.10) where possible |
22000/tcp & 22000/udp | Sync protocol | TCP and QUIC peer sync |
21027/udp | Discovery | Local LAN discovery broadcasts |
/config | Persistent volume | config.xml, device identity (cert.pem/key.pem), TLS keys, index-v2/ |
/data (optional) | Persistent volume | Additional synced folders |
| Variable | Default | Description |
|---|---|---|
PUID / PGID | 1000 / 1000 | Numeric user/group IDs Syncthing drops privileges to when started as root |
UMASK / UMASK_SET | 022 | File creation mask (UMASK_SET takes precedence for linuxserver/syncthing parity) |
TZ | UTC | Container timezone |
HOME / STHOMEDIR | /config | Syncthing state/config directory |
STGUIADDRESS | 0.0.0.0:8384 | Web GUI bind address inside the container |
SKIP_CHOWN | (unset) | Set to 1 to skip startup ownership repair on /config |
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD ["sh", "-c", "curl -fsS http://127.0.0.1:8384/rest/noauth/health >/dev/null || exit 1"]
Probes /rest/noauth/health directly and fails closed when Syncthing stops.
linuxserver/syncthing/config (config.xml, cert.pem, key.pem, https-*.pem, index-v2/) before making changes. Never share or expose key.pem or config.xml.linuxserver/syncthing:latest with dgcosenza/syncthing:<version>@sha256:<digest> (or ghcr.io/dgcosenza/syncthing:<version>@sha256:<digest>).PUID, PGID, TZ, UMASK_SET, /config, data mounts, and port mappings.docker compose up -d syncthing), confirm healthy status, and verify your Device ID and folders remain unchanged.Every published digest (multi-arch index and per-architecture manifests) on both Docker Hub and GHCR is keyless-signed with Sigstore Cosign (GitHub OIDC), attested with SPDX and CycloneDX SBOMs, and backed by SLSA Build L3 provenance (actions/attest-build-provenance).
cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/syncthing-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/syncthing:latest
# Or against Docker Hub (identical digest):
cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/syncthing-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
dgcosenza/syncthing:latest
cosign verify-attestation \
--type spdxjson \
--certificate-identity-regexp="^https://github\.com/dgcosenza/syncthing-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/syncthing@sha256:<arch-digest>
gh attestation verify oci://ghcr.io/dgcosenza/syncthing:latest --owner dgcosenza
CGO_ENABLED=0, -no-upgrade, the latest Go trixie toolchain (GOTOOLCHAIN=local), and updated golang.org/x/{net,crypto,sys} modules (eliminating binary CVEs such as CVE-2026-78661).setpriv --no-new-privs privilege drop and direct --user 1000:1000 --read-only --cap-drop ALL execution.>= 95%, <= 5% wasted), and must pass Trivy (table, JSON, SARIF to Code Scanning, blocking --ignore-unfixed) and Grype scanning the SPDX SBOM (--only-fixed --fail-on negligible) with 0 fixable vulnerabilities of any severity.renovate.json) pins base image digests and GitHub Action commit SHAs; Dependabot security alerts and OpenSSF Scorecard monitoring are enabled.SECURITY.md for vulnerability reporting.git clone https://github.com/dgcosenza/syncthing-docker.git
cd syncthing-docker
docker buildx build \
--platform linux/amd64 \
--load \
--build-arg IMAGE_CREATED="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--build-arg IMAGE_REVISION="$(git rev-parse HEAD)" \
-t dgcosenza/syncthing:local \
.
./tests/smoke.sh dgcosenza/syncthing:local
| Build Arg | Default | Purpose |
|---|---|---|
GO_BASE | golang:1.27.4-trixie@sha256:... | Digest-pinned official Go builder image (refreshed daily by CI) |
DEBIAN_BASE | debian:trixie-slim@sha256:... | Digest-pinned Debian 13 runtime base image (refreshed daily by CI) |
GO_VERSION | 1.27.4 | Go toolchain version metadata |
SYNCTHING_VERSION | v2.1.7 | syncthing/syncthing Git tag |
SYNCTHING_UID / SYNCTHING_GID | 1000 / 1000 | Default syncthing account IDs |
.github/workflows/daily.yml runs automatically every day at 05:50 UTC, on pushes to main, on pull requests (verification only), and via workflow_dispatch:
syncthing/syncthing release via authenticated GitHub API plus latest Go trixie and debian:trixie-slim digests; diffs against versions.json and emits upstream-changes.md.golang.org/x/{net,crypto,sys}, compiles Syncthing (-no-upgrade, CGO_ENABLED=0) natively on linux/amd64 and linux/arm64 runners with --no-cache on schedule and full Debian 13 apt-get upgrade.tests/smoke.sh natively on both architectures (drop-in PUID/PGID + strict --user 1000:1000 --read-only --cap-drop ALL), enforces the strict Dive efficiency gate (>= 95%, <= 5% wasted), generates Syft SPDX + CycloneDX SBOMs, and gates publication on 0 fixable findings of any severity in both Trivy and Grype (SBOM scan).ghcr.io/dgcosenza/syncthing) and mirrors the identical digest to Docker Hub (dgcosenza/syncthing) with tags latest, <version>, <version>-<YYYYMMDD>, and sha-<short>; keyless-signs digests and attaches SPDX/CycloneDX SBOM attestations via Cosign OIDC; emits SLSA Build L3 provenance; and publishes a signed GitHub Release.versions.json, the README Current Versions block, and a dated CHANGELOG.md entry via github-actions[bot] ([skip ci]), then syncs the Docker Hub overview and short description.ci-failure on any main or scheduled failure, and closes it automatically on the next green run.golang.org/x/* dependencies; rebuilding from official release tags clears binary CVEs immediately.trixie-slim) + tini + setpriv instead of Alpine + s6-overlay: Preserves full linuxserver/syncthing parity with a concise, auditable POSIX entrypoint while supporting strict rootless read-only operation.os-base stage and assembling the final image with cleanly separated OS and compiled-binary layers eliminates overwritten base-layer files so Dive remains at ~100% efficiency and ~0% wasted space across daily security rebuilds.-no-upgrade: Disables in-container self-upgrades so all updates flow through immutable signed images.DL3008 ignore: Daily --no-cache security rebuilds intentionally pull the newest Debian 13 security updates via apt-get rather than pinning stale package versions.This repository follows a clear packaging-vs-upstream license split:
packaging: MIT): Licensed under the MIT License — copyright Daniel G. Cosenza from FNX Labs.upstream: MPL-2.0): Copyright The Syncthing Authors — licensed under the Mozilla Public License 2.0 (MPL-2.0).Full notices are preserved inside the image (/usr/share/doc/syncthing-notices/LICENSE) and in THIRD-PARTY-NOTICES.md.
/config and PUID/PGID conventions preserved for drop-in migrationContent type
Image
Digest
sha256:6da4fa46c…
Size
50.3 MB
Last updated
about 12 hours ago
docker pull dgcosenza/syncthing