vm-mts/wg-easy/docker-compose.yaml

42 lines
931 B
YAML
Raw Permalink Normal View History

2025-10-31 08:55:39 +04:00
#volumes:
# etc_wireguard:
2025-05-07 15:34:35 +04:00
services:
wg-easy:
environment:
# Optional:
2025-10-31 08:55:39 +04:00
- PORT=51821
2025-05-07 15:34:35 +04:00
# - HOST=0.0.0.0
- INSECURE=true
2025-10-31 08:55:39 +04:00
- INIT_PORT= 35101
2025-05-07 15:34:35 +04:00
2025-10-31 08:55:39 +04:00
image: ghcr.io/wg-easy/wg-easy:15
2025-05-07 15:34:35 +04:00
container_name: wg-easy
networks:
2025-10-31 08:55:39 +04:00
overlay_net:
ipv4_address: 11.200.0.5
#ipv6_address: fdcc:ad94:bacf:61a3::2a
2025-05-07 15:34:35 +04:00
volumes:
2025-10-31 08:55:39 +04:00
- /app/wg-easy/db:/etc/wireguard
# - etc_wireguard:/etc/wireguard
2025-05-07 15:34:35 +04:00
- /lib/modules:/lib/modules:ro
ports:
2025-10-31 08:55:39 +04:00
- "35101:35101/udp"
2025-05-07 15:34:35 +04:00
- "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
2025-10-31 08:55:39 +04:00
# - NET_RAW # ⚠️ Uncomment if using Podman
2025-05-07 15:34:35 +04:00
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
2025-10-31 08:55:39 +04:00
# - net.ipv6.conf.all.disable_ipv6=0
# - net.ipv6.conf.all.forwarding=1
# - net.ipv6.conf.default.forwarding=1
2025-05-07 15:34:35 +04:00
networks:
2025-10-31 08:55:39 +04:00
overlay_net:
external: true