WireGuard (LinuxServer.io)

Deploy a fast, modern VPN server or client using a versatile Docker image. Automatically generate server and peer configurations, including QR codes for easy setup.

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:

  • Automated Server Setup: Generate server and peer configs by setting a single environment variable.
  • Flexible Client Mode: Run as a client by providing your own WireGuard configuration files.
  • Multi-Architecture Support: Natively runs on x86-64 (amd64) and arm64 platforms.
  • Easy Permissions: Uses standard PUID and PGID variables to avoid file permission issues.
  • Advanced Configurations: Supports site-to-site VPN setups and provides guidance for complex routing scenarios.

Directory Structure

wireguard-linuxserver-io
wireguard
config
.env
docker-compose.yml

docker-compose.yml

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-stopped

.env

SERVERURL=wireguard.yourdomain.com
Categories:

Share:

Ad
Favicon

 

  
 

Similar to WireGuard (LinuxServer.io)

Favicon

 

  
  
Favicon

 

  
  
Favicon