Skip to content

Cascade across two VPS instances: step-by-step setup

This guide uses the latest stable manager. The main cascade rules and panel forms were checked against the project and 3x-ui 3.12.0 source code on November 30, 2026. You need to test the connection between your VPS instances on your own network.

Where to start: first read the server and domain requirements, then choose your situation.

When both servers are ready, proceed to connecting the servers.

Manage an existing cascade: connect the entry VPS · verify the setup · common errors · disable Cascade · Backup and migration.

Do not reinstall a working server

To configure Cascade on an existing VPS, use the latest manager and option 5. There must be no conflicting WARP configuration on the entry VPS; if necessary, remove it using this guide. WARP is allowed on the exit VPS. Save a Backup of both servers outside the VPS instances.

What a cascade is and why use one

A cascade connects two VPS instances in a chain. A VPS (Virtual Private Server) is a virtual server you rent from a hosting provider and manage yourself.

In a conventional setup, your device connects directly to a VPS abroad. A cascade adds an intermediate server, for example in Russia.

Phone, computer or router
             |
             v
     Entry VPS (Russia)
             |
             v
     Exit VPS (Europe)
             |
             v
          Internet

Each server has its own role.

The entry VPS accepts connections from your devices. Its address is the one you use in client apps. It determines where to send traffic: directly to the internet or to the second server.

The exit VPS accepts traffic from the entry server and sends it to the destination websites and services. With direct egress from the exit server, websites see its public IP address.

This setup may help when a direct connection to a server abroad is unstable but connections through a Russian VPS remain available.

However, a cascade cannot guarantee access through every kind of blocking. The connection between the Russian VPS and the VPS abroad must also work. The extra server increases latency and may limit overall throughput.

How traffic is routed

By default, 3X-UI AUTO NGINX configures the following rules:

  • Russian domains in geosite:category-ru are accessed directly through the entry VPS.
  • Russian IP addresses in geoip:ru also use direct egress.
  • Other matching traffic goes through the VPS abroad, unless earlier rules have already handled it.

This means the cascade does not route absolutely all traffic through the VPS abroad. If necessary, you can change the routing of Russian websites after setup.

1. What you need

Prepare the following:

  1. Two VPS instances: one for incoming connections and one for internet egress.
  2. A supported OS on each server: Ubuntu 24.04 LTS, Ubuntu 26.04 LTS or Debian 13. A fresh OS is needed only for a new installation.
  3. Two domains or subdomains per VPS: one for the panel and one for REALITY.
  4. SSH access to both servers with the ability to work as root.
  5. Access to the domains' DNS records so you can point them to the appropriate servers.
  6. Working 3X-UI AUTO NGINX installations on both VPS instances before connecting them. Do not reinstall an existing working server.

Incoming TCP ports 80 and 443 and UDP port 443 must be accessible on each server. If you use DNS-over-TLS (DoT), TCP 853 is also required.

You do not need to install a separate management panel, manually set up an inter-server VPN or edit the Xray configuration to create a cascade.

Example domain layout

Suppose you own example.com.

Purpose Subdomain
Russian VPS panel ru-panel.example.com
Russian VPS REALITY ru-reality.example.com
VPS abroad panel eu-panel.example.com
VPS abroad REALITY eu-reality.example.com

These are fictional addresses. Replace them with your own.

Both Russian subdomains must point to the Russian VPS's IP address. Both other subdomains must point to the VPS abroad.

For IPv4, you normally create DNS records of type A. If you use IPv6, also check AAAA records: they must not point to a different or unreachable server.

2. Where to rent a Russian VPS

For the Russian entry server, consider HSVDS.

The author of 3X-UI AUTO NGINX tested this provider as a cascade entry server. Its low cost, connection speed and ability to run several small services on one VPS made it attractive.

At the time this article was prepared, HSVDS offered the following entry-level configuration:

Specification Value
CPU 1 vCPU Intel Xeon Gold
RAM 1 GB
Storage 10 GB SSD
Traffic Unlimited
Public IPv4 Included
Price RUB 185.76/month

The tested configuration ran 3X-UI AUTO NGINX, AdGuard Home and Telegram Web Proxy Manager simultaneously, with some RAM still available.

