services: wireguard: image: linuxserver/wireguard:1.0.20250521 container_name: wireguard restart: always volumes: - wireguard_config:/config - /lib/modules:/lib/modules cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.src_valid_mark=1 environment: - PUID=1000 - PGID=1000 - TZ=Europe/Paris - SERVEURURL=lucasroyer.com #optional - SERVERPORT=51820 #optional - PEERS=4 #optional - PEERDNS=auto #optional - INTERNAL_SUBNET=10.10.10.0 #optional - LOG_CONFS=true #optional ports: - 51820:51820/udp volumes: wireguard_config: external: true