LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

marzban-cli

CLI for Marzban proxy panel administration

TLDR

List the administrators
$ marzban cli admin list
copy
Create an administrator
$ marzban cli admin create --username [username]
copy
Change an administrator's details
$ marzban cli admin update --username [username]
copy
Delete an administrator
$ marzban cli admin delete --username [username]
copy
Import the administrator defined in the environment file
$ marzban cli admin import-from-env
copy
List the users
$ marzban cli user list
copy
Move a user to a different administrator
$ marzban cli user set-owner --username [username] --owner [owner]
copy
Print a user's subscription link
$ marzban cli subscription get-link --username [username]
copy
Generate the client configuration in a chosen format
$ marzban cli subscription get-config --username [username] --format [v2ray]
copy
Print the shell completion script
$ marzban cli completion show [bash]
copy
Install shell completion
$ marzban cli completion install [bash]
copy

SYNOPSIS

marzban cli [OPTIONS] COMMAND [ARGS]...

DESCRIPTION

marzban cli is the command-line interface for [Marzban](https://github.com/Gozargah/Marzban), an open-source proxy management panel built around Xray. It manages administrators, users, and subscription payloads without using the web UI.Admin passwords can be supplied non-interactively via `MARZBANADMINPASSWORD`. `admin import-from-env` creates a sudo admin from `SUDOUSERNAME`/`SUDOPASSWORD` and attaches unowned users to it.

PARAMETERS

admin

Manage panel administrators (`create`, `delete`, `list`, `update`, `import-from-env`)
user
Manage users (`list`, `set-owner`)
subscription
Subscription helpers (`get-config`, `get-link`)
completion
Generate or install shell completion scripts
admin create -u username
Create an admin; optional `--sudo`, `-tg`/`--telegram-id`, `-dc`/`--discord-webhook`
user list
List users; filter with `-u`, `-s`/`--search`, `--status`, `--admin`/`--owner`
subscription get-config -u username -f {v2ray|clash}
Generate subscription config; optional `-o`/`--output` and `--base64`
subscription get-link -u username
Print subscription URL (requires `XRAYSUBSCRIPTIONURL_PREFIX`)

CAVEATS

Requires a working Marzban installation and database access (typically run on the panel host). `subscription get-link` needs `XRAYSUBSCRIPTIONURL_PREFIX` set correctly. `admin update` is interactive only.

HISTORY

Part of Marzban, a Python-based multi-protocol proxy panel by Gozargah.

SEE ALSO

curl(1), docker(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid