Skip to content

Getting started: from a fresh VPS to your first connection

This is a self-contained guide for beginners. You will prepare your server and domains, install 3X-UI AUTO NGINX, work through the seven installer prompts and test your connection. No previous experience configuring nginx or Xray is required.

Installation is for a new VPS or a deliberate reinstallation only

On an existing server, download the latest manager and use the project update. The 1. Installation option deletes existing managed data after confirmation. Save a Backup outside the VPS before reinstalling.

Contents: What you need · Connect via SSH · Download the manager · Answer the prompts · Verify the result · Manage an existing VPS.

1. What you need

  • A fresh VPS running Ubuntu 24.04 LTS, Ubuntu 26.04 LTS or Debian 13. A VPS (Virtual Private Server) is a virtual server you rent from a hosting provider.
  • SSH access - a remote terminal. You need to log in as root or as a user with sudo privileges.
  • Two distinct domains or subdomains: one for the panel and subscriptions, and another for REALITY.
  • Internet-accessible ports TCP 80 and 443, UDP 443. Some hosting providers require you to open them in their control panel as well. TCP 853 is needed only if you enable DoT for your devices.

Which operating system should you choose?

Ubuntu 24.04 LTS is a good starting point for beginners because it has long-term support and extensive documentation. Ubuntu 26.04 LTS and Debian 13 are also supported. Start with a genuinely fresh OS that does not already have third-party nginx, 3x-ui or other web services installed.

Configure your domains

Suppose you own example.com:

Purpose Subdomain DNS record
Panel, subscriptions and HTTPS panel.example.com A → your VPS's IPv4 address
REALITY connection reality.example.com A → the same IPv4 address

These are fictional names; replace them with your own. An A record maps a domain to an IPv4 address. If your domain has AAAA records for IPv6, they must point to a working IPv6 address on the same VPS. Otherwise, some devices will reach the wrong address.

Wait until the domains resolve to the correct IP. The installer obtains certificates automatically, but the panel domain must be reachable and TCP port 80 must be open to the internet.

2. Connect via SSH

Installation and all manager operations require root privileges (Linux administrator access). We recommend Termius or the built-in Windows SSH client.

On your computer, for example in PowerShell on Windows 11, run:

ssh root@YOUR_VPS_IP

Replace YOUR_VPS_IP with your server's IP address. If your provider does not allow direct root login, connect using the account it provided, for example ubuntu:

ssh ubuntu@YOUR_VPS_IP

Only if you logged in as a regular user with sudo privileges, run on the VPS:

sudo -i

Enter your account password if prompted. Before launching the installer, check that you are running as root:

whoami

The result should be root. Run the following commands on the VPS as root, not on your computer. When reconnecting as a regular user, run sudo -i again.

We recommend setting up SSH key authentication. The dedicated guide shows how to create and upload a key using Termius or PowerShell on Windows 11, verify login and keep access to the server.

Reinstalling deletes managed data

Downloading and launching the manager does not reinstall anything by itself. On an existing VPS, 1. Installation replaces the 3x-ui database and nginx configuration after confirmation. For compatible installations, use 7. Update. If the manager says compatibility is not confirmed, read the project update guide first.

3. Download and launch the installer

On the fresh 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

This command downloads the script from the latest stable release, then runs it. If the download fails, installation will not begin.

In the interactive menu, choose 1. English, then 1. Installation. Keep the SSH session open until installation finishes.

4. Answer the installer prompts

The installer asks seven main questions. For a typical first server, we recommend the following answers:

Question Recommendation Why
1. Panel domain panel.example.com Hosts the panel, subscriptions and cover website
2. REALITY domain reality.example.com Separate name for the REALITY connection
3. Enhance VPS security? Y Fail2ban, encrypted server DNS and automatic security updates
4. Set up additional connections? N REALITY, XHTTP and Hysteria2 are created anyway
5. Route Russian websites through Cloudflare WARP? N for a typical international installation or cascade entry server; Y if you specifically need WARP for Russian destinations Russian destinations selected by routing rules see Cloudflare's IP
6. Install and configure AdGuard Home? N unless you need personal DNS Not required for the proxy to work
7. Create a client and display a subscription link? Y Get a link to connect your phone or computer immediately

3. Why we recommend enhanced VPS security

