On this page
What you need
- A VPS with Linux: Ubuntu, Debian, Fedora, CentOS, Rocky, AlmaLinux or Arch Linux.
- SSH access: the server address, the root login and a password.
- A free port 443 over TCP. If it is taken, another one will do, say 8443.
- The address of a real website: the connection will look like a visit to it.
How to install it by hand
Below is the setup on Ubuntu or Debian as root. The server program is Xray from the XTLS project: it has both VLESS and Reality.
- 1
Install Xray
The official script installs Xray and the xray service. Command:
On the serverbash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ installIf there is no curl, first run:
On the serverapt update && apt install -y curl - 2
Create a UUID
Command:
xray uuid. This is the device ID. It is best to give each device its own. - 3
Create the Reality keys
Command:
xray x25519. ThePrivateKeyline is the private key; it stays on the server. The Password (PublicKey) line is the public key; it goes into the link. Older Xray versions print Private key and Public key. - 4
Make a short ID
Command:
openssl rand -hex 8. You get 16 characters from 0–9 and a–f. - 5
Pick the website to look like
You need a real website with TLS 1.3 that opens from the server. You don't need a domain of your own. Check:
xray tls ping site-address. The answer should say TLS 1.3. - 6
Write the settings
File:
/usr/local/etc/xray/config.json. A sample is in the next section. To check the file without starting:On the serverxray run -test -config /usr/local/etc/xray/config.json - 7
Open the port
If ufw is on on the server:
ufw allow 443/tcp. If the host has a firewall in its dashboard, open 443 over TCP there too. - 8
Restart the service
Command:
systemctl restart xray. To start it after a reboot:systemctl enable xray. Check:systemctl status xrayshould sayactive (running). Errors show injournalctl -u xray. - 9
Build the link
The address, port, UUID, public key, website and short ID come together in one
vless://link. How to build it is below.
The settings file
This is a minimal config.json for VLESS Reality on port 443. Replace the words in capitals: UUID from xray uuid, PRIVATE_KEY — the PrivateKey line from xray x25519, SHORT_ID from openssl, SITE — the address of the website to look like.
{
"inbounds": [
{
"port": 443,
"protocol": "vless",
"settings": {
"clients": [
{"id": "UUID", "flow": "xtls-rprx-vision"}
],
"decryption": "none"
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"dest": "SITE:443",
"serverNames": ["SITE"],
"privateKey": "PRIVATE_KEY",
"shortIds": ["SHORT_ID"]
}
}
}
],
"outbounds": [
{"protocol": "freedom"}
]
}A new device is a new entry in clients: its own UUID and the same flow. After editing, restart the service.
What the Reality settings mean
dest— the website and port the server sends anyone who comes without the key to. A prober sees the real website. Newer Xray versions also accept the name target for this field.serverNames— the site names a client may come with (SNI). Usually just one — the same site as indest.privateKey— the server's private key. Never show it to anyone. The link gets the public key from the same pair.shortIds— a list of short IDs. The client sends one of them. Up to 16 characters from 0–9 and a–f, an even number of them.- flow
xtls-rprx-vision— the VLESS mode for TCP with Reality. The link must have the same flow, or the server won't let the client in.
The link for the client
The link looks like this: vless://UUID@IP:443?parameters#name. IP is the server address; the name after # is just the profile label. The parameters are joined with &:
encryption=noneflow=xtls-rprx-visionsecurity=realitytype=tcpsni=SITE— the same site as inserverNamespbk=PUBLIC_KEY— the public key fromxray x25519sid=SHORT_ID— one of theshortIdsfp=chrome— which browser the client poses as
A QR code for a phone
Install qrencode: apt install -y qrencode. Then: qrencode -t ansiutf8 'link'. The code appears right in the terminal, and the phone client scans it.
Why Reality
Of the third-party protocols, VLESS Reality works best where ordinary VPNs get cut: to your ISP it is an ordinary secure website.
One detail: Reality doesn't need TLS fragmentation in the client. It breaks its handshake.