Hardened source-built WireGuard VPN (tools + wireguard-go) on Debian 13, multi-arch, 0 fixable CVEs.
633
A hardened, source-built multi-arch WireGuard VPN server and client container on Debian 13 (trixie-slim), combining official WireGuard/wireguard-tools and a Go-patched WireGuard/wireguard-go userspace fallback — maintained by Daniel G. Cosenza from FNX Labs.
dgcosenza/wireguardghcr.io/dgcosenza/wireguard (identical signed multi-arch digest)dgcosenza/wireguard-dockerdgcosenza/wireguard is a drop-in replacement for lscr.io/linuxserver/wireguard supporting both server mode (automatic key/PSK/peer config and QR code generation under /config) and client mode (mounting pre-existing /config/wg_confs/*.conf). It uses the native Linux kernel WireGuard module automatically whenever present and falls back transparently to a source-built, Go-patched wireguard-go binary in unprivileged or kernel-module-less environments.
| Component | Resolved Version |
|---|---|
| wireguard-tools | 1.0.20260223 |
| Go toolchain | 1.27.4 |
| Base OS | Debian 13.8 (trixie-slim) |
| Architectures | linux/amd64, linux/arm64 |
| Uncompressed size (per arch) | amd64: 39.5 MB, arm64: 134.9 MB |
| Last verified build (UTC) | 2026-11-28 |
| Published multi-arch digest | dgcosenza/wireguard@sha256:585352c5a3fdf2422a84e4ad308a56dbebd2f18976a846e5461cace279fec82c |
| GHCR mirror | ghcr.io/dgcosenza/wireguard@sha256:585352c5a3fdf2422a84e4ad308a56dbebd2f18976a846e5461cace279fec82c |
| 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 (13 upstream-unfixed) |
| Tag | Policy | Description |
|---|---|---|
latest | Moving | Latest verified multi-arch build passing all CVE, Dive, and live-tunnel smoke gates. |
<version> (e.g. 1.0.20260223) | Moving | Latest verified build for that wireguard-tools release. |
<version>-<YYYYMMDD> | Immutable | Date-stamped daily security rebuild. |
sha-<short> | Immutable | Git commit tag from this repository. |
| Architecture | Status | Verification |
|---|---|---|
linux/amd64 | Published & natively tested | Live wg0 tunnel bring-up, peer config + QR generation, Dive >= 95%, Trivy + Grype 0 fixable CVEs, Cosign OIDC, SLSA L3. |
linux/arm64 | Published & natively tested | Live wg0 tunnel bring-up, peer config + QR generation, Dive >= 95%, Trivy + Grype 0 fixable CVEs, Cosign OIDC, SLSA L3. |
Volume ownership note:
docker-compose.example.ymldefaults 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 by1000:1000(mkdir -p ./data && chown 1000:1000 ./data) beforedocker compose up -d.
docker run -d --name wireguard --restart unless-stopped \
--cap-drop ALL --cap-add NET_ADMIN --cap-add SYS_MODULE \
--device /dev/net/tun:/dev/net/tun \
--sysctl net.ipv4.conf.all.src_valid_mark=1 --sysctl net.ipv4.ip_forward=1 \
-p 51820:51820/udp -v "$(pwd)/config:/config" \
-e SERVERURL="vpn.example.test" -e PEERS="laptop,phone" -e LOG_CONFS="false" \
dgcosenza/wireguard:latest
See docker-compose.example.yml.
| Variable | Default | Description |
|---|---|---|
SERVERURL | (empty) | External hostname/IP for server mode. Leave unset for client mode (/config/wg_confs/*.conf). |
SERVERPORT | 51820 | UDP listening port. |
PEERS | 1 | Peer count (3) or comma-separated peer names (laptop,phone). |
PEERDNS | 1.1.1.1 | DNS server pushed to peers (auto uses tunnel gateway .1). |
INTERNAL_SUBNET | 172.20.13.0 | Internal /24 VPN subnet. |
ALLOWEDIPS | 0.0.0.0/0, ::/0 | Peer AllowedIPs routing policy. |
PERSISTENTKEEPALIVE_PEERS | (empty) | all or comma-separated peer names to enable PersistentKeepalive = 25. |
LOG_CONFS | true | Print ASCII QR codes to stdout on generation (false recommended in production). |
TZ | Etc/UTC | Container timezone. |
Ports: 51820/udp. Volumes: /config (keys, wg_confs/*.conf, peer_*/*.{conf,png}). Privileges: Requires NET_ADMIN (and /dev/net/tun for userspace fallback) to manage network interfaces and iptables/nftables NAT rules. PID 1: tini.
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD ["/usr/local/bin/wireguard-healthcheck"]
Probes wg show <iface> public-key for every configured WireGuard interface. Tested live on both amd64 and arm64; do not disable in Compose.
linuxserver/wireguard/config (wg_confs/, server/, peer_*/).dgcosenza/wireguard@sha256:<digest> keeping existing /config mounted — existing /config/wg_confs/wg0.conf is preserved and brought up automatically.cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/wireguard-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/wireguard:latest
gh attestation verify oci://ghcr.io/dgcosenza/wireguard:latest --owner dgcosenza
UNKNOWN–CRITICAL, --ignore-unfixed, exit 1) and Grype on Syft SPDX SBOM (--only-fixed --fail-on negligible) on both amd64 and arm64.umask 077 (0600).wireguard-go is compiled with current Go LTS and updated golang.org/x/{crypto,net,sys} modules.SECURITY.md.docker buildx build --platform linux/amd64 --load -t dgcosenza/wireguard:local .
./tests/smoke.sh dgcosenza/wireguard:local
.github/workflows/daily.yml runs daily at 05:19 UTC with --no-cache: resolves latest WireGuard/wireguard-tools tag, Go toolchain, and debian:13.8-slim digest; runs live wg0 smoke + Dive + Trivy + Grype gates on amd64 and arm64; publishes identical Cosign-signed SLSA L3 digests to Docker Hub and GHCR (plus optional secondary OCI mirrors); syncs docs & Hub overview; and manages a single ci-failure issue.
wireguard-go fallback: Zero performance overhead on hosts with kernel WireGuard while still working seamlessly in userspace and CI verification.golang and build-essential remain strictly in builder stages.packaging: MIT): MIT License — copyright Daniel G. Cosenza from FNX Labs.WireGuard/wireguard-tools (upstream: GPL-2.0-only): GPL-2.0. WireGuard/wireguard-go is MIT. See THIRD-PARTY-NOTICES.md.Maintained by Daniel G. Cosenza from FNX Labs. Built from official WireGuard sources.
Content type
Image
Digest
sha256:585352c5a…
Size
37.6 MB
Last updated
about 9 hours ago
docker pull dgcosenza/wireguard