The easiest way to run WireGuard VPN + Web-based Admin UI
π One-line installation β’ π SSL support β’ π₯ User management β’ β° Client expiry
WG-Easy Installer is a comprehensive automation script that simplifies the deployment of wg-easy, a beautiful web interface for WireGuard VPN. This installer handles everything from dependency installation to SSL configuration, making it perfect for both beginners and advanced users.
- π One-Command Installation - Deploy WireGuard VPN in seconds
- π SSL/TLS Support - Automatic SSL certificates with Let's Encrypt
- π Custom Domain Support - Professional setup with your own domain
- π₯ Advanced User Management - Built-in client expiry system
- π·οΈ Custom Image Tags - Choose your preferred wg-easy version (default v15)
- π§ Easy Configuration - Modify settings without reinstalling
- π‘οΈ Security First - No port conflicts, proper firewall handling
- π± Responsive Web UI - Modern interface for all devices
- π Auto-Updates - Daily client expiry enforcement via cron
- π¦ Zero Dependencies - Installs everything automatically
bash <(curl -fsSL https://raw.githubusercontent.com/deathline94/wg-easy-installer/master/wg-easy-install.sh)That's it! The script will guide you through the setup process.
- Dependency Check - Installs required packages (Docker, Nginx, Certbot, etc.)
- Configuration - Prompts for wg-easy image tag, domain, and ports
- SSL Setup - Automatically configures SSL certificates if domain provided
- WireGuard Deployment - Sets up containerized WireGuard with Docker Compose
- User Management - Configures client expiry system with cron jobs
This installer has been heavily tested and is fully compatible with wg-easy v15+. The script defaults to the 15 major tag to automatically receive minor updates and security patches while avoiding breaking changes.
- Domain: Leave blank for IP-based access
- Web UI Port: Default
51821(customizable) - WireGuard Port: Default
51820(customizable) - Access:
http://YOUR_IP:UI_PORT
- Domain: Your domain (e.g.,
vpn.example.com) - SSL: Automatic Let's Encrypt certificates
- Proxy Setup: Configures Nginx as a reverse proxy, and sets
INSECURE=truein wg-easy so it can securely run behind the local Nginx proxy. - Access:
https://vpn.example.com:UI_PORT
Once installed, run the script again to access the management menu:
| Option | Description |
|---|---|
| Uninstall | Complete removal of WG-Easy and all configurations |
| Manage Users | Access user management system |
| Modify | Update configuration without reinstalling |
| Exit | Close the management interface |
| Feature | Description |
|---|---|
| List Clients | View all clients with expiry status |
| Set Expiry | Assign 30-day expiry to clients |
| Remove Expiry | Clear client expiry dates |
| Extend Expiry | Add another 30 days to existing clients |
- Daily Checks: Automated cron job removes expired clients
- Flexible Management: Set, remove, or extend expiry dates
- Zero Downtime: Automatic service restart after changes
- Let's Encrypt Integration: Free SSL certificates
- Auto-Renewal: Certificates renew automatically
- Custom Ports: No conflicts with existing services
- Nginx Reverse Proxy: Professional-grade setup
- Containerized: Isolated and secure deployment
- IPv6 Support: Full dual-stack networking
- Resource Management: Optimized container configuration
- Easy Updates: Simple container version management
- Experimental Obfuscation: Bypass Deep Packet Inspection (DPI) in heavily restricted networks.
- Interactive Setup: The script will ask if you want to enable AmneziaWG during installation.
- Note: When enabled, standard WireGuard clients will not be able to connect. All users must use the official AmneziaWG app.
After installation, access your VPN management interface:
- With Domain:
https://yourdomain.com:UI_PORT - Without Domain:
http://YOUR_IP:UI_PORT
Important
v15+ Setup Wizard: Upon your very first login, wg-easy will prompt you with a Setup Wizard to create your admin credentials.
CRITICAL: When the wizard asks for your "WireGuard Port", you MUST enter the exact same port you provided to this installation script! The script opens the physical port on your server's Docker daemon, while the wizard writes that port into your .conf files. If they do not match, your VPN clients will not be able to connect!
- Open the web interface
- Click "Add Client"
- Download the configuration file
- Import into your WireGuard client
- Mobile: iOS, Android
- Desktop: Windows, macOS, Linux
- Router: pfSense, OPNsense, OpenWrt
Ensure these ports are open:
# WireGuard traffic
sudo ufw allow [WG_PORT]/udp
# Web interface
sudo ufw allow [UI_PORT]/tcp- Use strong, unique passwords for the admin interface
- Regularly review and remove unused clients
- Enable client expiry for temporary access
- Monitor logs for suspicious activity
- Keep the system updated
- OS: Ubuntu 18.04+ / Debian 9+ / CentOS 7+
- RAM: 512MB
- Storage: 1GB free space
- Network: Public IP address
- OS: Ubuntu 22.04 LTS
- RAM: 1GB+
- CPU: 1 vCPU
- Storage: 5GB+ SSD
# Check what's using the port
sudo netstat -tlnp | grep :51821
# Kill the process if needed
sudo kill -9 [PID]# Check certificate status
sudo certbot certificates
# Renew certificates manually
sudo certbot renew# Restart Docker service
sudo systemctl restart docker
# Check container logs
docker logs wg-easy- WG-Easy Logs:
docker logs wg-easy - Nginx Logs:
/var/log/nginx/error.log - Certbot Logs:
/var/log/letsencrypt/letsencrypt.log
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
git clone https://github.com/deathline94/wg-easy-installer.git
cd wg-easy-installer
# Make your changes and testThis project is licensed under the MIT License - see the LICENSE file for details.
- WG-Easy Project - The amazing WireGuard web interface this installer is built around
- WireGuard - The revolutionary VPN technology
- Community Contributors - Thank you for your feedback and contributions!
If you find this project useful, please consider:
- β Starring the repository
- π Reporting bugs and issues
- π‘ Suggesting new features
- π€ Contributing code improvements
Made with β€οΈ by @deathline94
π Secure β’ Simple β’ Professional