Skip to content

Instantly share code, notes, and snippets.

@LizenzFass78851
Last active May 11, 2026 12:38
Show Gist options
  • Select an option

  • Save LizenzFass78851/699ed9829236bd6b9cac047f36d12a10 to your computer and use it in GitHub Desktop.

Select an option

Save LizenzFass78851/699ed9829236bd6b9cac047f36d12a10 to your computer and use it in GitHub Desktop.
The still working docker compose example for wg-easy in version 14.
services:
wg-easy:
image: ghcr.io/wg-easy/wg-easy:14 #version 14 is the latest version before rewithe source code science version 15
container_name: wg-easy
volumes:
- ./wireguard:/etc/wireguard
- /lib/modules:/lib/modules:ro #needed for newer distro versions
ports:
- "51820:51820/udp" #WG Port
- "51821:51821/tcp" #WebUI Port
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
# Uncomment 'NET_RAW' if using Podman
# - NET_RAW
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
environment:
# Change Language: (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi)
- LANG=en
# Required: Change this to your host's public address
- WG_HOST=vpn.test.invalid
# Optional:
### Passwort hash needs double $$, hash of 'foobar123'
### see "https://github.com/wg-easy/wg-easy/blob/v14/How_to_generate_an_bcrypt_hash.md" for generate the hash.
### Generate PW Hash with:
### ###
### docker run ghcr.io/wg-easy/wg-easy:14 node -e 'const bcrypt = require("bcryptjs"); const hash = bcrypt.hashSync("YOUR_PASSWORD", 10); console.log(hash.replace(/\$/g, "$$$$"));'
### ###
### No double quotes, single quotes, or spaces after the value!
# - PASSWORD_HASH=$$2a$$10$$EowHJjOqB.jGVjz68KqaFel1QTV7aTr72qlmVYw4lCWYofLXO3Psi
- PORT=51821
- WG_PORT=51820
# - WG_CONFIG_PORT=92820
- WG_DEFAULT_ADDRESS=10.8.10.x
- WG_DEFAULT_DNS=192.168.178.1
# - WG_MTU=1420
- WG_ALLOWED_IPS=192.168.178.0/24, 10.8.10.0/24
- WG_PERSISTENT_KEEPALIVE=25
# - WG_PRE_UP=echo "Pre Up" > /etc/wireguard/pre-up.txt
# - WG_POST_UP=echo "Post Up" > /etc/wireguard/post-up.txt
# - WG_PRE_DOWN=echo "Pre Down" > /etc/wireguard/pre-down.txt
# - WG_POST_DOWN=echo "Post Down" > /etc/wireguard/post-down.txt
# - UI_TRAFFIC_STATS=false
# - UI_CHART_TYPE=0 # (0 Charts disabled, 1 # Line chart, 2 # Area chart, 3 # Bar chart)
# - WG_ENABLE_ONE_TIME_LINKS=true
# - UI_ENABLE_SORT_CLIENTS=true
# - WG_ENABLE_EXPIRES_TIME=true

Evaluation

Version 14 of wg-easy is easier, but unfortunately this is no longer the case from version 15 onwards.

Important

  • So far only tested on the following systems:
    • Ubuntu 26.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment