> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.lumiweb.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# 3X-UI (Xray/VLESS)

> Xray web panel: VLESS, VMess, and more

3X-UI is a web panel on top of Xray-core. Through the browser you create connections (inbounds) and users over the VLESS, VMess, Trojan, and Shadowsocks protocols, view traffic stats, and set limits — instead of editing Xray configs by hand. Commands are for Ubuntu/Debian, as root.

<Note>
  Commands are current as of writing. Before installing, check the official repo [MHSanaei/3x-ui](https://github.com/MHSanaei/3x-ui) — the install script and the panel get updated.
</Note>

## What you'll need

* A Lumi server (Ubuntu 22.04 by default). The IP, root login, and password are in the server card in [@lumivps\_bot](https://t.me/lumivps_bot).
* An SSH connection to the server as root: [Connecting to the server](/en/vps/connect).

## Installation

<Tabs>
  <Tab title="Script — quick and easy">
    Install the panel with the official script in a single command:

    ```bash theme={"system"}
    bash <(curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/master/install.sh)
    ```

    The script will ask for the panel's username, password, and port, install the service, and start it. The backend is SQLite by default, with the database file at `/etc/x-ui/x-ui.db` — no separate setup needed.

    <Warning>
      Don't leave the defaults. Set your own username, a strong password, and a non-standard panel port right away — an exposed panel with default credentials gets probed within the first few hours.
    </Warning>
  </Tab>

  <Tab title="Manually via Docker">
    An alternative approach is to run the official image from the [MHSanaei/3x-ui](https://github.com/MHSanaei/3x-ui) repo. First install Docker: [Docker](/en/vps/docker).

    <Steps>
      <Step title="Create a folder for the data">
        ```bash theme={"system"}
        mkdir -p /etc/x-ui
        ```
      </Step>

      <Step title="Run the container">
        ```bash theme={"system"}
        docker run -itd \
          --name 3x-ui \
          --restart=unless-stopped \
          -v /etc/x-ui:/etc/x-ui \
          -p 2053:2053 \
          ghcr.io/mhsanaei/3x-ui:latest
        ```
      </Step>

      <Step title="Check that the container is running">
        ```bash theme={"system"}
        docker ps
        ```

        You should see the `3x-ui` container with status `Up`.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Verify

```bash theme={"system"}
systemctl status x-ui
```

You should see `active (running)`.

## Managing the panel

The management menu is opened with the command:

```bash theme={"system"}
x-ui
```

In it you can change the username, password, and port, view the current settings, restart the service, and enable SSL. To restart the service manually:

```bash theme={"system"}
systemctl restart x-ui
```

## Accessing the panel

The panel opens in a browser at an address like:

```text theme={"system"}
http://IP:PORT/PATH
```

Where `IP` is your server's address, `PORT` is the port you set during installation, and `PATH` is the panel's web path (also set by the script; the exact values are shown by the `x-ui` command). Log in with the credentials you set during installation.

## Open the panel port in the firewall

```bash theme={"system"}
ufw allow PORT/tcp
```

Substitute the port you set during installation. More on the firewall: [Firewall (ufw)](/en/vps/firewall).

<Warning>
  Where possible, don't leave the panel exposed on a bare IP. Set up a domain and enable SSL (the option in the `x-ui` menu or a reverse proxy via nginx), and in `ufw` open only the port you actually use. The less is exposed to the outside, the smaller the attack surface.
</Warning>

## Basic setup: VLESS + Reality

<Steps>
  <Step title="Create an inbound">
    In the panel, open the Inbounds section and add a new one. Choose the VLESS protocol and the Reality security type — a solid default that's hard to tell apart from ordinary HTTPS traffic.
  </Step>

  <Step title="Add a client">
    Inside the inbound, set up a user (client). If you like, give them a traffic limit and an expiry date.
  </Step>

  <Step title="Hand out the link or QR">
    The panel generates a connection string and a QR code. Pass them to whoever will be connecting.
  </Step>

  <Step title="Connect from the app">
    The string or QR is pasted into a client app: **v2rayNG** (Android), **NekoBox** (Android/Windows), **Hiddify** (cross-platform). Import the link — and the connection is ready.
  </Step>
</Steps>

***

Lumi handles the server and network; software setup is on you. Network or port issues — message [@lumisup\_robot](https://t.me/lumisup_robot).

## Where to next

<CardGroup cols={2}>
  <Card title="Marzban" icon="layer-group" href="/en/vps/marzban">
    A multi-user panel with subscriptions.
  </Card>

  <Card title="SSL certificate" icon="certificate" href="/en/vps/ssl">
    Add HTTPS to the panel via a domain.
  </Card>
</CardGroup>
