A complete multi-server VPN solution with web management panel and subscription service.
- 🌍 Multi-server support (easily add new locations)
- 🔒 VLESS protocol with TCP
- 🎛️ Web-based management panel (X-UI)
- 📱 Subscription service for easy client setup
- 🔄 Automatic SSL certificates with Let's Encrypt
- 📊 Traffic monitoring and user management
┌─────────────────┐ ┌─────────────────┐
│ Client Device │ │ Client Device │
│ (iOS/Android) │ │ (Windows/Mac) │
└────────┬────────┘ └────────┬────────┘
│ │
└──────────┬─────────────────┘
│
┌───────────▼───────────┐
│ Subscription URL │
│ sub.yourdomain.com │
└───────────┬───────────┘
│
┌──────────────┴──────────────┐
│ │
┌────▼─────┐ ┌────────▼────┐
│ Finland │ │ Bahrain │
│ Server │ │ Server │
│ :8443 │ │ :8443 │
└──────────┘ └─────────────┘
- Ubuntu 22.04 servers
- Domain name with DNS management access
- Basic Linux knowledge
- Clone this repository:
git clone https://github.com/yourusername/multi-vpn-server.git
cd multi-vpn-server- Run the installation script:
sudo ./install.sh- Follow the prompts to:
- Set your domain name
- Configure server locations
- Set admin credentials
multi-vpn-server/
├── install.sh # Main installation script
├── docker-compose.yml # Docker setup (optional)
├── scripts/
│ ├── install-x-ui.sh # X-UI installation
│ ├── setup-nginx.sh # Nginx configuration
│ ├── setup-ssl.sh # SSL certificate setup
│ └── add-server.sh # Add new VPN server
├── configs/
│ ├── nginx/ # Nginx templates
│ ├── systemd/ # Service files
│ └── x-ui/ # X-UI configurations
├── subscription/
│ ├── simple-sub.py # Subscription service
│ ├── requirements.txt # Python dependencies
│ └── templates/ # Response templates
└── docs/
├── SETUP.md # Detailed setup guide
├── CLIENT.md # Client configuration
└── TROUBLESHOOTING.md # Common issues
Create a .env file:
# Domain Configuration
MAIN_DOMAIN=yourdomain.com
PANEL_SUBDOMAIN=panel
SUB_SUBDOMAIN=sub
# Server Locations
SERVERS=finland:IP1,bahrain:IP2
# Ports
VPN_PORT=8443
PANEL_PORT=54321
SUB_PORT=5556
# Admin Credentials
ADMIN_USER=admin
ADMIN_PASS=secure_password./scripts/add-server.sh --name "Germany" --ip "1.2.3.4" --port 8443- Install Shadowrocket from App Store
- Add subscription URL:
https://sub.yourdomain.com/sub/username - Update and connect
- Install v2rayNG from Google Play
- Add subscription URL
- Update and connect
- Download v2rayN
- Add subscription URL
- Update and connect
- Finland:
https://panel.yourdomain.com/finland/ - Bahrain:
https://panel.yourdomain.com/bahrain/
# Check service status
systemctl status x-ui
systemctl status simple-sub
# View logs
journalctl -u x-ui -f
journalctl -u simple-sub -f
# Restart services
systemctl restart x-ui
systemctl restart simple-sub- All traffic encrypted with VLESS protocol
- SSL/TLS certificates auto-renewed
- Web panel protected with authentication
- Regular security updates recommended
# Backup configuration and database
./scripts/backup.sh
# Restore from backup
./scripts/restore.sh backup-2024-01-01.tar.gzPull requests are welcome! Please read CONTRIBUTING.md first.
MIT License - see LICENSE file
- Issues: GitHub Issues
- Documentation: Wiki