Skip to content

Marzban on a VPS

Xray management panel

Category
VPN / Proxy
Hosting
VPN server
Author
Gozargah
License
AGPL-3.0
Version
0.8.4

The script is free · VPS from $2.79 per month · installs in about 2 minutes

Install over SSH

root@vps:~# sudo bash -c "$(curl -sL https://github.com/Gozargah/Marzban-scripts/raw/master/marzban.sh)" @ install

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/Gozargah/Marzbanok
  • Version0.8.4ok
  • Port8000/tcplisten
  • Port1080/tcp/udplisten
  • Port443/tcplisten

✓ Marzban 0.8.4 installed · about 2 minutes

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • Xray
  • VLESS
  • REALITY
  • Subscriptions
  • Telegram bot

Marzban is a web panel for managing an Xray-based proxy server. Use it to create users, hand out subscription links and track traffic without editing Xray configs by hand.

The panel supports VMess, VLESS, Trojan and Shadowsocks, including TLS and REALITY. Each user has a traffic limit and an expiry date, and subscriptions open in V2rayNG, Sing-box, Nekoray, Clash and other clients.

On your own VPS the panel is handy if you sell VPN access or share it with a team: manage everything from the browser, the REST API or the built-in Telegram bot, and spread the load across multiple servers with Marzban Node.

  • VMess, VLESS, Trojan and Shadowsocks protocols with TLS and REALITY support
  • Traffic and time limits, including periodic ones (day, week, month)
  • Subscription links for V2Ray clients, Sing-box and Clash, plus QR codes
  • Multiple servers via Marzban Node
  • REST API, built-in Telegram bot and CLI
  • Traffic statistics and server monitoring

Recommended plan

For Marzban: at least 1 vCPU, 2 GB RAM and 10 GB NVMe.

Minimum to run
1 vCPU · 1 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 12

How to install

Three steps in the bot or one command over SSH; installation takes about 2 minutes.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Marzban

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Create an admin

    marzban cli admin create --sudo

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 12.

Install command
sudo bash -c "$(curl -sL https://github.com/Gozargah/Marzban-scripts/raw/master/marzban.sh)" @ install

Ports

Marzban ports
PortProtocolPurpose
8000tcpWeb panel (/dashboard/), API and subscriptions
1080tcp/udpShadowsocks inbound from the default Xray config
443tcpTypically used for VLESS REALITY or TLS (configurable)

After installation

  1. 1.Create an admin: marzban cli admin create --sudo
  2. 2.The panel is not accessible by IP: issue an SSL certificate for your domain and open https://your-domain:8000/dashboard/
  3. 3.For a quick check without a domain, forward the port with ssh -L 8000:localhost:8000 root@IP and open http://localhost:8000/dashboard/
  4. 4.Configure inbounds under Core Settings or in /var/lib/marzban/xray_config.json

Marzban FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

How many users can the plan handle?

The panel itself is lightweight; the bottleneck is bandwidth and CPU for encryption. 1 vCPU and 2 GB RAM is enough to start and for a few dozen active users. As you grow, add another server via Marzban Node.

How do I update Marzban?

Run marzban update. It pulls the new images and restarts the containers; user data is preserved.

Where is the data stored?

Application files are in /opt/marzban, settings in /opt/marzban/.env, and the database and Xray config in /var/lib/marzban. For backups there is marzban backup.

Can I use MySQL instead of SQLite?

Yes: add --database mysql or --database mariadb to the install command.

Marzban installs at checkout — in the bot.