wg-easy handout
wg-easy contains wireguard and gui for wireguard
installation
services:
wg-easy:
image: ghcr.io/wg-easy/wg-easy
container_name: wg-easy
restart: always
labels:
- "com.centurylinklabs.watchtower.enable=true"
environment:
- LANG=en
- WG_HOST=heyandy.ddns.net
##Optional:
- PASSWORD=<password>
#- WG_PORT=51820
- WG_DEFAULT_ADDRESS=10.8.0.x
- WG_DEFAULT_DNS=192.168.1.10
#- WG_MTU=1420
#- WG_ALLOWED_IPS=192.168.1.0/24, 10.0.1.0/24
#- WG_PERSISTENT_KEEPALIVE=25
#- WG_PRE_UP=echo "Pre Up" > /etc/wireguard/pre-up.txt
#- WG_POST_UP=echo "Post Up" > /etc/wireguard/post-up.txt
#- WG_PRE_DOWN=echo "Pre Down" > /etc/wireguard/pre-down.txt
#- WG_POST_DOWN=echo "Post Down" > /etc/wireguard/post-down.txt
#- UI_TRAFFIC_STATS=true
#- UI_CHART_TYPE=0 # (0 Charts disabled, 1 # Line chart, 2 # Area chart, 3 # Bar chart)
volumes:
- ./wg-easy:/etc/wireguard
ports:
- "51820:51820/udp"
- "51821:51821/tcp"
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1