However, 1 GB of RAM and 10 GB of storage is a minimum configuration, not a universal recommendation. For additional services, large logs and backups, consider 2 GB of RAM and 20 GB of storage or a plan that allows resource upgrades.

On a server with 1 GB of RAM, swap can be useful. This is disk space Linux can use when RAM is low. Our installer automatically creates a 1 GB swap file when conditions permit. If swap already exists or there is not enough free space, automatic creation is skipped.

You can register with HSVDS using the project's referral link. Under the provider's published terms, new users receive a bonus of 20% of their first deposit. The project also receives a referral reward. Using this link is optional.

Prices and terms can change, so check the selected configuration on the provider's website before paying.

For the exit server abroad, a VPS from another provider is suitable if its address is reachable from Russia and connectivity with the Russian VPS is good.

3. Prepare the servers for Cascade

Perform Installation only on new VPS instances. If one or both are already working, use the relevant readiness checks. Configure Cascade after preparing both servers.

A new VPS abroad

Step 1. Connect to the VPS abroad

Connect via SSH using Termius or PowerShell. If you did not log in as root, run sudo -i. How to set up SSH access.

Step 2. Install the project

Run on the new VPS abroad as root:

curl -fSL https://github.com/xPROMSx/3x-ui-auto-nginx/releases/latest/download/x-ui-latest.sh -o x-ui-latest.sh && bash x-ui-latest.sh

Do not choose Installation on a working VPS: it deletes previous managed data. On a new VPS, choose 1. English → 1. Installation. See the getting started guide for details.

Step 3. Answer the installer prompts

The standard settings are sufficient for an ordinary cascade.

Prompt What to choose
Panel domain Panel subdomain of the VPS abroad
REALITY domain REALITY subdomain of the VPS abroad
Enhanced security Y if the proposed settings suit you
Additional connections N if not needed yet
Russian websites through WARP You can choose N for the initial setup
AdGuard Home Optional; N for a simple cascade
Automatic client creation Optional

Cascade requires the standard VLESS + REALITY connection. The installer creates it automatically.

You do not need to enable the optional VLESS XTLS Vision connection: Cascade uses the existing REALITY inbound with Vision for the inter-server link.

Cloudflare WARP is allowed on the exit VPS. For the initial setup, however, it is simpler to leave it disabled so route verification is easier.

After installation, save the panel address, username and password.

Open the panel in your browser and make sure Xray is running and the standard REALITY connection is enabled.

The VPS abroad is ready. Now proceed to preparing the Russian VPS or checking an already installed Russian VPS.

An existing VPS abroad

Open its 3x-ui panel. Check that Xray is running, the standard VLESS REALITY inbound is enabled and reachable externally on TCP/443. Make sure the panel and REALITY domains point to this server and that you can log in via SSH with root privileges. WARP is allowed on the exit server. Do not reinstall.

If the Russian VPS is new, continue to the next section. If it is already installed, proceed to checking both servers.

A new Russian VPS

Connect to the Russian VPS via SSH. If your hosting provider supplied the ubuntu account or another regular user, log in with it and run sudo -i. There is no need to enable direct root login separately.

Run on the new Russian VPS as root:

curl -fSL https://github.com/xPROMSx/3x-ui-auto-nginx/releases/latest/download/x-ui-latest.sh -o x-ui-latest.sh && bash x-ui-latest.sh

If the VPS is already configured, do not run Installation: it deletes managed data. Proceed to checking both servers. On a new VPS, choose 1. English → 1. Installation.

WARP on the entry server

Answer N to the Cloudflare WARP prompt. Otherwise, you will have to remove conflicting settings before connecting Cascade.

For a new Russian VPS, use the following answers:

Prompt What to choose
Panel domain Panel subdomain of the Russian VPS
REALITY domain REALITY subdomain of the Russian VPS
Enhanced security Y if the settings suit you
Additional connections N if not needed
Russian websites through WARP N
AdGuard Home Optional; N for a simple cascade
Automatic client creation Y to test from a device

After installation, check that:

  • the Russian VPS panel opens;
  • Xray is running;
  • an ordinary client has been created;
  • its subscription is accessible.

Now check the readiness of both servers.

Both VPS instances are already installed: readiness check

