This project provides a secure, minimal, and distroless container image for running AmneziaWG (a WireGuard fork with obfuscation). It is built on top of Chainguard Wolfi and uses a custom Go runner to handle configuration natively.
- Distroless: Built on Wolfi, containing only the binary and minimal dependencies (
iproute2). - Secure: Minimized attack surface.
- Rootless Capable: Can run in rootless Podman/Docker (requires
CAP_NET_ADMINand/dev/net/tun). - Config Compatible: Supports standard
wg-quickINI syntax plus Amnezia extensions.
- Host with
tunmodule loaded. - Docker or Podman.
-
Prepare Config: Create a
wg0.conffile.[Interface] PrivateKey = <YOUR_PRIVATE_KEY> Address = 10.0.0.1/24 ListenPort = 51820 Jc = 10 Jmin = 50 Jmax = 1000 S1 = 15 S2 = 25 H1 = 1 H2 = 2 [Peer] PublicKey = <PEER_PUBLIC_KEY> AllowedIPs = 10.0.0.2/32
-
Run with Docker:
docker run -d \ --name amneziawg \ --cap-add=NET_ADMIN \ --device=/dev/net/tun \ -v $(pwd)/wg0.conf:/config/wg0.conf:ro \ -p 51820:51820/udp \ ghcr.io/zstinnett/voidlink:latest -
Run with Podman (Rootless):
podman run -d \ --name amneziawg \ --cap-add=NET_ADMIN \ --device=/dev/net/tun \ -v $(pwd)/wg0.conf:/config/wg0.conf:ro \ -p 51820:51820/udp \ ghcr.io/zstinnett/voidlink:latest
PrivateKey,ListenPort,FwMark,Address,MTU.[Peer]:PublicKey,PresharedKey,Endpoint,PersistentKeepalive,AllowedIPs.
Jc: Junk packet count.Jmin: Junk packet minimum size.Jmax: Junk packet maximum size.H1,H2,H3,H4: Header types.
Important
This container implements multiple security hardening measures. Follow these guidelines for secure deployment.
File Permissions: The runner enforces strict permissions on the configuration file:
# Required: 0600 or more restrictive
chmod 600 wg0.confDocker Swarm:
services:
amneziawg:
image: ghcr.io/zstinnett/voidlink:latest
secrets:
- wg0_config
command: ["/config/wg0.conf"]
volumes:
- /run/secrets/wg0_config:/config/wg0.conf:ro
secrets:
wg0_config:
external: trueKubernetes:
apiVersion: v1
kind: Secret
metadata:
name: amneziawg-config
data:
wg0.conf: <base64-encoded-config>
---
apiVersion: v1
kind: Pod
spec:
containers:
- name: amneziawg
volumeMounts:
- name: config
mountPath: /config
readOnly: true
volumes:
- name: config
secret:
secretName: amneziawg-config
defaultMode: 0600Production Deployment:
- Use dedicated network namespaces
- Limit capabilities to only
NET_ADMIN - Never run with
--privileged
Example with restricted capabilities:
docker run -d \
--cap-add=NET_ADMIN \
--cap-drop=ALL \
--device=/dev/net/tun \
--read-only \
--security-opt=no-new-privileges \
-v $(pwd)/wg0.conf:/config/wg0.conf:ro \
ghcr.io/zstinnett/voidlink:latestgo build ./cmd/runnerContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.