Complete WireGuard VPN management made easy. Zero-touch deployment with beautiful TUI & Web UI. One script = full VPN appliance.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โโโโโโโโ โโโโโโ โโโโ โโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโ โโโ โโโโโโโ โ โ โโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโ โโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโ โโโ โโโโโโโโโ โโ โโโโโโ โโโโ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ โโโโโโโโโโโโโโโโโโโ โโโ โ โ โโโโโโโโโโโ โโโโโโ โโโ โโโโโโ โโโโโโโโโโโโโโ โโโ โโโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโ โโโโโโ โโโโโโ โโโโโโโโโโโโโ โโโ โโโโโโโโ โโโโโโโ โ โ โ โ Z E R O - T O U C H W I R E G U A R D โ โ V P N O R C H E S T R A T O R โ โ โ โ [ v1.0.4 - samnet-wg ] โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ What is it?
SamNet-WG is a complete, enterprise-grade WireGuard VPN management solution that transforms any Linux server into a secure VPN appliance in under 5 minutes.
It features a unique Dual-Control Plane architecture:
- High-Performance TUI: A beautiful, flicker-free terminal interface for zero-latency management.
- Modern Web Dashboard: A synced, React-based web UI for remote administration.
๐ธ Screenshots
๐ Web User Interface
Modern React-based dashboard for remote administration
โจ Features
๐ก๏ธ Security First
- Zero-Trust Architecture: Strict IP validation and "Ghost Peer" prevention.
- Scoped Uninstall: Only
project=samnet-wglabeled containers/images are removed. - Non-Root Services: API and UI run as unprivileged users in Docker.
๐ฎ Interactive CLI (TUI)
- Smart Refresh: Flicker-free interface updates using
tputandSIGWINCHhandling. - System Transparency: "About" screen explicitly lists all file paths.
- Auto-Init: Bandwidth tracking and databases initialize automatically.
- Context Preservation: Deep navigation menus that don't reset on refresh.
๐ฅ Firewall Management
- Integrated Port Manager: Manage open ports directly from the TUI (TCP/UDP support).
- Smart Detection: Automatically detects and whitelists existing services (Web, DB, Monitoring) during install.
- Docker Compatible: Runs safely alongside other containers without interfering with Docker networking.
- Mode Awareness: Detects existing firewalls (UFW/iptables) and adapts automatically.
๐ Management
- Sync Engine: Edit files manually, use the CLI, or use the Web UIโit all stays in sync.
- Bandwidth Limits: Enforce data caps per peer (e.g., "10GB/month").
- Visualizations: ASCII graphs for bandwidth usage directly in the terminal.
- QR Codes: Instant mobile client onboarding.
๐ Quick Start
One-Line Install (Recommended)
curl -sSL https://raw.githubusercontent.com/SamNet-dev/wg-orchestrator/main/install.sh | sudo bash
This downloads SamNet-WG and launches the interactive setup wizard where you can:
- Configure your VPN subnet
- Choose Web UI or CLI-only mode
- Set up firewall rules
- Create your first peer
Manual Install
git clone https://github.com/SamNet-dev/wg-orchestrator.git
cd wg-orchestrator
sudo ./samnet.sh
Zero-Touch Install (Scripted/Automated)
curl -sSL https://raw.githubusercontent.com/SamNet-dev/wg-orchestrator/main/install.sh | sudo bash -s -- --zero-touch
Web UI Default Login: admin / changeme
๐ป Usage
Terminal Interface
sudo samnet # Launch main menu
| Key | Menu Option | Description | |:---:|-------------|-------------| | 1 | ๐ Status Dashboard | System overview & health | | 2 | ๐ง Install / Repair | Zero-touch setup & self-healing | | 3 | ๐ฅ Peer Management | Create, list, limit, & edit peers | | 4 | ๐ Security & Access | Audit logs, user roles | | 5 | ๐ Observability | Live stats, graphs, & logs | | 6 | โ๏ธ Advanced Tools | Firewall diff, backup, dry-run | | 7 | ๐ About / Docs | System paths & project info | | 8 | ๐๏ธ Uninstall | Safe, scoped removal | | Q | ๐ช Quit | Exit the application |
Common Operations
# Add a new peer
sudo samnet โ Peers โ Add Peer โ Enter name โ Scan QR
Create temporary access (auto-expires)
sudo samnet โ Peers โ Add Peer โ Temporary โ Set days
View live traffic
sudo samnet โ Observability โ Traffic Stats
Uninstall securely
sudo samnet --uninstall
Update to latest version
sudo samnet --update
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SamNet-WG โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ samnet.sh โโโโโบโ API (Go) โโโโโบโ UI (React) โ โ
โ โ CLI / TUI โ โ Port 8766 โ โ Port 8080 โ โ
โ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโฌโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ (Sync Engine) โ
โ โโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโ โ
โ โ State (SQLite + FS) โ โ
โ โ /var/lib/samnet-wg/ โ โ
โ โ /opt/samnet/clients/ โ โ
โ โโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโผโโโโโโโโโ โ
โ โ WireGuard โ โ
โ โ Kernel Mod โ โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ File Locations
We believe in full system transparency. Here is exactly where SamNet-WG stores its data:
| Path | Description | |------|-------------| | /opt/samnet/ | Main installation directory (scripts, binaries). | | /opt/samnet/clients/ | Generated peer configuration files (.conf). | | /var/lib/samnet-wg/ | SQLite database and persistent application state. | | /var/log/samnet-wg/ | Application logs (rotated automatically). | | /etc/wireguard/ | WireGuard interface configuration (wg0.conf). | | /root/.samnet-wginitialcredentials | Initial admin credentials (delete after use). |
๐ Security
- Argon2id password hashing.
- CSRF tokens on all state-changing API requests.
- Strict Input Validation preventing "Ghost Peers" (0.0.0.0 IPs).
- Constant-time auth comparisons.
- Docker Pruning Scoped to
project=samnet-wglabels to avoid touching your other containers.
๐ Requirements
- OS: Debian 11+, Ubuntu 20.04+, Raspberry Pi OS
- RAM: 512 MB minimum
- Disk: 100 MB for CLI, 500 MB with Docker
- Network: Public IP or port forwarding (UDP 51820)
๐บ๏ธ Roadmap
โ Recently Shipped (v1.0.4)
| Feature | Description | |---------|-------------| | ๐ One-Line Install | curl -sSL ... \| bash for instant deployment | | ๐ Auto-Update | samnet --update to upgrade without reinstalling |
Stay tuned for updates!
๐ค Contributing
Contributions welcome!
# Development setup
git clone https://github.com/SamNet-dev/wg-orchestrator.git
cd wg-orchestrator
Test changes in debug mode
sudo ./samnet.sh --debug
๐ License
MIT License - See LICENSE for details.
Built with โค๏ธ by [Sam]
๐ Support
If this project helps you, consider supporting continued development: