Skip to content

About

The easiest way to run WireGuard VPN + Web-based Admin UI.

Resources

Stars

15 stars

Watchers

0 watching

Forks

Β 
Β 

Latest commit

Β 

History

1,242 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”’ WG-Easy Installer

The easiest way to run WireGuard VPN + Web-based Admin UI

License: MIT Shell Script GitHub stars

πŸš€ One-line installation β€’ πŸ” SSL support β€’ πŸ‘₯ User management β€’ ⏰ Client expiry


πŸ“– About

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.

✨ Key Features

  • πŸš€ 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

πŸš€ Quick Start

One-Line Installation

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.

What Happens During Installation?

  1. Dependency Check - Installs required packages (Docker, Nginx, Certbot, etc.)
  2. Configuration - Prompts for wg-easy image tag, domain, and ports
  3. SSL Setup - Automatically configures SSL certificates if domain provided
  4. WireGuard Deployment - Sets up containerized WireGuard with Docker Compose
  5. User Management - Configures client expiry system with cron jobs

πŸ› οΈ Configuration Options

Tested Versions

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.

Basic Setup (HTTP)

  • Domain: Leave blank for IP-based access
  • Web UI Port: Default 51821 (customizable)
  • WireGuard Port: Default 51820 (customizable)
  • Access: http://YOUR_IP:UI_PORT

Professional Setup (HTTPS)

  • 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=true in wg-easy so it can securely run behind the local Nginx proxy.
  • Access: https://vpn.example.com:UI_PORT

πŸ“‹ Management Interface

Once installed, run the script again to access the management menu:

Main Menu Options

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

User Management Features

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

πŸ”§ Advanced Features

Automatic Client Expiry

  • Daily Checks: Automated cron job removes expired clients
  • Flexible Management: Set, remove, or extend expiry dates
  • Zero Downtime: Automatic service restart after changes

SSL Configuration

  • 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

Docker Integration

  • Containerized: Isolated and secure deployment
  • IPv6 Support: Full dual-stack networking
  • Resource Management: Optimized container configuration
  • Easy Updates: Simple container version management

🎭 AmneziaWG Support (Anti-DPI)

  • 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.

🌐 Accessing Your VPN

Web Interface

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!

Adding Clients

  1. Open the web interface
  2. Click "Add Client"
  3. Download the configuration file
  4. Import into your WireGuard client

Supported Clients

  • Mobile: iOS, Android
  • Desktop: Windows, macOS, Linux
  • Router: pfSense, OPNsense, OpenWrt

πŸ”’ Security Considerations

Firewall Requirements

Ensure these ports are open:

# WireGuard traffic
sudo ufw allow [WG_PORT]/udp

# Web interface
sudo ufw allow [UI_PORT]/tcp

Best Practices

  • 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

πŸ“Š System Requirements

Minimum Requirements

  • OS: Ubuntu 18.04+ / Debian 9+ / CentOS 7+
  • RAM: 512MB
  • Storage: 1GB free space
  • Network: Public IP address

Recommended Setup

  • OS: Ubuntu 22.04 LTS
  • RAM: 1GB+
  • CPU: 1 vCPU
  • Storage: 5GB+ SSD

πŸ› οΈ Troubleshooting

Common Issues

Port Already in Use

# Check what's using the port
sudo netstat -tlnp | grep :51821

# Kill the process if needed
sudo kill -9 [PID]

SSL Certificate Issues

# Check certificate status
sudo certbot certificates

# Renew certificates manually
sudo certbot renew

Docker Issues

# Restart Docker service
sudo systemctl restart docker

# Check container logs
docker logs wg-easy

Log Locations

  • WG-Easy Logs: docker logs wg-easy
  • Nginx Logs: /var/log/nginx/error.log
  • Certbot Logs: /var/log/letsencrypt/letsencrypt.log

🀝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

git clone https://github.com/deathline94/wg-easy-installer.git
cd wg-easy-installer
# Make your changes and test

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • 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!

⭐ Support the Project

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

About

The easiest way to run WireGuard VPN + Web-based Admin UI.

Resources

Stars

15 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages