
compose file :
services:
wg-easy:
image: ghcr.io/wg-easy/wg-easy:15
container_name: wg-easy
restart: unless-stopped
environment:
- INSECURE=true
volumes:
- ~/.wg-easy:/etc/wireguard
- /lib/modules:/lib/modules:ro
networks:
wg_net:
ipv4_address: 10.42.42.42
ipv6_address: fdcc:ad94:bacf:61a3::2a
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
- net.ipv6.conf.all.disable_ipv6=0
- net.ipv6.conf.all.forwarding=1
- net.ipv6.conf.default.forwarding=1
networks:
wg_net:
driver: bridge
enable_ipv6: true
ipam:
config:
- subnet: 10.42.42.0/24
- subnet: fdcc:ad94:bacf:61a3::/64If the server has only one /128 IPv6 do not worry – if you are using this docker configuration, your wireguard clients will use live IPv6 that is routed from your link’s local IPv6.
