3x-ui3x-ui

Update & Uninstall

Manage 3x-ui with the x-ui menu and CLI — update (stable, dev, or legacy), change settings, and uninstall cleanly.

After a script install, the x-ui command is your control center. Run it with no arguments for the interactive menu, or pass a subcommand for a one-shot action.

x-ui

The x-ui management menu

The menu (items 028) shows the panel/Xray status at the top, then:

#ItemWhat it does
1Install(Re)install from the remote script
2UpdateUpdate to the latest stable release
3Update to Dev Channel (latest commit)Update to the rolling dev-latest build
4Update MenuUpdate just the x-ui menu script
5Legacy VersionInstall a specific older version (prompts for a tag)
6UninstallRemove 3x-ui (see below)
7Reset Username & PasswordSet new credentials; optionally disable 2FA
8Reset Web Base PathRandomize the web base path
9Reset SettingsReset panel settings (your account is preserved)
10Change PortChange the panel port
11View Current SettingsShow username, port, web base path, cert paths
12–14Start / Stop / RestartControl the panel service
15Restart XrayReload only Xray-core
16Check StatusService status
17Logs ManagementView debug logs / clear logs
18–19Enable / Disable AutostartToggle start-on-boot
20SSL Certificate ManagementLet's Encrypt (domain or IP), custom paths, renew/revoke
21Cloudflare SSL CertificateDNS-01 wildcard cert via Cloudflare
22IP Limit ManagementFail2ban-based per-client IP limits
23Firewall Managementufw install and port rules
24SSH Port Forwarding ManagementBind the panel to localhost and tunnel over SSH
25PostgreSQL ManagementInstall/migrate/manage PostgreSQL
26Enable BBRToggle the BBR congestion-control sysctl
27Update Geo FilesUpdate geoip/geosite data (Loyalsoldier, IR, RU)
28Speedtest by OoklaRun an Ookla speed test
0Exit

Some of these have their own pages: SSL certificates (items 20–21), Security (IP limits, firewall), Reverse proxy and Panel settings (TLS), and Database (PostgreSQL).

CLI subcommands

For scripts and quick actions, x-ui also takes a subcommand directly:

CommandAction
x-ui start / stop / restartControl the service
x-ui restart-xrayReload only Xray-core
x-ui statusShow status
x-ui settingsShow current settings
x-ui enable / disableToggle autostart on boot
x-ui logTail the debug log
x-ui banlogShow Fail2ban ban log
x-ui updateUpdate to the latest stable release
x-ui update-devUpdate to the rolling dev-latest build
x-ui legacyInstall a specific older version (prompts)
x-ui update-all-geofilesUpdate all geo files, restart if changed
x-ui migrate-db --dsn …Migrate SQLite → PostgreSQL (see Database)
x-ui install / uninstallInstall / uninstall

Updating

  • Stable: menu option 2 or x-ui update. Re-running the install script also updates in place.
  • Dev channel: menu option 3 or x-ui update-dev — the rolling dev-latest per-commit build (not a stable release).
  • A specific older version: menu option 5 (Legacy Version).

Updating preserves your database and settings. Take a backup before a major-version jump.

Docker users update differently — pull the new image and recreate the container (docker compose pull && docker compose up -d) rather than using the x-ui update commands.

Uninstalling

Menu option 6 or x-ui uninstall. It stops and disables the service, removes the service unit, and deletes /etc/x-ui/ and the install folder. If the panel used a locally-installed PostgreSQL, it offers to purge that too (a separate, irreversible confirmation).

Uninstalling removes the database (/etc/x-ui/x-ui.db) and your configuration. Back up first if you might need it.

On this page