vitalygashkov/rucens/vless-vps-setup
Claude Code and agent skill by vitalygashkov/rucens
- community
Checking that the SKILL.md file is still in the repository.
Configure and verify Xray VLESS with REALITY and XTLS Vision on a Linux VPS for ordinary phone clients such as Karing and Happ. Use for a new server or an additional inbound alongside another VPN. Do not use for router TProxy setups or certificate-based VLESS behind a user-owned domain.
Install
npx vskill@latest install vitalygashkov/rucens/vless-vps-setupSKILL.md
Configure Xray VLESS REALITY
Set up a VLESS REALITY server that listens on TCP 443 and produce an importable vless:// URI. The expected clients are Karing, Happ, or another client with REALITY, XTLS Vision, and TUN support.
Keep the server setup generic. Full-tunnel mode and bypass rules for Russian sites belong in the client. Do not add country-based routing to Xray unless the user asks for it.
Commands assume a Linux distribution supported by the official Xray installer, systemd, root privileges, and Bash. Firewall commands are conditional examples. This template listens over IPv4; client IPv6 routing must be configured separately. Stop on failed installation or configuration commands.
Operating rules
- Work only on the VPS the user authorized. An existing setup request covers the necessary installation steps; do not ask again for the same authorization.
- Start with read-only checks. State which live services, ports, firewall rules, and configuration files the installation will touch.
- Do not weaken SSH, replace the firewall, remove packages, or disturb another VPN.
- Back up an existing Xray configuration before replacing it. If TCP 443 is occupied, identify the service and resolve the port choice before installation. Do not stop nginx, Caddy, or an existing inbound to free it.
- Treat the UUID, REALITY private key, client password/public key, short ID, SSH credentials, and complete client URI as secrets. Do not paste them into ordinary logs or the final narrative.
- Prefer one UUID and short ID per device. One credential can work on several devices at once, but separate credentials make revocation and diagnosis much easier.
- Never declare success based only on an open port. Validate the config, fallback behavior, and one authenticated client connection.
Required inputs
Collect or infer these values before changing the server:
- SSH host, user, and authentication method
- public IPv4 address of the VPS
- Linux distribution and architecture
- client labels, for example
phoneandtablet - whether TCP 443 is free and reachable through both the OS firewall and provider firewall
- chosen REALITY target and SNI
A domain owned by the user is not required for REALITY.
Assume the user's clients and home network are suitable for this setup. Do not ask for the Keenetic/router model, firmware version, or LAN subnet as prerequisites, including when VLESS is installed alongside AmneziaWG. The user is responsible for reporting compatibility limitations or unusual LAN addressing. Revisit these details only if the user reports a relevant limitation or troubleshooting reveals a concrete conflict.
Preflight
Run read-only checks first:
Confirm that the server has working outbound DNS, TCP 443 access, correct time, and at least a few hundred MiB of free memory. Xray itself is light, but a starved VPS is a poor place to diagnose network problems.
If another VPN is present, keep it. VLESS on TCP 443 can coexist with WireGuard or AmneziaWG on a UDP port. Check the actual listeners rather than assuming there is no conflict.
Select and validate the REALITY target
Do not choose a random famous website. Failed REALITY authentication is forwarded to the configured target. A bad target can make the VPS useful as an unwanted forwarding node or create an obvious mismatch between the VPS location and the borrowed TLS endpoint.
Prefer a stable HTTPS endpoint that:
- is reachable directly from the VPS;
- supports TLS 1.3;
- accepts the selected SNI and returns a certificate whose SAN covers it;
- behaves consistently with and without SNI;
- is not an arbitrary free CDN endpoint;
- is geographically and operationally plausible for the VPS;
- has a certificate chain large enough for the REALITY features in use.
The official Xray guidance prefers a target in the same ASN where practical. Do not add fallback rate limiting by reflex. Xray documents that rate limiting can itself become a fingerprint. Consider it only after reviewing the current REALITY documentation and the abuse risk of the selected target.
Select the target for this VPS and probe it immediately before configuring REALITY. Replace these placeholders with the chosen hostnames:
Check each probe's exit status and negotiated TLS details. After Xray is available, also run xray tls ping -ip "$target_ip" "$server_name". Reject a target with certificate failures, unstable TLS behavior, or forwarding-abuse concerns. Record the chosen target and SNI.
Install or reuse Xray
If Xray is already installed, inspect xray version and systemctl cat xray first. Reuse a compatible installation. Adding an inbound does not require upgrading the binary or replacing the service unit. Preserve existing inbounds, outbounds, and routing; give the new inbound a unique tag and route it to the intended outbound. Upgrade only when required and authorized, with a rollback plan for both binary and configuration.
For a fresh installation, select a stable version from the official releases and record it. Download the official installer at a reviewed commit, inspect it, then run the selected version's installation. The installer can start services itself, so do not use this path on an existing installation.
After a successful download and source inspection:
Confirm the installed version. Follow documentation or source for that release when fields differ, including users/clients and target/dest. Validate with the installed binary, then prove authentication with a real client; JSON validation alone does not establish compatibility.
Generate credentials
Generate a distinct UUID and random 8-byte short ID for each device. For a new REALITY inbound, generate a server key pair. Capture output without logging it:
Parse the installed version's output in the private shell session, without printing it into tool output. PrivateKey goes into server privateKey; Password, or PublicKey in older versions, goes into client URI pbk. Do not substitute a Hash32 value. Check the release's source if labels differ. Reuse the existing server key pair when adding users to an inbound.
Write configuration and URI files without exposing their contents in logs. Afterward, unset client_uuid, short_id, reality_keys, and any variables holding parsed keys. Short IDs must contain an even number of hexadecimal characters, at most 16.
Write the server configuration
Inspect the actual service command and configuration path first. The official installer normally uses /usr/local/etc/xray/config.json. Before editing an existing file:
Keep the backup protected and retain its path. Fill every placeholder. The full template below is for a fresh server; merge only the needed inbound and routing changes into an existing configuration.
The template below follows the current Xray documentation. If the installed release rejects users, consult the matching release documentation and use clients only when that release expects it.
For more devices, add one entry under users and preferably one short ID per device. Give each entry a useful label. Do not log browsing destinations at info level longer than needed for commissioning.
Create the file under umask 077. Use root ownership and 0600 for a root service, or 0640 with an appropriate restricted group for a non-root service. Resolve an omitted service Group from the user's primary group. Verify that the actual service account can read the file and traverse its parent directories.
Validate before restart
Use the service's actual configuration path or configuration-directory arguments throughout. Do not restart Xray until the complete configuration passes validation:
If validation fails, fix the named field. Do not repeatedly restart a broken service.
When the test succeeds:
Open only TCP 443 in the active firewall. For already active UFW:
Preserve SSH access and existing rules. For another firewall, add a persistent allow rule in its existing input chain, accounting for earlier drops and chain priorities. Do not enable a disabled firewall incidentally. Also check the provider's external firewall or security group.
Produce the client URI
Build one URI per client:
Use the selected SNI for <SERVER_NAME> and the VPS public IP for <SERVER_IP>. Percent-encode the profile name and any query values that require URI escaping.
Give the user the URI in a file with permissions 0600 or another channel they requested. Remove temporary credential files created during setup after confirming delivery. In the ordinary response, state where it was saved without repeating it. A QR code is optional and should be generated only if the user wants one.
Client setup
In Karing or Happ:
- Import the
vless://URI. - Select the imported profile.
- Enable TUN or VPN mode for a full tunnel.
- Put Russian-site bypass lists and other split-routing rules in the client.
- Keep DNS inside the client tunnel unless the chosen client policy intentionally sends bypassed domains to a local resolver.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/vless-vps-setup/SKILL.md
Popularity
- Repository stars
- 53
- Repository forks
- 4
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vitalygashkov/rucens/vless-vps-setup)