Skip to content

Backup, full restore and client transfer

Two ways to preserve your server

Choose the operation that matches your goal:

3X-UI AUTO NGINX includes Backup / Restore v3: you can store a backup of the managed stack outside the VPS, move it to another hosting provider and restore working services. This helps if your server fails, you want to move to another data center or you need to deploy the same configuration again.

Since v2.8.0, the menu has offered another mode: restore only clients and subscriptions. It serves a different purpose: create a fresh installation and transfer users into it without replacing the new server configuration with the old one. A fresh installation generates random subscription paths, and import restores the previous RAW and JSON paths from Backup v3. Users therefore do not need new links simply because you reinstalled the project.

Your goal Which operation to choose
Move to another hosting provider while preserving the managed stack, settings and clients Full Backup v3 → Restore
Return to the previous configuration on the same VPS Full restore on the current VPS
Install a new project version from scratch while keeping users Fresh installation → Restore clients and subscriptions
Update a compatible v3.0.0+ installation without reinstalling Project Update - a Backup is created automatically before changes
Keep a copy in case of failure Create a Backup and download the archive from the VPS to your computer

The archive format and project version are different

For full Restore and client transfer, the current manager requires Backup v3, created since project v2.4.0. Older formats are not supported. Full Restore returns the archived configuration; it does not update the project. Before any restore, keep a copy of the archive outside the VPS.

What a full Backup v3 contains

The backup preserves project-managed data required to restore the configuration:

  • 3x-ui and Xray: the panel database, connection settings, clients, subscriptions, supported statistics and routing rules.
  • nginx: managed configurations and routes to the panel, subscriptions and proxy connections.
  • HTTPS and certificates: managed certificates and associated data required for recovery.
  • AdGuard Home: its settings and data, if installed.
  • Additional project components: cover websites, Cascade and other supported managed settings, if present.

A full Restore brings back the working project-managed server, not just the client list. You can restore the project on another VPS, point your domains to its new IP and continue using your connections.

The operating system, its SSH keys, user accounts, third-party services and arbitrary hosting provider settings are not part of the portable Backup. Preparing the new VPS itself remains a separate step.

Requirements for full restore

The new VPS must match the backup's OS family, OS version and CPU architecture, for example Ubuntu 24.04 x86_64 → Ubuntu 24.04 x86_64. The same rule applies to Ubuntu 26.04 and Debian 13. Moving a full Backup from Ubuntu 24.04 to Ubuntu 26.04 is not an OS upgrade. Backup v3 archives are supported.

Part 1. Create and save a backup

Create a Backup through the menu (recommended) or through the terminal, then download the archive.

The archive contains secrets

It contains passwords, client data and private keys. Do not publish it, share it with unauthorized people or make its file permissions public. A copy on the same VPS will not help if the server is lost.

Option 1. Through the manager menu

  1. Connect to the working VPS via SSH. If you logged in as a regular user, run sudo -i on the VPS.
  2. Download and launch the latest stable manager on the 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
    
    3. Select English and choose 3. Backups → 1. Create backup. 4. Wait for Archive created and verified and note the full path to the archive under /var/backups/x-ui/. 5. Proceed to downloading the archive.

Option 2. Through the terminal

If the utility is already installed, run on the VPS as root:

x-ui-backup backup

The utility creates and verifies the archive under /var/backups/x-ui/, then displays its path. Download the archive.

Download the archive to your computer

SFTP is file transfer over SSH. In Termius, open an SFTP connection to the source VPS using the same SSH account.

  • If you log in as root, navigate to /var/backups/x-ui/ and download the required file.
  • If you log in as a regular user (for example ubuntu), the backup directory is protected. In a separate SSH session as that user, not root, create a copy accessible only to that user:
sudo install -m 600 -o "$(id -un)" /var/backups/x-ui/ARCHIVE_NAME.tar.gz "$HOME/ARCHIVE_NAME.tar.gz"

Replace the name in both parts of the command with the actual filename. Use an unused name in your home directory so you do not overwrite another file. Download the copy from your home directory over SFTP. After checking the downloaded file, delete only the temporary copy in your home directory; keep the original Backup.

Check that the downloaded archive has the same name and size as on the server. Store it somewhere secure. Your Backup is saved.

Part 2. Fully restore your server with another hosting provider

Choose this scenario if the new VPS should fully replace the old one. You do not need to install 3X-UI AUTO NGINX on it beforehand.

Restore replaces data on the destination VPS

Restore replaces the managed stack and the contents of affected directories. Use a fresh VPS or save all important data in advance. Do not choose 1. Installation just to perform Restore. Restore only your own trusted archive.

Step 1. Prepare the VPS and archive

Rent a fresh VPS with the same OS, OS version and architecture as the Backup. If you do not have an archive yet, create and download one. Prepare SSH access and the ability to change DNS records for the previous domains.

Only if you use Telegram Web Proxy Manager

The 3X-UI Backup does not include Telemt data. If TWPM is installed on the destination VPS, full Restore is blocked. Save the TWPM data separately, uninstall it using 6. Uninstall Telegram proxy and choose to remove its certificate (y), then perform Restore. After reinstalling TWPM, the Telegram link will change. If the manager reports an old unsupported TWPM layout, create a new Backup on the source server. TWPM guide.

Step 2. Upload the archive to the new VPS

On the new VPS, upload the archive from your computer over SFTP to the standard directory /var/backups/x-ui/. If the directory does not exist yet, create it on the VPS as root:

