Repository navigation
Home
github-actions[bot] edited this page Nov 1, 2026
·
2 revisions
A WireGuard server for your devices with zero-config peers, per-peer exits (direct, upstream VPN container, WireGuard provider, or another peer acting as exit node), a fail-closed kill switch, hot reload, and a sidecar mode for other containers — all in one Alpine + s6-overlay image.
phone (alice) ──┐ ┌─ gw=direct ──► eth0 ──► internet (your IP)
laptop (bob) ──┼─► wg0 (server) ─┼─ gw=nl ──────► nordvpn-wg container ──► NL exit
tv (carol) ──┘ ├─ gw=mullvad ─► wg-mullvad ──► provider
└─ gw=home ────► wg-home ──► your home router ──► home ISP
-
Zero-config peers —
PEERS=alice,bobgenerates keys, addresses, configs and QR codes (Peers) - Bring your own keys — a peer may give only its public key; no private key on the server (Peers)
- Per-peer exits — direct, an upstream VPN container, a provider conf, or another peer (Gateway Mode)
-
Exit nodes —
exit=truemakes a peer such as a home router an exit; config generated (Exit Nodes and Upstreams) - Fail-closed kill switch — if an upstream is down, its peers lose internet, never leak (Gateway Mode)
-
Hot reload —
wg-reloadapplies the peers file in place, unchanged peers keep sessions (Peers) - DNS-named gateways — sidecars and endpoints by hostname, re-resolved and re-routed live (Gateway Mode)
-
Sidecar mode —
LOCAL_GATEWAYtunnels the container andnetwork_mode: service:clients (Sidecar Mode) -
Opt-in health monitor —
HEALTHCHECKfor the interface, routing tables and egress probes (Health Monitor) -
Built-in reporting —
peer-reportshows handshake, traffic and exit per peer (Troubleshooting) -
Kernel WireGuard — uses the host module when present, falls back to
wireguard-go(Architecture and Internals) - Small multi-arch Alpine image — 386, amd64, arm/v6, arm/v7, arm64, riscv64 (Building and CI)
| If you want to… | Go to |
|---|---|
| Get your first device connected in five minutes | Getting Started |
| Understand the peers file: options, keys, addresses, device configs, hot reload | Peers |
| Send peers out through different exits, name gateways, understand the kill switch | Gateway Mode |
| Use another peer, a provider conf or a cascade as an exit | Exit Nodes and Upstreams |
| Route other containers / LAN hosts through a tunnel | Sidecar Mode |
| Understand every variable, volume, port and capability | Configuration Reference |
| Report container health to Docker / monitoring | Health Monitor |
| Fix a problem | Troubleshooting |
| See how the image works internally | Architecture and Internals |
| Build it yourself / understand image tags and releases | Building and CI |
services:
wireguard:
image: azinchen/wireguard:latest
cap_add:
- NET_ADMIN
sysctls:
- net.ipv4.ip_forward=1
ports:
- 51820:51820/udp
environment:
- SERVER_ENDPOINT=vpn.example.com
- PEERS=alice,bob
volumes:
- ./volumes/config:/etc/wireguardThen docker exec wireguard peer-conf alice --qr and scan — see Getting Started.
Family: ocserv-server shares the gateway contract (VPN_GATEWAY*); nordvpn / nordvpn-wg are drop-in upstream gateways; openconnect-client is the OpenConnect sidecar.
Project: https://github.com/azinchen/wireguard License: MIT
wireguard · MIT License · Built on WireGuard + s6-overlay
Setup
Routing
Operating
Under the hood