This note records a minimal Xray Reality / VLESS setup.
The example values are fake but shaped like real values, so the config is easier to read than a wall of placeholders.
Example environment:
- server:
vpn.example.com - listen port:
443 - client UUID:
11111111-2222-4333-8444-555555555555 - Reality private key:
example_private_key_do_not_use - Reality public key:
example_public_key_do_not_use - Reality short id:
a1b2c3d4e5f60708 - camouflage target:
www.microsoft.com:443
Replace all of them.
Service Commands
Check the service:
sudo systemctl status xraysudo journalctl -u xray -e --no-pagerAfter editing the config, test it before restart:
sudo xray run -test -config /usr/local/etc/xray/config.jsonsudo systemctl restart xrayGenerate IDs And Keys
xray uuidxray x25519openssl rand -hex 8Keep the private key on the server. Put the public key in the client config.
Server Config Example
{ "inbounds": [ { "listen": "0.0.0.0", "port": 443, "protocol": "vless", "settings": { "clients": [ { "id": "11111111-2222-4333-8444-555555555555", "flow": "xtls-rprx-vision" } ], "decryption": "none" }, "streamSettings": { "network": "tcp", "security": "reality", "realitySettings": { "show": false, "dest": "www.microsoft.com:443", "xver": 0, "serverNames": ["www.microsoft.com"], "privateKey": "example_private_key_do_not_use", "shortIds": ["a1b2c3d4e5f60708"] } } } ], "outbounds": [ { "protocol": "freedom" } ]}Firewall
Only the public entry port needs to be open:
sudo nft add rule inet filter input tcp dport 443 acceptIf SSH uses a custom port such as 22222, keep that rule separate and preferably source-restricted.
Client-Side Fields
A client profile usually needs:
address: vpn.example.comport: 443uuid: 11111111-2222-4333-8444-555555555555flow: xtls-rprx-visionsecurity: realitysni: www.microsoft.compublicKey: example_public_key_do_not_useshortId: a1b2c3d4e5f60708Notes
privateKey, UUID, and short id are secrets. Do not publish real values.- Time sync matters. If the client and server clocks are too far apart, debugging becomes confusing.
- Start with a direct connection first. Add extra reverse proxies only after the base config works.