#https://github.com/linuxserver/docker-wireguard
version: "2.1"
services:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Shanghai
      - SERVERURL=fourtwogoods.top   #optional
      - SERVERPORT=51830   #optional
      - PEERS=niubility   #optional
      - PEERDNS=1.1.1.1 #optional
      - INTERNAL_SUBNET=10.10.10.0 #optional
      - ALLOWEDIPS=0.0.0.0/0 #optional
      - LOG_CONFS=true    #optional

    volumes:
      - /opt/docker-data/wireguard/config:/config
      - /opt/docker-data/wireguard/modules:/lib/modules
    ports:
      - 51830:51820/udp  #Port for VNP Client udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped