version: "2.1"
services:
  wireguard:
    image: lscr.io/linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Hong_Kong
      - PEERDNS=8.8.8.8
      - PEERS=4
      - INTERNAL_SUBNET=10.13.13.0/24
      - SERVERURL=vpn.algometic.com #optional
      - SERVERPORT=51820
      - ALLOWEDIPS=0.0.0.0/0 #optional
    volumes:
      - ./data/config:/config
      - ./data/lib/modules:/lib/modules
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: "no" 



  wg-manager:
    container_name: wg-manager
    image: perara/wg-manager
    restart: "no" 
    sysctls:
      net.ipv6.conf.all.disable_ipv6: 0  # Required for IPV6
    cap_add:
      - NET_ADMIN
    #network_mode: host # Alternatively
    ports:
       - 51820:51820/udp
       - 8888:8888
    volumes:
      - ./wg-manager:/config
    environment:
      HOST: 0.0.0.0
      PORT: 8888
      ADMIN_USERNAME: admin
      ADMIN_PASSWORD: admin
      WEB_CONCURRENCY: 1


