Back to blog

How to Set Up VLESS with Reality on a VPS (Step by Step)

October 11, 2026 3 min read

VLESS with Reality is built to look like an ordinary HTTPS visit to a real website, which is why it survives networks that block other VPN protocols. This guide sets one up on a VPS, by hand first and then the automatic way. For how it works under the hood, see what VLESS and Reality are.

Before you start

  • A VPS running Ubuntu or Debian, with root access over SSH. The smallest plan is enough.
  • Port 443 must be free. Reality listens on it, so a web server already using 443 on this machine will conflict.
  • A client app on your device. The setup guide lists one per platform.

Pick a cover site

Reality borrows a real website's TLS handshake, so you choose which site to imitate. The site you pick should:

  • support TLS 1.3 and HTTP/2,
  • be reachable from your server,
  • be a normal, popular, unrelated site (not one you run).

You'll use its domain in two places in the config below, written here as <cover-site>.

Route 1: by hand

1. Install Xray

bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install

This installs Xray and a systemd service. The config lives at /usr/local/etc/xray/config.json.

2. Generate the three secrets

xray uuid
xray x25519
openssl rand -hex 8
  • xray uuid is the client's ID.
  • xray x25519 prints a private and public key. Output labels vary a little between Xray versions. The private key goes in the server config, and the matching public key goes to clients.
  • openssl rand -hex 8 is the short ID.

3. Write the server config

{
  "log": { "loglevel": "warning" },
  "inbounds": [
    {
      "listen": "0.0.0.0",
      "port": 443,
      "protocol": "vless",
      "settings": {
        "clients": [
          { "id": "<uuid>", "flow": "xtls-rprx-vision" }
        ],
        "decryption": "none"
      },
      "streamSettings": {
        "network": "tcp",
        "security": "reality",
        "realitySettings": {
          "dest": "<cover-site>:443",
          "serverNames": ["<cover-site>"],
          "privateKey": "<private-key>",
          "shortIds": ["<short-id>"]
        }
      }
    }
  ],
  "outbounds": [
    { "protocol": "freedom", "tag": "direct" }
  ]
}

4. Test, start, and open the port

xray run -test -config /usr/local/etc/xray/config.json
sudo systemctl enable --now xray
sudo ufw allow 443/tcp

If you use a firewall in your provider's control panel, allow TCP 443 there too. More in firewall basics for your VPS.

5. Build the client link

Most clients import a single vless:// link:

vless://<uuid>@<server-ip>:443?encryption=none&flow=xtls-rprx-vision&security=reality&sni=<cover-site>&fp=chrome&pbk=<public-key>&sid=<short-id>&type=tcp#my-vpn

Paste it into your client's "import from clipboard" option, or turn it into a QR code.

Route 2: with Nullsify

The manual route works, but every extra device means another client entry, another link, and another edit to that file. Nullsify does the same thing for you:

  1. In your dashboard click Add Server, enter the server's address and login, and choose VLESS.
  2. Pick a configuration:
    • TCP + Reality + Vision, recommended for most servers.
    • TCP + Reality, a good general-purpose option.
    • gRPC + Reality, for when the others get blocked.
  3. Nullsify installs Xray, generates the UUID, keys and short ID, and applies the config.
  4. Click Get Config on the server to copy the import string or scan the QR code.

Your login is used once for the install and isn't stored (see the security page). The free plan covers up to 5 servers.

Connect a device

Each device should get its own client entry. Step-by-step guides:

If it won't connect

  • The flow doesn't match. If the server uses xtls-rprx-vision, the client must use it too.
  • The keys don't match. The client needs the public key that pairs with the server's private key.
  • The cover site doesn't match. sni on the client must equal an entry in serverNames on the server.
  • Port 443 is taken or blocked. Check that nothing else is listening on it, and that the firewall allows TCP 443.
  • Your network blocks it anyway. Try the gRPC preset, or compare the options in WireGuard vs VLESS vs AmneziaWG.

Once it's connected, run a leak test to make sure your lookups aren't escaping the tunnel. If you're new to the whole process, how to make your own VPN covers the full path from renting a server onward.

Ready to run your own VPN?

Bring your own VPS and have VLESS, AmneziaWG, or WireGuard running in minutes — no manual setup required.