How to generate more VPN peers (users)
Go into the wireguard folder
cd /opt/wireguard-server
Change number of peers in the docker-compose.yml file and save
nano docker-compose.yml
version: "2.1" services: wireguard: image: linuxserver/wireguard container_name: wireguard cap_add: - NET_ADMIN - SYS_MODULE environment: - PUID=1000 - PGID=1000 - TZ=Africa/Kampala - SERVERURL=youraddress.com #optional - SERVERPORT=51820 #optional - PEERS=10 #change this to add more vpn users - PEERDNS=auto #optional - INTERNAL_SUBNET=10.13.13.0 #optional volumes: - /docker/wireguard/config:/config #change this to your location - /lib/modules:/lib/modules ports: - 51820:51820/udp sysctls: - net.ipv4.conf.all.src_valid_mark=1 restart: unless-stopped
Recreate the wireguard container
docker-compose up -d --force-recreate
To show QR code for any peer, run the command in the wireguard folder
docker exec -it wireguard /app/show-peer 2