> ## 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.

# Marzban

> Multi-protocol VPN panel

Marzban is a panel on top of Xray for serving access to many users. Each user is issued a subscription link: a single link holds all of their configs and updates on the fly. Commands are for Ubuntu/Debian, as root.

<Note>
  Commands are current as of writing. Before installing, check the official repos [Gozargah/Marzban](https://github.com/Gozargah/Marzban) and [Marzban-scripts](https://github.com/Gozargah/Marzban-scripts) — the script and panel commands get updated.
</Note>

## Marzban or 3X-UI

Both are panels over Xray. [3X-UI](/en/vps/3x-ui) is simpler when you have few connections and manage them by hand. Marzban is more powerful for multi-user setups: user management, limits, expiry dates, and — most importantly — subscription links instead of handing out each config by hand.

## What you'll need

* A Lumi server (`@lumivps_bot`) — even a base VPS-0 works. The default OS is **Ubuntu 22.04**.
* The IP, login (`root`) and password from the server card in the bot — that's how you connect over SSH.
* For the dashboard to work properly — a domain and SSL (the panel won't open on a bare IP).

## Installation

<Steps>
  <Step title="Run the official script">
    ```bash theme={"system"}
    sudo bash -c "$(curl -sL https://github.com/Gozargah/Marzban-scripts/raw/master/marzban.sh)" @ install
    ```

    The script downloads and runs Marzban. After installation, a `marzban` management command appears (status, logs, restart).
  </Step>

  <Step title="Create an administrator">
    Set up a sudo admin to log in to the panel:

    ```bash theme={"system"}
    marzban cli admin create --sudo
    ```

    The command will ask for a username and password — these are what you'll use to log in to the dashboard.
  </Step>

  <Step title="Check the status">
    ```bash theme={"system"}
    marzban status
    ```

    You should see `active (running)`.
  </Step>

  <Step title="Open the port in the firewall">
    ```bash theme={"system"}
    ufw allow 8000/tcp
    ```

    Plus the ports your inbounds run on. More on the firewall: [Firewall (ufw)](/en/vps/firewall).
  </Step>
</Steps>

## Accessing the panel

The dashboard runs on port `8000` by default, at `http://YOUR_DOMAIN:8000/dashboard/` (HTTPS — after setting up SSL, see [/en/vps/ssl](/en/vps/ssl)).

<Note>
  To quickly peek into the panel without a domain, use SSH port forwarding from your local machine:

  ```bash theme={"system"}
  ssh -L 8000:localhost:8000 root@SERVER_IP
  ```

  After that, open `http://localhost:8000/dashboard/` in your browser. This is for checking only — for ongoing use, set up a domain and SSL.
</Note>

<Warning>
  For security, the Marzban dashboard doesn't open on a bare IP — it needs a domain with SSL. Get a certificate (for example, via Let's Encrypt) and set the paths in the `UVICORN_SSL_CERTFILE` and `UVICORN_SSL_KEYFILE` variables, or put the panel behind a reverse proxy (nginx). Instructions are in the official Marzban documentation.
</Warning>

## First user

<Steps>
  <Step title="Log in to the dashboard">
    Open the panel at your domain and log in with the admin credentials from the step above.
  </Step>

  <Step title="Create a user">
    Add a new user and, if you like, set a traffic limit and an expiry date.
  </Step>

  <Step title="Hand out the subscription">
    Copy the user's subscription link and pass it to them. It's pasted into a client app (**v2rayNG**, **NekoBox**, **Hiddify**) — the configs are pulled in automatically and update on their own.
  </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="3X-UI" icon="gauge-high" href="/en/vps/3x-ui">
    A simpler Xray panel — for a small number of connections.
  </Card>

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