Automated one-liner installer for 3X-UI panel with Docker, Caddy reverse proxy, smart firewall, and network optimization.
- π³ Docker & Docker Compose - Automatic installation and configuration
- π Caddy Reverse Proxy - HTTPS with automatic SSL certificates
- π‘οΈ Smart Firewall (UFW) - Auto-detects and opens required ports
- β‘ Network Optimization - BBR congestion control for 20-30x faster speeds
- π― Smart Port Detection - Never locks you out of SSH
- π§ Automatic Configuration - 3X-UI panel ready to use
- π Multiple Installations - Support for multiple 3X-UI instances
bash <(curl -Ls https://raw.githubusercontent.com/YerdosNar/3x-ui-auto/master/install.sh)bash <(curl -Ls https://raw.githubusercontent.com/YerdosNar/3x-ui-auto/master/modular/install.sh)bash <(curl -Ls https://raw.githubusercontent.com/YerdosNar/3x-ui-auto/master/custom_logs.sh)
β οΈ Requiressudoprivileges and Ubuntu/Debian system
- Docker & Docker Compose - Container runtime
- 3X-UI Panel - Web-based VPN/proxy management
- Caddy (Optional) - HTTPS reverse proxy with auto SSL
- UFW Firewall - Smart port management and security
- Network Optimization - BBR congestion control and TCP tuning
The installer will guide you through:
- Domain Setup - Enter your domain or use IP address
- Caddy Configuration (if domain provided)
- Admin credentials
- Route path (e.g.,
/admin) - API and backend ports
- Network Optimization - Apply BBR and TCP tuning (recommended)
- Firewall Setup - Configure UFW with smart port detection (recommended)
After installation:
| Setup Type | URL | Default Login |
|---|---|---|
| With Domain | https://yourdomain.com/admin |
Your custom credentials |
| Without Domain | http://YOUR_IP:2053 |
admin / admin |
β οΈ Change default credentials immediately if not using Caddy!
- β Auto-detects SSH port (never locks you out!)
- β Opens required ports: HTTP (80), HTTPS (443), 3X-UI (2053)
- β Configures port ranges for VPN inbounds (8380-8400, 9380-9400)
- β Enables IP forwarding for proxy functionality
- β‘ BBR Congestion Control - 20-30x faster speeds
- π¦ Fair Queue Scheduling - Reduced latency
- πΎ 64MB TCP Buffers - Better throughput
- π TCP Fast Open - Faster connections
Performance: Shadowsocks/VLESS speeds improved from 5 Mbps to 150-170 Mbps!
π Details: See Firewall & Network Guide
cd ~/3x-uiPANEL*
docker compose up -d # Start
docker compose down # Stop
docker compose restart # Restart
docker compose logs -f # View logssudo systemctl status caddy # Check status
sudo systemctl restart caddy # Restart
sudo caddy validate # Test configsudo ufw status # View rules
sudo ufw allow 9000/tcp # Open port
sudo ufw delete allow 9000 # Close portsysctl net.ipv4.tcp_congestion_control # Check BBR
sysctl net.core.default_qdisc # Check queue# Interactive - choose which installation to remove
bash <(curl -Ls https://raw.githubusercontent.com/YerdosNar/3x-ui-auto/master/uninstall.sh)
# Or specify directory number
bash <(curl -Ls https://raw.githubusercontent.com/YerdosNar/3x-ui-auto/master/uninstall.sh) -d 1bash <(curl -Ls https://raw.githubusercontent.com/YerdosNar/3x-ui-auto/master/uninstall.sh) -lπ Details: See Uninstall Guide
- π Caddyfile Management - Handle multiple domains
- π‘οΈ Firewall & Network Guide - UFW + BBR optimization
- ποΈ Uninstall Guide - Remove installations safely
- π Project Structure - Code organization
- βοΈ Setup Guide - Detailed installation steps
- π VPS Optimization Notes - Performance tuning
3x-ui-auto/
βββ one_liner.sh # Standalone installer
βββ custom_logs.sh # Installer with logging
βββ uninstall.sh # Uninstaller with smart detection
βββ modular/ # Modular installer
β βββ install.sh # Main entry point
β βββ functions/ # Function modules
β β βββ logger.sh
β β βββ docker.sh
β β βββ caddy.sh
β β βββ firewall.sh # Smart UFW management
β β βββ network_optimization.sh # BBR + TCP tuning
β β βββ ...
β βββ md_files/ # Documentation
βββ README.md # This file
- OS: Ubuntu 20.04+ or Debian 10+
- Access: Root or sudo privileges
- Network: Internet connection
- Kernel: 4.9+ (for BBR support)
newgrp docker
# Or logout and login againCheck if ports are in use:
sudo lsof -i :2053
sudo lsof -i :443Access via VPS console and run:
sudo ufw disable
# Or
sudo ufw allow 22/tcpCheck kernel version:
uname -r # Should be 4.9+For more troubleshooting, see the documentation section.
- β Use a domain for HTTPS and better security
- β Enable network optimization for 20-30x faster speeds
- β Configure firewall for security
- β Change default credentials if not using Caddy
- β
Regular backups of
~/3x-uiPANEL*/db/directory
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
Yerdos Narzhigitov π¦ GitHub: @YerdosNar
This project is released under the GPL-v3 License (Same as the 3X-UI project)
- 3X-UI Panel - Original panel
- Caddy - Reverse proxy server
- Docker - Container platform
- WhiteList - Internet Whitelist for Russian ISPs
π¬ Feedback and pull requests are welcome!