Skip to content

Instantly share code, notes, and snippets.

@verhovensky
Created June 7, 2024 13:01
Show Gist options
  • Save verhovensky/39fe50182eec0586a675ce7e62dfdae6 to your computer and use it in GitHub Desktop.
Save verhovensky/39fe50182eec0586a675ce7e62dfdae6 to your computer and use it in GitHub Desktop.
Docker wireguard (with API)
services:
wg-gen-web:
image: vx3r/wg-gen-web:latest
container_name: wg-gen-web
restart: unless-stopped
ports:
- "8080:8080"
environment:
- WG_CONF_DIR=/data
- WG_INTERFACE_NAME=wg0.conf
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- SMTP_USERNAME=example@gmail.com
- SMTP_PASSWORD=****************
- SMTP_FROM=Example <example@gmail.com>
- OAUTH2_PROVIDER_NAME=github
- OAUTH2_PROVIDER=https://github.com
- OAUTH2_CLIENT_ID=******************
- OAUTH2_CLIENT_SECRET=******************
- OAUTH2_REDIRECT_URL=https://wg-gen-web.example.com
- WG_STATS_API=$BRIDGE_GATEWAY_ADDRESS:8182
volumes:
- /etc/wireguard:/data
wg-api:
image: james/wg-api:latest
container_name: wg-json-api
restart: unless-stopped
cap_add:
- NET_ADMIN
network_mode: "host"
command: wg-api --device=wg0 --listen=$BRIDGE_GATEWAY_ADDRESS:8182
# Ananlytics can be send to SIEM-like systems using wg-json tool
# https://git.zx2c4.com/wireguard-tools/tree/contrib/json/wg-json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment