Files
wireguard-admin/docker-compose.yml
lofyerandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> b683fad5d8 Make admin web UI port configurable via WEB_PORT
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-07-06 23:57:31 +08:00

32 lines
1.2 KiB
YAML

services:
wireguard-admin:
image: lofyer/wireguard-admin:latest
container_name: wireguard-admin
restart: unless-stopped
cap_add:
- NET_ADMIN
# Host networking: new interfaces and their UDP ports work without
# editing port mappings. The admin UI listens on host port WEB_PORT
# (default 8000).
# Requires net.ipv4.ip_forward=1 on the host (sysctls cannot be set
# per-container in host network mode); entrypoint.sh enables it.
network_mode: host
devices:
- /dev/net/tun:/dev/net/tun
environment:
WG_INTERFACE: ${WG_INTERFACE:-wg1}
WG_HOST: ${WG_HOST:?set WG_HOST to your public IP or domain}
WG_PORT: ${WG_PORT:-51821}
WG_SUBNET: ${WG_SUBNET:-10.8.0.0/24}
WG_DNS: ${WG_DNS:-8.8.8.8}
WG_ALLOWED_IPS: ${WG_ALLOWED_IPS:-0.0.0.0/0, ::/0}
WG_RELAY_SUBNETS: ${WG_RELAY_SUBNETS:-}
WG_PEER_ISOLATION: ${WG_PEER_ISOLATION:-false}
WEB_PORT: ${WEB_PORT:-8000}
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?set ADMIN_PASSWORD in .env}
SECRET_KEY: ${SECRET_KEY:?set SECRET_KEY in .env}
volumes:
- ./volumes/admin-data:/opt/wireguard-admin/data
- ./volumes/config:/etc/wireguard