TürkiyeVPS

VLESS Reality Setup with 3x-ui on a VPS, Step by Step

Install the 3x-ui panel on an Ubuntu 24.04 VPS, create a VLESS + Reality (XTLS Vision) inbound, lock the panel down and add the connection to your phone, step by step.

6 min read

In this guide we take a clean Ubuntu 24.04 VPS, install the 3x-ui panel and create a VLESS + Reality + XTLS Vision connection. If you know a little Linux, it takes 15-20 minutes. At the end you will have a vless:// link and a QR code for your phone.

Honest note: you do not have to do this by hand. On our VLESS VPS every step below (3x-ui install, Reality keys, panel closed to the internet, firewall) is done automatically a few minutes after your payment is confirmed, and the link and QR code appear in your client area. The monthly price is the same as a normal VPS, with only a one-time 0.50 USD setup fee on the first invoice. If you want to understand how it works, read on.

New to VLESS and Reality? Start with what is VLESS.

What you need

  • A VPS with Ubuntu 24.04 (or Debian 12). 1 vCPU and 512 MB RAM are enough for a few users.
  • Root access and SSH. New to SSH? See what is SSH and how to connect.
  • A port reachable from the internet. On a server with its own IPv4 you use 443.

NAT VPS warning: on a shared-IP (NAT) VPS only your own SSH port is reachable from outside; no other port is forwarded to a VLESS you install by hand. In that case either add a dedicated IPv4 for 1.88 USD per month, or choose the "Ubuntu 24.04 + VLESS" system when ordering: with that system a port reserved for VLESS (30000 + your service number) is opened automatically.

1. Update the server

apt update && apt -y upgrade
apt -y install curl ufw
timedatectl

A wrong clock causes connection problems; timedatectl should show "System clock synchronized: yes".

2. Install 3x-ui

3x-ui is the MHSanaei/3x-ui project on GitHub. Run the install script from the official repository:

bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)

The script installs the Xray core and the panel, and at the end prints the panel port, a random web base path, the username and the password. Save them somewhere safe. To see them later, run x-ui and use the menu option that shows the current settings.

Running a script from the internet as root is always a matter of trust: copy the command only from the official repository, or download it first with curl -Ls … -o install.sh and read it.

3. Log in safely (SSH tunnel)

Instead of exposing the panel to the internet, reach it through an SSH tunnel. On your own computer:

ssh -p SSH_PORT -L 2053:127.0.0.1:PANEL_PORT root@SERVER_IP

While the tunnel is open, open http://127.0.0.1:2053/WEB_BASE_PATH/ in your browser and log in. Then, in Panel Settings, set the listen IP to 127.0.0.1 so the panel is invisible from outside, and change the password.

4. Create the VLESS + Reality inbound

In the panel go to Inbounds → Add Inbound:

Field Value
Protocol vless
Port 443 (with a dedicated IP) or the port opened for you
Transmission TCP (RAW)
Security Reality
uTLS chrome
Target / Dest a large site with TLS 1.3, in the form domain.com:443
SNI the same domain as Target
Keys click "Get New Cert" to generate a new private / public key
Short IDs keep the generated value

In the same window, under Client, set the client's Flow to xtls-rprx-vision. Creating a separate client (separate UUID) for each person makes it easy to see who uses how much traffic and to disable one person when needed.

For Target, choose a popular site that supports TLS 1.3 / HTTP/2, not your own domain. The idea of Reality is that connections without the right key go to that real site.

5. Open the firewall

ufw allow OpenSSH
ufw allow 443/tcp
ufw enable
ufw status

If you used another port instead of 443, open that one. Do not open the panel port; you reach the panel through the SSH tunnel anyway. For more hardening see our Linux server security guide.

6. Add the link or QR code to your device

In the Inbounds list, open the menu next to the inbound and get the client's QR code or link. The link starts with vless://. On your phone, scan the QR code or import the link from the clipboard in an app such as v2rayNG, Hiddify or Streisand. App comparison and import steps: the best V2Ray / VLESS client apps.

Common errors

  • Connects but no internet: the Flow in the client and on the server may differ; both must be xtls-rprx-vision.
  • Does not connect at all: check that the port is open in the firewall and, on a NAT VPS, that it is really forwarded to your server. ss -tlnp | grep xray shows whether Xray is listening.
  • Drops now and then: the Target site may be slow or unreachable; try another site.
  • Panel does not open: the SSH tunnel may have closed; run the tunnel command again.

The easier way

Doing all this by hand is educational but takes time. With a VLESS VPS, Xray and 3x-ui are installed from the official release with checksum verification, the panel runs only inside the server with a random path, username and password, and the firewall only allows SSH and the VLESS port. VPS plans start at 0.93 USD per month; you pay with USDT (TRC20) or LTC. Want to measure latency first? Ask in live chat for a free 2-hour test server (it is a plain VPS without VLESS).

Frequently Asked Questions

Should the 3x-ui panel be open to the internet?

No. Let the panel listen only on 127.0.0.1 and reach it through an SSH tunnel; do not open the panel port in the firewall.

Can I install 3x-ui on a NAT VPS?

You can, but on a shared-IP VPS only your SSH port is reachable from outside. To connect to VLESS from outside, add a dedicated IPv4 or choose the VLESS system when ordering; with that system a VLESS port reserved for you is opened automatically.

What if I break the setup?

You can reinstall the server from the client area. On a VLESS VPS a reinstall prepares Xray, 3x-ui and the connection again automatically.

Use it lawfully

You manage the server. Use it in line with the laws of your country and our terms of service. Spam, attacks, port scanning and illegal content are forbidden; outgoing port 25 is closed.