Generate & Use Client Config
0. On server, your client config is automatically generated at: /root/client.json
1. Copy /root/client.json to your local machine.
2. Run:
xray -c client.json
3. Use local proxies:
- SOCKS5:
127.0.0.1:10808 - HTTP proxy:
127.0.0.1:10809
Ports
- Server listening:
443/tcp(VLESS + REALITY) - Client SOCKS proxy:
127.0.0.1:10808 - Client HTTP proxy:
127.0.0.1:10809
Key Files & Locations
- Systemd service:
/etc/systemd/system/xray.service - Binary:
/usr/local/bin/xray - Server config:
/usr/local/etc/xray/config.json - Client config:
/root/client.json - VLESS URL:
/root/client.vless - Geo data:
/usr/local/share/xray/{geoip.dat, geosite.dat} - Logs:
/var/log/xray/{access.log, error.log} - REALITY keys:
/root/.keys
Manage Xray Service
# Start / Stop / Restart / Status
systemctl start xray
systemctl stop xray
systemctl restart xray
systemctl status xray
Notes
- This setup primarily installs and configures Xray-core (server-side).
- The provided client config is a baseline configuration and may not work in all networks or restricted environments.
- Config may require tweaks if you are in censored or restrictive networks.
- After making any configuration changes (server or client), always restart Xray:
systemctl restart xray