Skip to content

Instantly share code, notes, and snippets.

@gustavohenrique
Created October 4, 2021 18:31
Show Gist options
  • Save gustavohenrique/276f78766ebea4996997cb17f262d687 to your computer and use it in GitHub Desktop.
Save gustavohenrique/276f78766ebea4996997cb17f262d687 to your computer and use it in GitHub Desktop.
Run Wireguard VPN peer
export WG_ADMIN_PASSWORD=`xxd -l4 -ps /dev/urandom`
export WG_WIREGUARD_PRIVATE_KEY=`docker run --rm place1/wg-access-server wg genkey` # OC+tBxEc/OFBFEO6Kcn92CWjaahBNBtcAgfhkjNII0E=
docker run \
-d \
--name wireguard \
--cap-add NET_ADMIN \
--device /dev/net/tun:/dev/net/tun \
-v wg-access-server-data:/data \
-e "WG_ADMIN_PASSWORD=$WG_ADMIN_PASSWORD" \
-e "WG_WIREGUARD_PRIVATE_KEY=$WG_WIREGUARD_PRIVATE_KEY" \
-p 8000:8000/tcp \
-p 51820:51820/udp \
place1/wg-access-server
# User: admin
xdg-open http://localhost:8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment