Skip to main content
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.
Commands are current as of writing. Before installing, check the official repos Gozargah/Marzban and Marzban-scripts — the script and panel commands get updated.

Marzban or 3X-UI

Both are panels over Xray. 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

1

Run the official script

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).
2

Create an administrator

Set up a sudo admin to log in to the panel:
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.
3

Check the status

marzban status
You should see active (running).
4

Open the port in the firewall

ufw allow 8000/tcp
Plus the ports your inbounds run on. More on the firewall: Firewall (ufw).

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).
To quickly peek into the panel without a domain, use SSH port forwarding from your local machine:
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.
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.

First user

1

Log in to the dashboard

Open the panel at your domain and log in with the admin credentials from the step above.
2

Create a user

Add a new user and, if you like, set a traffic limit and an expiry date.
3

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.

Lumi handles the server and network; software setup is on you. Network or port issues — message @lumisup_robot.

Where to next

3X-UI

A simpler Xray panel — for a small number of connections.

SSL certificate

Connect HTTPS to the dashboard via a domain.