Easily deploy a fast, modern, and secure WireGuard VPN using this versatile Docker image. It can function as a full-featured VPN server or a simple VPN client, adapting to your specific needs.
When running in server mode, configuration is incredibly straightforward. Simply define the number of peers you need, and the container automatically generates all necessary server and client configuration files. For effortless setup on mobile devices, it can output QR codes for each peer configuration directly to the log or save them as PNG files. The server is highly customizable through environment variables, allowing you to set your domain, port, internal subnet, and DNS settings.
Key features include:
PUID and PGID variables to avoid file permission issues.services:
wireguard:
image: lscr.io/linuxserver/wireguard:latest
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- SERVERURL=${SERVERURL}
- SERVERPORT=51820
- PEERS=1
- PEERDNS=auto
- INTERNAL_SUBNET=10.13.13.0
- ALLOWEDIPS=0.0.0.0/0
- LOG_CONFS=true
volumes:
- ./config:/config
- /lib/modules:/lib/modules:ro
ports:
- 51820:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stoppedSERVERURL=wireguard.yourdomain.comAuto-fetched about 21 hours ago
Auto-fetched about 21 hours ago