How to Install 3X-UI VPN on Ubuntu 25.04
3X‑UI is a web‑based control panel that installs XRay‑core (the community fork of V2Ray) on your Ubuntu server and lets you manage VMess, VLESS, Trojan, Shadowsocks and other proxy/VPN protocols from a browser.
Update Your System
Before installing 3X-UI, it’s important to ensure that all existing packages on your system are up to date. Run the following command:
apt update && apt upgrade -y
Install Necessary Dependencies
You will need certain dependencies, such as curl
and unzip
, for the installation process. Install them using the command:
apt install curl unzip -y
Download and Install 3X-UI
To install 3X-UI, use the official installation script provided by its developers. Run the following command:
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
During the installation process, the script will prompt you to decide whether you want to customize the port settings. You can respond with 'Y' if you wish to configure the panel port or 'N' to accept the default settings. If you choose to customize the port, you'll have toto enter the desired port number for accessing the 3X-UI panel.
After this step, the script will automatically generate a username and password for accessing the panel, which will be displayed on the screen along with the panel's base URI.
For example:
/usr/bin/x-ui 100%[====================================================================================================>] 62.79K --.-KB/s in 0.001s
2025-04-24 18:58:13 (65.0 MB/s) - ‘/usr/bin/x-ui’ saved [64294/64294]
Would you like to customize the Panel Port settings? (If not, a random port will be applied) [y/n]: y
Please set up the panel port: 15885
Your Panel Port is: 15885
Port set successfully: 15885
Username and password updated successfully
Base URI path set successfully
This is a fresh installation, generating random login info for security concerns:
###############################################
Username: TCTGf0JXhf
Password: DHBIbrYSvM
Port: 15885
WebBasePath: tq5fGUpOYUJTFBh
Access URL: http://2.58.14.2:15885/tq5fGUpOYUJTFBh
###############################################
If you forgot your login info, you can type 'x-ui settings' to check
Start migrating database...
Migration done!
Created symlink '/etc/systemd/system/multi-user.target.wants/x-ui.service' → '/etc/systemd/system/x-ui.service'.
x-ui v2.5.7 installation finished, it is running now...
┌───────────────────────────────────────────────────────┐
│ x-ui control menu usages (subcommands): │
│ │
│ x-ui - Admin Management Script │
│ x-ui start - Start │
│ x-ui stop - Stop │
│ x-ui restart - Restart │
│ x-ui status - Current Status │
│ x-ui settings - Current Settings │
│ x-ui enable - Enable Autostart on OS Startup │
│ x-ui disable - Disable Autostart on OS Startup │
│ x-ui log - Check logs │
│ x-ui banlog - Check Fail2ban ban logs │
│ x-ui update - Update │
│ x-ui legacy - legacy version │
│ x-ui install - Install │
│ x-ui uninstall - Uninstall │
-----------------------------------------------------------------
Make sure to securely store the Username, Password, Port, and WebBasePath, as you will need these details to access the panel.
Start and Enable the 3X-UI Service
Once the installation is complete, you need to start and enable the 3X-UI service so that it runs in the background. Use the following commands:
systemctl start x-ui
systemctl enable x-ui
Access the 3X-UI Web Interface
You can access the 3X-UI VPN management interface through your web browser by visiting the following URL:
http://2.58.14.2:15885/tq5fGUpOYUJTFBh
Note: Replace your_server_ip, 15885 and WebBasePath with actual IP Address and Port and WebBasePath which have been provided during the installation.
Login Page
After navigating to the URL, you will be prompted with the login page. Use the default username and password provided during the installation.
Once logged in, you will be taken to the 3X-UI dashboard, where you can manage your VPN settings and users.
Upon accessing the 3X-UI interface, after logged in with the default credentials. Make sure to change the default username and password immediately for security purposes.
Done, You have successfully installed and set up 3X-UI VPN on Ubuntu 25.04. You can now manage your VPN services through the web interface, making the entire process more streamlined and user-friendly.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS