Supported Architectures:
x86-64,arm64
Tested On: Ubuntu LTS, Debian 12, Alpine
Tested Devices: Raspberry Pi 5, Apple M-series, x86 CPUs
Show your support - Give a star if this project helped you!
- About
- Features
- Zone Permissions
- Infrastructure
- Quick Start
- Configuration
- Access
- API
- Documentation
- Screenshots
- Acknowledgements
- Contributing
- License
WireGate is a fully automated Docker-based WireGuard and AmneziaWG VPN server deployment and management platform. It provides a modern web dashboard for managing VPN configurations, peers, and network policies.
Key capabilities:
- Secure by Design: Dashboard and services are only accessible via VPN connection after initial setup. Master configuration is encrypted after being displayed at install.
- Zero-Exposure Architecture: Applications behind the WireGate private network need not expose any ports and can only be accessed via registered WireGuard connections.
- Privacy-Focused: Minimal logging by default, with optional Tor integration for enhanced anonymity.
- ISP DNS Bypass: Built-in encrypted DNS chain prevents ISP DNS query logging.
| Layer | Components |
|---|---|
| Dashboard | Python 3.12 / FastAPI, Vue 3 + Vite frontend |
| Native services | Rust (healthcheck, torflux, traffic-weir, wg-tcp-tunnel) |
| Packaging | Nuitka or PyInstaller one-file binaries (wiregate, vanguards) |
| Container | Scratch-based minimal image, non-root wiregate user (UID 1000) |
| Database | SQLite (simple mode) or PostgreSQL + Redis (scale mode) |
The Orangutan release is WireGate V2 — the current production line. It replaces the former Go/C++ native helpers with a unified Rust workspace under Src/rust/ and hardens the production image with hash-pinned Python dependencies, digest-pinned base images, and scoped sudo helpers.
- WireGuard & AmneziaWG Support - Standard WireGuard and obfuscated AmneziaWG protocols
- Modern Web Dashboard - Vue.js-based UI for configuration and peer management
- Zone-Based Access Control - Four permission zones (Admin, Members, LAN Users, Guest)
- Multi-Language Support - 13+ languages supported
- Tor Integration - Optional Tor exit proxy with pluggable transports (Snowflake, WebTunnel, Obfs4)
- Tor Vanguards - Enhanced Tor security with guard node protection
- Non-Root Container - Run as unprivileged user for enhanced security
- Rate Limiting - Distributed rate limiting with Redis support
- LDAP/Active Directory - Enterprise authentication integration
- 2FA/TOTP Support - Two-factor authentication
- Traffic Weir - Per-peer upload/download rate limiting
- Multiple Schedulers - HTB, HFSC, and CAKE traffic schedulers
- CPS Pattern Library - Client profile signatures for fingerprint resistance
- Mesh Networking - Create mesh networks from multiple configurations
- Simple Mode - SQLite for single-instance deployments
- Scale Mode - PostgreSQL + Redis for clustered deployments
- Kubernetes Ready - Full K8s deployment manifests included
- Health Checks - Built-in health monitoring endpoints
- Configuration Backup/Restore - 7z encrypted backups
- Peer Job Scheduling - Schedule peer restrictions, deletions, and rate limits
- Email Integration - Send peer configurations via email
- Real-Time Metrics - Traffic monitoring and system metrics
WireGate provides four access zones with different network permissions:
| Zone | Internet Access | Dashboard Access | Docker Network Access | Peer to Peer Access |
|---|---|---|---|---|
| Admin | Yes | Yes | Yes | Yes |
| Members | Yes | No | Yes | Yes |
| LAN Users | No | No | No | Yes |
| Guest | Yes | No | No | No |
flowchart TB
subgraph Internet
WWW[Internet]
end
subgraph WireGate["WireGate Container"]
WG[WireGuard/AmneziaWG]
Dashboard[Web Dashboard]
Tor[Tor Proxy]
TrafficWeir[Traffic Weir]
end
subgraph DNS["DNS Stack (Optional)"]
AdGuard[AdGuard/Pi-hole]
Unbound[Unbound]
DNSCrypt[DNSCrypt]
end
subgraph Database["Database (Scale Mode)"]
PostgreSQL[(PostgreSQL)]
Redis[(Redis)]
end
subgraph Clients
Admin[Admin Zone]
Members[Members Zone]
LAN[LAN Users Zone]
Guest[Guest Zone]
end
Admin & Members & LAN & Guest --> WG
WG --> Dashboard
WG --> TrafficWeir
TrafficWeir --> Tor
Tor --> WWW
WG --> AdGuard
AdGuard --> Unbound
Unbound --> DNSCrypt
DNSCrypt --> WWW
Dashboard --> PostgreSQL
Dashboard --> Redis
- Docker and Docker Compose installed
NET_ADMINandSYS_MODULEcapabilities available/dev/net/tundevice accessible
Production images run as the unprivileged wiregate user (UID 1000). Choose a Dockerfile based on your Python packaging preference:
| Dockerfile | Python build | Notes |
|---|---|---|
Dockerfile.nonroot.Nuitka |
Nuitka (recommended) | Best runtime performance; basis for distroless patterns |
Dockerfile.nonroot |
PyInstaller | Default in docker-compose.yml; familiar one-file layout |
Dockerfile.nonroot.PyOIDizer |
PyOxidizer | Experimental; embeds CPython in a Rust-built binary |
Dockerfile.Nuitka |
Nuitka (root build) | Legacy root-user variant |
# Recommended production build (Nuitka + non-root)
DOCKER_BUILDKIT=1 docker build -f Dockerfile.nonroot.Nuitka -t wiregate:latest .
# Default compose stack (PyInstaller + non-root)
docker compose build wiregateThe container still requires NET_ADMIN and SYS_MODULE capabilities. Privileged operations (WireGuard, iptables, tc, Tor) are delegated through scoped sudo helpers — see SECURITY.md for the trust model.
Create a docker-compose.yml:
networks:
private_network:
driver: bridge
ipam:
config:
- subnet: 10.2.0.0/24
services:
wiregate:
image: noxcis/wiregate:latest
container_name: wiregate
hostname: wiregate
cap_add:
- NET_ADMIN
- SYS_MODULE
devices:
- /dev/net/tun:/dev/net/tun
restart: unless-stopped
volumes:
- /lib/modules:/lib/modules:ro
- wiregate_conf:/etc/wireguard
- wiregate_db:/WireGate/db
- wiregate_rules:/WireGate/iptable-rules
environment:
- TZ=UTC
- DASHBOARD_TYPE=simple
- AMNEZIA_WG=true
- WGD_USER=admin
- WGD_PASS=admin
- WGD_REMOTE_ENDPOINT=your-server-ip
- WGD_REMOTE_ENDPOINT_PORT=443
- WGD_DNS=1.1.1.1
- WGD_PORT_RANGE_STARTPORT=4430
ports:
- "4430-4433:4430-4433/udp"
- "8443:443/tcp"
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv6.conf.all.forwarding=1
networks:
private_network:
ipv4_address: 10.2.0.3
volumes:
wiregate_conf:
wiregate_db:
wiregate_rules:Start the container:
docker compose up -dFor full stack deployment with DNS filtering and scale mode, see Installation Guide.
Run the integration test harness against the live compose stack:
bash scripts/tests/run_all_tests.sh
docker compose -f docker-compose.yml -f docker-compose.test.yml down -v # teardownSee Test Harness Guide for suite details, environment variables, and mesh/tunnel rigs. Targeted performance slices live under scripts/benchmark/; the mesh stress suite (scripts/tests/test_mesh_stress.sh) validates 20-node interconnect and ICMP paths.
| Variable | Description | Default |
|---|---|---|
DASHBOARD_TYPE |
Database mode: simple (SQLite) or scale (PostgreSQL+Redis) |
simple |
DASHBOARD_MODE |
Run mode: development or production |
production |
AMNEZIA_WG |
Enable AmneziaWG obfuscation | false |
WGD_USER |
Dashboard admin username | admin |
WGD_PASS |
Dashboard admin password | admin |
WGD_REMOTE_ENDPOINT |
Public IP/domain for peer configs | Required |
WGD_REMOTE_ENDPOINT_PORT |
Dashboard HTTPS listen port (container-side) | 6060 |
WGD_DNS |
DNS server for peers | 1.1.1.1 |
WGD_PORT_RANGE_STARTPORT |
Starting port for WireGuard interfaces | 4430 |
TZ |
Timezone | UTC |
| Variable | Description | Default |
|---|---|---|
WGD_TOR_PROXY |
Enable Tor exit proxy | false |
WGD_TOR_PLUGIN |
Transport plugin: snowflake, webtunnel, obfs4 |
snowflake |
WGD_TOR_BRIDGES |
Use Tor bridges | false |
WGD_TOR_EXIT_NODES |
Exit node countries (e.g., {us},{ch}) |
- |
For complete configuration reference, see Configuration Guide.
After connecting to WireGate via the Admin zone:
| Service | URL |
|---|---|
| WireGate Dashboard | https://wire.gate/ |
| AdGuard (if configured) | http://ad.guard/ |
| Pi-hole (if configured) | http://pi.hole/ |
Initial credentials are displayed in the console output or set via environment variables.
WireGate provides a comprehensive REST API for programmatic access to all features.
# API Key authentication
curl -X GET https://your-server/api/getConfigurations \
-H "wg-dashboard-apikey: your-api-key"
# Session authentication
curl -X POST https://your-server/api/authenticate \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "password"}'| Category | Endpoint | Description |
|---|---|---|
| Configurations | GET /api/getConfigurations |
List all WireGuard configurations |
| Configurations | POST /api/addConfiguration |
Create new configuration |
| Peers | POST /api/addPeers/{config} |
Add peers to configuration |
| Peers | GET /api/downloadPeer/{config} |
Download peer config file |
| Traffic | POST /api/set_peer_rate_limit |
Set peer rate limits |
| Traffic | GET /api/getConfigurationRealtimeTraffic |
Get real-time traffic stats |
| System | GET /api/systemStatus |
Get system status (CPU, memory, disk) |
| Health | GET /api/health |
Health check endpoint |
| Backup | GET /api/createConfigurationBackup |
Create configuration backup |
| Database | GET /api/database/stats |
Get database statistics |
| Tor | GET /api/tor/process/status |
Get Tor process status |
All API responses follow a consistent format:
{
"status": true,
"message": "Optional message",
"data": { }
}The API implements rate limiting to prevent abuse. Default: 100 requests per minute.
For complete API documentation with all endpoints, request/response schemas, and examples, see API Documentation.
| Document | Description |
|---|---|
| Installation Guide | Docker, Kubernetes, and bare-metal installation |
| Configuration Guide | Complete environment variable reference |
| Tor Setup | Tor integration and configuration |
| Architecture | Middleware, async tasks, build/runtime layout |
| API Documentation | REST API reference |
| Database Architecture | Database design and modes |
| Security | Application security features and hardening |
| Container Hardening | Non-root image trust model and sudo helpers |
| Test Harness | Integration test suite and compose overlay |
| Traffic Analysis | Privacy and traffic correlation analysis |
| Distroless WireGuard | Reusing minimal scratch-base patterns |
| Kubernetes Deployment | Kubernetes deployment guide |
| Changelog | Version history |
| Merging oxidized | Checklist for landing the oxidized branch into main |
WireGate builds upon the work of these excellent projects:
- WireGuard - Fast, modern VPN protocol
- AmneziaWG - Obfuscated WireGuard
- WGDashboard - Original dashboard by Donald Zou
- AdGuard Home - Network-wide ad blocking
- Pi-hole - DNS sinkhole
- Unbound - Validating DNS resolver
- DNSCrypt - DNS encryption
- Tor Project - Anonymity network
Contributions are welcome! Feel free to fork the repository, make changes, and submit a pull request.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.