Recommendation: Y. Extra security is particularly useful if this is your first server.

  • Fail2ban temporarily blocks sources of repeated failed SSH login attempts. The installer does not disable password login or replace SSH keys. You can set up key authentication yourself later and disable password login after verifying access.
  • DNS-over-TLS (DoT) for the VPS itself encrypts the server's global DNS queries via Cloudflare and Google. It is not a DNS server for your devices. Individual network interfaces may use their own DNS settings.
  • Security updates run automatically. In the VPS's local time: package lists refresh at 02:30, and updates install at 02:50. If a reboot is required, it may happen at 04:38 even while users are connected.

The system receives security fixes for nginx, the Linux kernel and other packages automatically. The schedule is provided in advance so you know when overnight reboots may occur.

More about VPS security and examples of security updates.

The installer may also create a 1 GiB swap file (additional disk-backed memory) if needed. This is independent of your Security choice.

4. Which additional connections should you choose?

Recommendation: N for your first installation. REALITY, XHTTP and Hysteria2 are already created by default.

Answering Y opens separate prompts for WebSocket/Trojan gRPC, XTLS Vision, AmneziaWG and additional CDN-compatible XHTTP. For example, XTLS Vision requires a third domain, and the CDN profile requires further configuration with your CDN provider. There is no need to enable everything at once.

5. Cloudflare WARP: when to choose Y or N

Ordinary standalone VPS: the English-language menu defaults to N (the Russian menu defaults to Y). If enabled and successfully configured, Russian websites and services selected by Xray routing rules will see Cloudflare's IP instead of your VPS's IP. This avoids revealing your VPS's direct address to those destinations.

WARP does not hide your address from every website, is not a system-wide VPN, and does not affect device traffic that was never sent through the proxy. When enabled, the installer registers a device with Cloudflare and accepts its terms of service. If Cloudflare is unavailable, WARP configuration may finish with a partial result.

Special case: cascade entry server

If this VPS will be the entry server in a two-VPS cascade, choose N. WARP on that server is incompatible with Cascade because of the Xray routing rules. WARP is allowed on the exit server. Detailed cascade guide.

6. Do you need AdGuard Home?

Recommendation: N if you only need a proxy for now. AdGuard Home is an optional personal DNS server for ad filtering and managing your devices' DNS queries.

If you answer Y, you get the AdGuard Home panel and a personal DNS-over-HTTPS (DoH) address on the panel domain. The randomized path makes it harder to guess, but is not full authentication. You can optionally configure ClientIDs for different devices and an allowed-client list. To use personal DNS, configure your device or app separately.

Optional DoT for devices is suitable for Android's Private DNS feature, for example. It requires TCP 853 and does not send a ClientID, so access cannot be restricted in the same way as with DoH. Leave this option at N if you do not need it. Detailed personal DNS and AdGuard Home guide.

7. Why create a client immediately?

Choose Y if you want your first client and a ready-to-use subscription. Choose N if you will import clients from a Backup or create them manually.

5. Verify the result

When installation finishes, the installer displays the panel address, username, password, component status and project update availability. If the initial client's subscription passed verification, the installer also displays its link.

PARTIAL does not mean the entire server is broken

If you see a warning or PARTIAL status, check the Core stack and Project Update rows. If the core stack is running and Update is available, do not reinstall. For example, if global DNS-over-TLS (DoT) setup fails, the original DNS configuration may be restored while Update remains available. If stack health or rollback is not verified, investigate the specific error first.

  1. Save your panel credentials and subscription somewhere secure. Do not publish passwords, links or screenshots containing them.
  2. Open the panel in your browser and check that Xray is running.
  3. If the installer displayed a subscription link, add it to a supported app on your phone or computer.
  4. Enable the proxy in the app and check access to websites. When checking your public IP, make sure the request actually goes through the proxy.
  5. If the installer reports that an initial reboot is required after OS updates, perform it on the VPS as root at a suitable time:
reboot

The SSH session will close. Once the VPS has restarted, you can reconnect. Check the panel and your proxy connection again.

If something does not work, read the specific installer error first and check your DNS records and ports. Do not run Installation again blindly.

6. Manage an existing VPS

Connect to the working VPS via SSH and run sudo -i if necessary.

Always use the latest manager

A saved script does not update itself. Download the latest stable release for maintenance and choose option 7 to update. Disable unused preconfigured connections rather than deleting them or their managed Hosts. Compatibility rules.

On the VPS as root, download and launch the 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

Select English. Do not select 1. Installation on a working server.

Other menu options are available for day-to-day tasks:

Installation does not update an existing stack

Choose the appropriate update method. In-place updates are available for compatible installations. If the required compatibility contract is not confirmed, you can transfer clients using a Backup v3 into a fresh installation.

Other guides SSH keys for Ubuntu Latest stable release

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/start/

Terms of use for project materials