3X-UI Panel Setup Guide: Every Protocol Explained Step by Step

15 min read
Intermediate3X-UIXrayVLESSCDN

Prerequisites

  • A fresh VPS running Ubuntu or Debian
  • A registered domain name (required for CDN sections)
  • Basic familiarity with SSH and the Linux terminal

This guide walks through every protocol supported by the 3X-UI panel — from basic VLESS to advanced CDN-routed configurations. Each section is self-contained: pick the protocols you need, skip the ones you don't.

Table of Contents

  1. Prerequisites & Installation
  2. VLESS + WebSocket (Port 443)
  3. VMess + TCP on High Port
  4. Shadowsocks (Port 8388)
  5. VLESS + Reality + XTLS-Vision (Port 8443)
  6. Trojan + TCP on High Port
  7. VLESS + WebSocket + CDN (Cloudflare & AWS)
  8. Subscription Server
  9. Log Rotation
  10. Quick Reference & Testing Order

Prerequisites & Installation

Before configuring any protocols, install the 3X-UI panel on your VPS.

Install 3X-UI

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

After installation:

  • Panel URL: http://YOUR_SERVER_IP:2053
  • Default login: admin / admin

Change your credentials immediately after the first login.


1. VLESS + WebSocket (Port 443)

This is the most basic configuration. WebSocket transport makes it compatible with CDN routing later.

Panel Settings

Navigate to Inbound List → Add Inbound and configure:

FieldValue
RemarkVLESS-WS
Protocolvless
Port443

Client: Email=user1, UUID=auto, Flow=empty. Transport: Network=ws, Path=/. Security: None, Sniffing=Enabled.

Why: Straightforward setup. WebSocket gives CDN compatibility later.


2. VMess + TCP on High Port

Panel Settings

FieldValue
RemarkVMess-TCP
Protocolvmess
Port10410-10417

Client: Email=user1-vmess, UUID=same, AlterID=0. Transport: Network=tcp, Header=none. Security: None, Sniffing=Enabled.

Why: High ports get less DPI scrutiny. VMess has built-in encryption.


3. Shadowsocks (Port 8388)

Panel Settings

FieldValue
RemarkShadowsocks
Protocolshadowsocks
Port8388
Encryption2022-blake3-aes-128-gcm

Important Notes on Shadowsocks 2022

The 2022-blake3 cipher requires a base64-encoded 16-byte key:

openssl rand -base64 16

4. VLESS + Reality + XTLS-Vision (Port 8443)

Reality is the most advanced stealth protocol.

Step 1: Generate x25519 Keypair

/usr/local/x-ui/bin/xray-linux-amd64 x25519

Step 2: Generate a Short ID

openssl rand -hex 8

Step 3: Add Inbound in Panel

FieldValue
Protocolvless
Port8443
Flowxtls-rprx-vision
Securityreality
Destyahoo.com:443
SNIyahoo.com, www.yahoo.com
Fingerprintchrome

Why: Reality makes TLS indistinguishable from a genuine connection to yahoo.com.

vless://UUID@IP:8443?type=tcp&security=reality&pbk=PUBLIC_KEY&fp=chrome&sni=yahoo.com&sid=SHORT_ID&spx=/&flow=xtls-rprx-vision&encryption=none#Name

5. Trojan + TCP on High Port (No TLS)

Panel Settings

FieldValue
Protocoltrojan
Port10420-10427
SecurityNone

Why: Trojan serves as fallback when VLESS/VMess are blocked.


6. VLESS + WebSocket + CDN

The most resilient configuration. Traffic flows through a CDN — filters only see CDN IPs. Your server IP stays hidden.

6-A: Cloudflare Setup

Add domain to Cloudflare, create DNS A record with orange cloud ON, set SSL mode (Flexible for HTTP ports, Full for HTTPS ports), disable Security Level, enable WebSockets.

6-B: AWS CloudFront Setup

Create distribution with origin=your server, HTTP only, port 443, caching disabled, AllViewer request policy.

6-C: X-UI Inbound Settings for CDN

HTTP ports (2082, 8880): VLESS-WS, Security=None, Host header=your CDN domain.

HTTPS ports (2083, 2087): VLESS-WS, Security=TLS with cert/key files.

6-D: CDN Troubleshooting

525 SSL Error → SSL mode mismatch. 403 Forbidden → WAF blocking. Timeout → check port, WebSocket, orange cloud, Host header.


7. Subscription Server

apt install nginx -y

Create /etc/nginx/sites-available/subscription with raw and base64 endpoints on port 8080.


8. Log Rotation

sed -i 's/#SystemMaxUse=.*/SystemMaxUse=100M/' /etc/systemd/journald.conf
systemctl restart systemd-journald
journalctl --vacuum-size=100M

9. Quick Reference — All Ports

PortProtocolPurpose
443VLESS-WSBasic WebSocket
8388ShadowsocksSS 2022-blake3
8443VLESS-RealityStealth TLS
10410-10417VMess-TCPHigh port VMess
10420-10427Trojan-TCPHigh port Trojan
2082, 8880VLESS-WS-CDNCloudflare HTTP
2083, 2087VLESS-WS-CDN-TLSCloudflare HTTPS
20533X-UI PanelManagement
8080NginxSubscription

10. Recommended Testing Order

  1. CDN configs (2082/8880 or 2083/2087) — Most reliable
  2. Reality (8443) — Looks like real TLS
  3. Trojan/VMess on high ports — Less DPI scrutiny
  4. Shadowsocks (8388) — Good fallback
  5. VLESS-WS on 443 — May be filtered