The lightweight CLI manager for WireGuard and AmneziaWG.
Most WireGuard tools fall into two extremes: manual config editing or heavy web UIs that require Docker, PostgreSQL, and a browser.
jwg is a single-binary CLI that handles the entire lifecycle of your VPN server: networking, keys, firewall rules, and peer management automatically. It doesn't need a database server or a web panelโit just works.
Crucially, it is compatible with AmneziaWG-go.
- ๐ป AmneziaWG Ready: Designed to work seamlessly with
amneziawg-goandwireguard-gointerfaces, not just kernel modules. - ๐ซ No Web UI Needed: Forget about
docker-compose, web servers, or opening HTTP ports. Manage your VPN entirely via SSH. - ๐ Battery Included: Handles NAT, Packet Forwarding, and Firewall (nftables & UFW) automatically. You don't need to be a Linux network engineer to set this up.
- ๐ฑ QR Codes in Terminal: Generate configs and display QR codes directly in the console for instant mobile connection.
- ๐ Embedded Database: Stores peers in a
jwg.dbfile. Zero external dependencies.
jwg manages the configuration logic, but you need to keep the interface process running.
Recommended: AmneziaWG
wget https://raw.githubusercontent.com/Jipok/jwg/refs/heads/master/amneziawg-go
chmod +x amneziawg-go
./amneziawg-go wg0Or: Standard Kernel WireGuard
ip link add dev wg0 type wireguardRun jwg for the first time. It will auto-detect your Public IP and apply necessary firewall rules.
wget https://github.com/Jipok/jwg/releases/latest/download/jwg
chmod +x jwg
./jwgAdd a new peer. jwg will find the next available IP, generate keys, and sync the interface.
./jwg -add phoneThe output matches the standard client config format and includes a QR code.
| Command | Description |
|---|---|
jwg -add <name> |
Add a new peer. Auto-assigns IP. |
jwg -add <name> -ip 10.8.0.5/32 |
Add a peer with a specific internal IP. |
jwg -del <name> |
Delete a peer. |
jwg -show <name> |
Display config and QR code for an existing peer. |
jwg |
Show server status, used IPs, and connected peers. |
Flags override default settings and persist in the database.
Database Location:
jwg first checks for ./jwg.db. If not found, it defaults to /var/lib/jwg/jwg.db. You can specify a custom path manually:
jwg -db /etc/wireguard/my_vpn.dbNetwork Settings:
# Set custom listen port
jwg -port 51820
# Set custom DNS for clients
jwg -dns "1.1.1.1, 8.8.8.8"
# Force a specific endpoint (e.g. behind NAT/Cloudflare)
jwg -endpoint "vpn.my-server.com:51820"
# Change internal subnet
jwg -subnet "192.168.100.1/24"jwg is opinionated about networking to save you time:
- Forwarding: It enables kernel IP forwarding.
- NAT: It creates a dedicated
jwg_nattable in nftables to masquerade traffic (allow peers to access the internet). - UFW Support: If UFW is active,
jwgautomatically adds generic allows and route rules to prevent silent packet drops.