How to Install 3X-UI VPN on Ubuntu 25.10
3X-UI is a user-friendly VPN management panel for managing and configuring VPN servers. It provides an intuitive web interface that simplifies VPN setup, configuration, and monitoring. This guide will walk you through the process of installing 3X-UI VPN on Ubuntu 25.10.
Update Your System
Before installing 3X-UI, 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 to 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/local/x-ui-lin 100%[===================>] 61.42M 94.4MB/s in 0.7s
2025-10-15 15:06:57 (94.4 MB/s) - ‘/usr/local/x-ui-linux-amd64.tar.gz’ saved [64402773/64402773]
--2025-10-15 15:06:57-- https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 69082 (67K) [text/plain]
Saving to: ‘/usr/bin/x-ui-temp’
/usr/bin/x-ui-temp 100%[===================>] 67.46K --.-KB/s in 0.002s
2025-10-15 15:06:57 (27.0 MB/s) - ‘/usr/bin/x-ui-temp’ saved [69082/69082]
x-ui/
x-ui/x-ui
x-ui/x-ui.sh
x-ui/x-ui.service
x-ui/bin/
x-ui/bin/geoip_IR.dat
x-ui/bin/LICENSE
x-ui/bin/geoip.dat
x-ui/bin/geoip_RU.dat
x-ui/bin/geosite.dat
x-ui/bin/README.md
x-ui/bin/geosite_RU.dat
x-ui/bin/geosite_IR.dat
x-ui/bin/xray-linux-amd64
Would you like to customize the Panel Port settings? (If not, a random port will be applied) [y/n]: Generated random port: 52126
Port set successfully: 52126
This is a fresh installation, generating random login info for security concerns:
###############################################
Username:
Password:
Port: 52126
WebBasePath:
Access URL: http://2.58.14.2:52126/
###############################################
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.8.5 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, 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://your_server_ip:52126/
Note: Replace your_server_ip, Port, and WebBasePath with the actual values provided during installation.
Login Page
After navigating to the URL, you will be prompted with the login page. Use the username and password displayed during the installation.

Once logged in, you will be taken to the 3X-UI dashboard, where you can manage your VPN settings and users.

After accessing the 3X-UI interface and logging 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.10.
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