2025-09-30 23:39:41 +00:00
|
|
|
services:
|
|
|
|
|
wg-easy:
|
2025-10-01 21:57:15 +00:00
|
|
|
image: ghcr.io/wg-easy/wg-easy
|
|
|
|
|
container_name: wg-easy
|
2026-01-24 23:31:15 +00:00
|
|
|
environment:
|
|
|
|
|
LANG: en
|
2026-01-24 23:29:32 +00:00
|
|
|
WG_HOST: # Public IP or domain name where WG-Easy is accessible.
|
2026-01-24 23:31:15 +00:00
|
|
|
PASSWORD: # Password for accessing the WG-Easy web interface.
|
|
|
|
|
PORT: 51821 # Port for the web interface.
|
|
|
|
|
WG_PORT: 51820 # WireGuard port for VPN traffic.
|
|
|
|
|
WG_DEFAULT_ADDRESS:
|
|
|
|
|
WG_DEFAULT_DNS:
|
|
|
|
|
WG_MTU: 1420
|
|
|
|
|
# WG_CONFIG_PORT: 92820
|
|
|
|
|
WG_ALLOWED_IPS: 0.0.0.0/0, ::/0
|
2025-09-30 23:39:41 +00:00
|
|
|
volumes:
|
2025-10-01 21:57:15 +00:00
|
|
|
- /srv/docker/wg-easy:/etc/wireguard # Volume mapping for WireGuard configuration files.
|
2025-09-30 23:39:41 +00:00
|
|
|
ports:
|
2025-10-01 21:57:15 +00:00
|
|
|
- "51820:51820/udp" # UDP port used by WireGuard.
|
|
|
|
|
- "51821:51821/tcp" # TCP port for accessing the web interface.
|
|
|
|
|
cap_add: # Capabilities required for managing networking features.
|
2025-09-30 23:39:41 +00:00
|
|
|
- NET_ADMIN
|
|
|
|
|
- SYS_MODULE
|
2025-10-01 21:57:15 +00:00
|
|
|
sysctls: # Kernel parameters that need to be set for WireGuard.
|
2025-10-01 00:06:24 +00:00
|
|
|
- net.ipv4.conf.all.src_valid_mark=1
|
2025-10-01 21:57:15 +00:00
|
|
|
- net.ipv4.ip_forward=1
|
2026-01-24 23:21:38 +00:00
|
|
|
restart: unless-stopped
|