Skip to content

Instantly share code, notes, and snippets.

@mrl22
Created January 27, 2026 15:11
Show Gist options
  • Select an option

  • Save mrl22/239ccfb87c1e03b85633a94967f7bf0a to your computer and use it in GitHub Desktop.

Select an option

Save mrl22/239ccfb87c1e03b85633a94967f7bf0a to your computer and use it in GitHub Desktop.
Start a wg-easy docker server
mkdir -p /root/docker/wireguard
docker run -d \
--name=wg-easy \
-e WG_HOST=<public_ip> \
-e PASSWORD=<password> \
-v /root/docker/wireguard:/etc/wireguard \
-p 51820:51820/udp \
-p 51821:51821/tcp \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--sysctl="net.ipv4.ip_forward=1" \
--restart unless-stopped \
weejewel/wg-easy
echo "Web GUI on http:51821"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment