version: '2.1' services: wg: build: . ports: - "51820:51820/udp" cap_add: - NET_ADMIN sysctls: - net.ipv4.ip_forward=1 - net.ipv4.conf.all.rp_filter=2 - net.ipv6.conf.all.disable_ipv6=0 devices: - "/dev/net/tun:/dev/net/tun" volumes: - "./config.d:/etc/wireguard/" environment: DEVICE: tun0 SERVER_HOST: example.com SERVER_PORT: 51820 NETWORK: 192.168.42.0 CLIENTS: 5