Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
30 lines
1.2 KiB
YAML
30 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 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}
|
|
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
|