mkdir -p -m 700 /var/backups/x-ui

Keep the archive file permissions private (600). If you connect via SSH as a regular user and SFTP does not let you write to this directory, upload the archive to your home directory and note its full path. The manager also accepts an absolute path. Do not make the archive publicly accessible.

Step 3. Run Restore

On the new 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
  1. Select English, then choose 3. Backups → 3. Restore backup.
  2. Select your archive number from the list. If you uploaded it to another directory, enter the absolute path.
  3. Check the displayed metadata: OS, architecture and components.
  4. Answer the questions about configuring automatic security updates and Fail2ban, and enabling UFW while preserving SSH access. On Ubuntu 24.04/26.04, enabling UFW is recommended for an ordinary personal VPS. Choosing N retains the previous UFW state. If you enable automatic updates, remember that an overnight reboot may occur at 04:38 VPS local time.
  5. Read the warning and type YES to confirm. Wait for the final report. If an update is still running on the fresh OS, the manager waits until it finishes. Do not reboot the VPS during Restore.

The expected result is Restore: SUCCESS and Overall: SUCCESS. If data was restored but Security finished partially, check SSH, UFW and the security services instead of blindly running Restore again.

Step 4. Point the domains to the new VPS and verify the result

If the IP address has changed, update the A records and any AAAA records in use for the previous panel, REALITY and other restored connection domains. Make sure the domains point to the new VPS.

Open the panel at its previous address and check Xray, certificates, AdGuard Home (if installed), your subscription and an actual device connection. If you enabled UFW, verify a new SSH login without closing your current SSH session. If you use Cascade, check its status and traffic.

Done: once services are working on the new VPS and devices can connect, the migration is complete. Do not delete the old VPS or archive before this check.

Return to the previous installation on the current VPS

Full Restore on the same VPS replaces the managed stack with the versions and settings from the selected archive. Restore requires the same OS, its supported version and architecture. If TWPM is installed, the full Restore restriction described in "Prepare the VPS and archive" above applies. If the manager reports an unfinished Update, close it through the menu first.

Connect to the VPS via SSH and run sudo -i if necessary. On the 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 3. Backups → 3. Restore backup. Select your verified archive, check the date and version in the preview and confirm with YES. Once finished, check panel login, a client connection and a new SSH session.

The manager displays the path to the snapshot of the replaced installation under /var/backups/x-ui/.previous-*/. The snapshot includes the database files/etc/x-ui/x-ui.db and its binaries. Older snapshots are retained. If the panel is working before Restore, a separate ordinary Backup will let you restore that entire installation later through the menu. Use a copy of the snapshot to read data from it. If you need to view records in the panel, use the standard 3x-ui database import on a separate test installation of the same version. Leave the restored panel's own database in place.

Part 3. Transfer only clients and subscriptions into a fresh installation

Use this mode if you want a new server configuration but need to keep your users. For migration from 2.x or a deliberate fresh installation, including manual recovery of outbounds and routes, follow the second part of the project update guide. For compatible v3.0.0+ installations, an in-place update is usually sufficient. A fresh installation generates random RAW and JSON subscription paths; import restores the previous shared paths from Backup v3. If transfer succeeds and you retain the panel domain and required subscription types, the previous URLs are preserved.

Fresh installation deletes previous managed data

You can reinstall the project on a new VPS or the same dedicated VPS. Before reinstalling, keep a verified Backup outside the server.

Step 1. Save your clients and prepare the domains

On the working VPS, create and download a Backup v3. To preserve previous subscription links, use the same panel domain in the fresh installation. If the IP address changes, update DNS before issuing certificates; connections may be briefly interrupted. Changing the panel domain requires new subscription URLs.

Step 2. Install the project on a fresh VPS

On the new or current VPS, install the latest version. Check the panel and Xray. Answer N when asked whether to create a client if you are transferring clients from a Backup.

Step 3. Upload the archive and import

If the archive remains under /var/backups/x-ui/ on the same VPS, do not upload it again. Otherwise, upload the archive to the standard directory.

Check inbounds before importing

Clients will receive all suitable active local inbounds of the new installation. If you previously restricted access to individual inbounds, check and restore the individual assignments.

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

Select English, then 3. Backups → 4. Restore clients and subscriptions. Choose your archive number (or enter its full path if stored elsewhere), press Enter to continue, and enter the login credentials for the new panel and the 2FA code if enabled. Check the client transfer report.

What is transferred: client identifiers and credentials, status, limits, expiration dates, supported counters and shared RAW and JSON paths. The domain, certificates, inbound configuration and other server infrastructure remain new. Previous individual client assignments are not copied.

If a client with the same email or subscription ID already exists on the new panel, the existing record is preserved and the conflicting record from the archive is skipped. Check the report before switching users over.

Step 4. Verify previous subscriptions and connections

If you kept the panel domain, open the previously issued subscription link in the client app and refresh it: the old URL should return the current connections of the new VPS. If you changed the domain, give users the new URL. Connect from your device, check access to websites and verify that the new VPS is being used.

Done: clients now use the new configuration, and if the domain was preserved, they did not need to change their subscription URLs.

If Restore or import fails

Before any operation, keep the original Backup separately. Full Restore includes nginx validation and recovery of managed data if a failure is detected. Do not delete the archive or diagnostic data; read the specific error and rollback status first.

Client import adds data to an existing panel rather than replacing the entire stack. If you need to return to the initial state of the new installation, use a separately saved backup of that installation.

Getting started · Change domains · All guides

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

Terms of use for project materials