Make sure the panel, Xray and standard REALITY work on both servers. On the entry server, you need an ordinary client or subscription to test traffic. Verify SSH access to both VPS instances and save current backups outside the servers before changing the configuration.

WARP must not be configured on the Russian entry VPS. If it is already present, first remove the conflicting WARP settings. WARP is allowed on the exit VPS abroad. If Cascade is already connected, do not create a key again: proceed to verifying the working cascade.

Once both servers are ready, connect them.

4. Create the cascade key on the VPS abroad

Start configuring Cascade on the exit server.

Connect to it via SSH. If you did not log in as root, run sudo -i first. On the VPS abroad as root, download and launch the latest manager:

curl -fSL https://github.com/xPROMSx/3x-ui-auto-nginx/releases/latest/download/x-ui-latest.sh -o x-ui-latest.sh && bash x-ui-latest.sh

Do not choose Installation again: on a working server, you only need the manager.

Choose 5. Cascade → 1. Create key (exit server).

The manager asks for the username and password of this server's 3x-ui web panel.

The entered credentials are hidden and are not saved by the manager.

The manager creates a dedicated cascade client on the standard REALITY inbound and displays a vless:// key link. Copy it in full.

Do not publish it in chats, forums or GitHub Issues. It contains the information needed to connect to the exit server. Anyone with this link can use the created client.

What appears in the 3x-ui panel

The exit VPS will have a dedicated enabled cascade client with Vision and no traffic limit or expiration. Other clients and inbounds are not changed. The inter-server connection uses external TCP/443, not internal port 8443.

5. Connect the Russian VPS to the VPS abroad

Now switch to the Russian server, which is the entry server. If you did not log in as root, run sudo -i first.

On the Russian VPS as root, download and launch the latest manager:

curl -fSL https://github.com/xPROMSx/3x-ui-auto-nginx/releases/latest/download/x-ui-latest.sh -o x-ui-latest.sh && bash x-ui-latest.sh

Choose:

5. Cascade → 2. Connect exit server (entry server)

The manager again asks for a username and password, this time for the Russian VPS's panel.

When the manager asks for the key, paste the vless:// link copied from the exit VPS. It checks connectivity and potential routing conflicts automatically.

Note that the link is visible in the terminal when pasted. Do not record your screen or publish screenshots containing the key.

Wait for the message Cascade connected.

Applying the changes may restart Xray and briefly interrupt existing user connections.

If validation fails, the manager attempts to remove the changes it made. The rollback result is reported separately. Do not assume rollback succeeded if the manager could not verify it.

6. What Cascade creates in 3x-ui

Open the 3x-ui management panel on the entry server.

Outbound connection

Under Xray → Outbounds, you will see:

cascade-exit

This is a VLESS connection with REALITY to the VPS abroad.

It contains settings from the key link you received, including the address, port, UUID and REALITY parameters.

Its purpose is to forward matching traffic from the Russian VPS to the VPS abroad.

It is not a new inbound for your phone. Client apps continue to use their existing profiles for the Russian server.

Routing rules

Three rules will appear under Xray → Routing.

Rule Condition Action
CASCADE - RU geosite:category-ru direct
CASCADE - RU2 geoip:ru direct
CASCADE - EXIT TCP and UDP cascade-exit

The rules are appended to the existing list. Xray processes them in order, so earlier rules may catch some traffic.

For example, if a custom rule for YouTube with another outbound appears above the cascade rules, it retains priority.

The panel's standard rules for the service API, local addresses and BitTorrent are also preserved.

What does not change

After enabling Cascade:

  • existing clients are not deleted;
  • their UUIDs and subscription links stay the same;
  • no new client profiles are required on the entry VPS;
  • the standard REALITY, XHTTP and Hysteria2 inbounds are preserved;
  • domains and HTTPS certificates are not replaced.

Users keep connecting as before, while Xray on the entry server chooses the onward route.

7. Verify that Cascade works

Verify in three stages: status, exit IP and Russian websites.

Step 1. Check status in the manager

On the VPS abroad, connect via SSH, run sudo -i if necessary, then download and launch the latest manager as root:

curl -fSL https://github.com/xPROMSx/3x-ui-auto-nginx/releases/latest/download/x-ui-latest.sh -o x-ui-latest.sh && bash x-ui-latest.sh

