Wg-Easy
The easiest way to run WireGuard VPN + Web UI on your own server.
Why consider Wg-Easy?
Wg-Easy is an all-in-one WireGuard VPN server and web dashboard. It features one-click client configuration generation, QR codes for mobile devices, and bandwidth statistics.
Learn Wg-Easy by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide10 sections
What is Wg-Easy?
Wg-Easy is an all-in-one, open-source WireGuard VPN server and management web interface packed into a single Docker container. It serves as an effortless, self-hosted alternative to proprietary VPN services (NordVPN, ExpressVPN) and complex commercial VPN gateways like OpenVPN Access Server.
Wg-Easy eliminates the complexity of configuring WireGuard cryptographic key pairs, IP routing tables, and iptables firewall rules manually. Through a clean web dashboard, administrators can create new VPN clients in one click, download configuration files, and display QR codes for mobile setup.
Who Is It For?
- Homelabbers & Self-Hosters: Setting up a personal home VPN in under 5 minutes to access local network devices remotely.
- Remote Workers & Travelers: Securing public Wi-Fi connections in cafes and airports by routing traffic through a trusted personal VPS.
- Small Teams: Providing team members with secure VPN access to internal staging servers without complicated enterprise software.
Key Features
- Single all-in-one Docker image containing the WireGuard VPN server and web administration portal.
- One-click client creation with automatic cryptographic key pair and IP allocation.
- QR code display for instant mobile client onboarding using the official WireGuard iOS and Android apps.
- Real-time client connection metrics: View active connected clients, transfer rates, and total data usage.
- One-click client disabling or deletion to instantly revoke VPN access for decommissioned devices.
Deploying Wg-Easy with Docker Compose
version: "3.8"services: wg-easy: environment: - PASSWORD_HASH=$$2a$$12$$generate_bcrypt_password_hash_here - WG_HOST=vpn.example.com - WG_PORT=51820 - WG_DEFAULT_ADDRESS=10.8.0.x - WG_DEFAULT_DNS=1.1.1.1,8.8.8.8 - WG_ALLOWED_IPS=0.0.0.0/0, ::/0 image: ghcr.io/wg-easy/wg-easy:latest container_name: wg-easy volumes: - ./etc_wireguard:/etc/wireguard ports: - "51820:51820/udp" - "51821:51821/tcp" restart: unless-stopped cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.ip_forward=1 - net.ipv4.conf.all.src_valid_mark=1Generate a password hash:
docker run --rm ghcr.io/wg-easy/wg-easy:latest wgpw 'YourSecurePasswordHere'Copy the generated hash into PASSWORD_HASH and launch the container:
docker compose up -dNavigate to http://vpn.example.com:51821 in your browser, log in with your password, and click New Client to generate your first VPN configuration.
Practical Use Cases
1. Mobile Phone Wi-Fi Security
A user creates a client named "iPhone", scans the generated QR code using the official WireGuard iOS app, and activates on-demand VPN encryption on public hotel networks.
2. Remote Homelab Management
A sysadmin connects a laptop to Wg-Easy to securely SSH into home servers and access NAS management interfaces from anywhere in the world.
3. Family Privacy Shield
A household configures family devices to route internet traffic through a home Wg-Easy server connected to Pi-hole for network-wide ad blocking on mobile data.
Troubleshooting and Limitations
- UDP Port 51820 Forwarding: WireGuard operates strictly over UDP; ensure port 51820/udp is forwarded in your router/firewall to the host machine.
- Linux Kernel Cap Add: Wg-Easy requires
NET_ADMINandSYS_MODULEcapabilities in Docker to manage host network interfaces and forwarding rules.
Official Resources
- GitHub Repository: https://github.com/wg-easy/wg-easy
- WireGuard Official Site: https://www.wireguard.com
Related tools
More options with a similar category or technology profile.
boringproxy
Simple, self-hosted reverse proxy and tunnel manager for exposing private web services securely.
OWASP ModSecurity
Open-source Web Application Firewall (WAF) engine providing cross-platform HTTP security inspection.
OpenCTI
Open-source platform for managing cyber threat intelligence knowledge and STIX2 relationships.
Maltrail
Malicious traffic detection system utilizing public blacklists and heuristic traffic behavior analysis.