WireGuard/AmneziaWG interface in Docker + metrics exporter
- Python 58.6%
- Shell 28.3%
- Dockerfile 13.1%
|
All checks were successful
Build Docker container / release (push) Successful in 32s
|
||
|---|---|---|
| .forgejo/workflows | ||
| .gitignore | ||
| amnezia-archive-keyring.gpg | ||
| compose.yaml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| exporter.py | ||
| README.md | ||
Stupid simple Wiregaurd/Amneziawg setup in Docker with Prometheus exporter
Set up: use following Docker-compose:
services:
exporter:
image: code.mmk.pw/owner/dockerguard:latest
volumes:
- ./configs:/configs:ro # Folder with Wireguard/AmneziaWG interface config files
environment:
- EXPORTER_ONLY=1 # Optional, if set, will only launch exporter without (a)wg interfaces
- HTTP_PORT=41337 # Optional, prometheus exporter port, defaults to 41337
- HTTP_HOST=0.0.0.0 # Optional, prometheus exporter host, defaults to 0.0.0.0
# -- For network mode
privileged: true
# -- For host-network exporter only
# network_mode: host
# cap_add:
# - NET_ADMIN
Note: to use AmneziaWG, their kernel module should be installed on host.
Named WireGaurd config example:
[Interface]
PrivateKey = XXXX
Address = 10.19.0.1
# Test peer
[Peer]
PublicKey = YYYY
AllowedIPs = 10.19.0.2/32
With this config, Test peer will be used instead of YYYY in metrics.