Choose 5. Cascade → 3. Status.

The exit role should be ready and the cascade client enabled.

On the Russian VPS, also launch the latest manager as root using the same command and choose the same option:

5. Cascade → 3. Status

The entry role should be shown as configured and Xray as running.

Now test a real connection from a device.

Step 2. Test the connection from a device

On your phone, computer or router:

  1. Connect using an ordinary profile for the Russian VPS.
  2. Make sure the app actually sends the test traffic through the proxy.
  3. Open ipify.org or ifconfig.me.
  4. Compare the displayed IP address with the public IP of the VPS abroad.

With ordinary direct egress through the cascade, the address of the server abroad should be displayed.

If you see the Russian IP, check routing rules and the client app's operating mode. The request may be going directly or matching a different rule.

If WARP is enabled on the exit VPS, some requests may exit through Cloudflare. Take this into account when testing.

Step 3. Check Russian websites

Open a few Russian services you normally use.

By default, Russian domains and IPs from the geodata use the entry VPS. Geodata coverage may differ from your expectations.

Optional: send Russian traffic through the VPS abroad

If you want Russian resources to exit through the VPS abroad, open Xray → Routing on the entry VPS and disable these rules:

  • CASCADE - RU
  • CASCADE - RU2

Leave CASCADE - EXIT enabled. Click the main Save button on the Xray page and repeat the device test. If the result is not suitable, enable both Russian rules again and save the configuration.

For the initial setup, keep the standard routing.

8. Common errors and solutions

WARP is already installed on the Russian VPS

This is one of the most common conflicts.

When you try to connect, the manager detects WARP and refuses to change the cascade configuration.

The reason is that both WARP and Cascade create routing rules that affect outbound selection.

How to fix it:

First, save a Backup outside the VPS. Changing routing may briefly interrupt connections. Remove only the listed WARP settings, not other outbounds or custom rules.

  1. Open the Russian VPS panel.
  2. Go to Xray → Routing.
  3. Find the WARP-owned rules WARP - RU, WARP - RU2 and WARP - RU3.
  4. Delete these rules.
  5. Go to Xray → Outbounds.
  6. Delete the warp-masque outbound.
  7. Click the main Save button on the Xray page. Verify that Xray works and your ordinary connection is still available.
  8. If you are preparing the servers for the first time, return to checking both VPS instances. If you already have the exit VPS key, retry connecting Cascade through the manager.

Disabling WARP rules alone is not enough: the manager detects rules with these names even when disabled.

WARP is allowed on the exit VPS abroad.

Could not connect to the exit server

If the manager reports that the connection test failed, possible causes include:

  • the VPS abroad is unreachable from the Russian VPS;
  • Xray is not running on the exit server;
  • external TCP port 443 is closed;
  • the key link was not copied in full;
  • domains or REALITY settings have changed;
  • the connection between VPS instances is blocked or interrupted.

First, make sure the web panel of the server abroad opens and Xray is working.

On the Russian VPS as root, you can check TCP port reachability:

timeout 5 bash -c 'echo > /dev/tcp/DOMAIN_NAME/443' && echo "TCP 443 is reachable"

Replace DOMAIN_NAME with the REALITY domain of the exit VPS.

If the connection succeeds, you will see TCP 443 is reachable. On failure, the command ends without this message.

This test only checks whether a TCP connection can be established. It does not verify REALITY, the key or the cascade itself.

If TCP works, try obtaining a new link on the exit VPS and repeat the setup. Use the link from the Create key menu, not an ordinary user subscription.

The cascade client already exists

On the VPS abroad, the manager may report that a client named cascade already exists.

You cannot create another client with the same name.

Open the Clients section of the 3x-ui panel and inspect the existing record.

If it belongs to a previously configured cascade, first check 5. Cascade → 3. Status. Do not delete it unnecessarily: other entry servers may already use its key.

If the name belongs to an unrelated client you created yourself, rename that client and retry creating the key.

The manager detected existing routing rules

Cascade appends its rules to the end of the list. If custom rules appear above them, those rules may change the expected route.

The manager warns you about this.

Open Xray → Routing and check the rules with the indicated numbers.

