WireGuard

Description

WireGuard is a fast, modern, and secure VPN tunnel that utilizes state-of-the-art cryptography. It aims to be simpler, faster, and more secure than traditional VPN protocols.

Overview

Docker compose

---
services:
  wireguard:
    image: lscr.io/linuxserver/wireguard:latest
    container_name: wireguard
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
      - SYS_MODULE #optional
    env_file: .env

    volumes:
      - ./data/config:/config
      - ./data/lib/modules:/lib/modules #optional

    ports:
      - 51820:51820/udp

    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1

Environment Variables

PUID=0
PGID=0
TZ=Europe/Paris
SERVERURL=<your dns>
SERVERPORT=51820
PEERS=6 # number of clients
PEERDNS=auto # or custom dns like 1.1.1.1
INTERNAL_SUBNET=<internal subnet>
ALLOWEDIPS=0.0.0.0/0
Last updated on