If a rule sends all TCP traffic through another outbound, it may make Cascade ineffective. In that case, the manager refuses to connect.

Correct or disable the conflicting rule if you no longer need it.

Do not delete the panel's standard rules.

Cascade is already connected

If the entry role is already configured or partially configured, it cannot be connected again until it is disabled.

First, open 5. Cascade → 3. Status.

To replace the VPS abroad, use 4. Disable on the entry server and connect the new exit after confirming.

Xray stopped working after connecting Cascade

This can happen because of configuration errors or while new rules are being applied.

The manager checks Xray health and routing after saving. If the checks fail, it attempts to roll back the changes.

Open the panel and check Xray status.

If the manager reports an unverified rollback, also check:

  • the cascade-exit outbound;
  • CASCADE - RU, CASCADE - RU2 and CASCADE - EXIT rules;
  • remaining custom rules.

Do not blindly retry the connection until you know the actual configuration state.

Cascade stopped working after a domain change

If you run 2. Change Domains on the VPS abroad, REALITY connection settings may change.

The old key link will no longer match the exit server's settings.

In this case:

  1. Check the exit role status.
  2. On the entry VPS, disable the old cascade through the menu.
  3. On the exit VPS, obtain a current key link. If needed, recreate the exit role through the standard menu options.
  4. Connect again on the entry VPS.

Do not manually change UUIDs, REALITY keys or other settings just to restore an old link.

Some apps do not work through Cascade

Cascade uses VLESS REALITY with Vision for the inter-server connection.

There is a limitation: QUIC traffic over UDP/443 does not pass through this cascade. This may affect apps and websites using HTTP/3.

In addition, AmneziaWG connections are not routed through the exit server in the current implementation.

If an app works directly but not through Cascade, check which transport it uses. Some services may require a different client profile or route.

The VPS abroad is temporarily unavailable

If the exit server is offline, overloaded or the connection between the VPS instances is blocked, traffic routed through it will stop flowing.

The built-in Cascade does not create an automatic backup exit server abroad.

Connections with a direct route through the Russian VPS may continue working.

To recover, restore exit server availability or reconfigure the entry VPS to use another exit.

9. Disable Cascade

If you no longer need Cascade, remove it through the standard menu.

Recommended order: disable the entry server first, then remove the exit client if necessary.

On the Russian VPS

Connect via SSH and run sudo -i if necessary. Download and launch the latest manager on the Russian VPS as root:

curl -fSL https://github.com/xPROMSx/3x-ui-auto-nginx/releases/latest/download/x-ui-latest.sh -o x-ui-latest.sh && bash x-ui-latest.sh

Choose 5. Cascade → 4. Disable.

The manager offers to remove:

  • the cascade-exit outbound;
  • CASCADE - RU, CASCADE - RU2 and CASCADE - EXIT rules.

After confirmation, these elements are removed. Other outbounds, standard rules and user profiles are retained.

Client connections still exist, but their routing changes. Check internet access after disabling Cascade.

On the VPS abroad

If the exit client is no longer used, download and launch the latest manager with the same command on the VPS abroad as root. Choose the same option:

5. Cascade → 4. Disable

Here, the manager offers to remove the cascade client.

Remember: if one exit VPS serves multiple entry servers using a shared key, deleting this client breaks their inter-server connections.

Each removal requires separate confirmation.

10. Backups and server migration

Cascade settings are preserved in Backup v3 along with the 3x-ui configuration.

After restoring on another VPS, however, check not only that the rules exist but also that the exit server is reachable.

If domains, IP addresses or REALITY settings have changed, the inter-server connection may need to be configured again.

Cascade is preserved during an in-place update. After a fresh installation with client-only transfer, you need to set up Cascade again.

After moving to a new server, always check Cascade through 5. Cascade → 3. Status and separately verify a real connection from a device.

Continue configuring your cascade

Cascade is now working, but you can extend it with custom rules and a backup exit:

Attribution and use of materials

© 2026 xPROMSx contributors · 3X-UI AUTO NGINX

Our material may be copied and distributed under the GNU GPL-3.0-only license, provided the attribution and link to the original are retained.

Original source: https://xpromsx.github.io/3x-ui-auto-nginx/guides/cascade/

Terms of use for project materials