Marzgah CLI
Set up and administer a self-hosted Marzgah VPN reseller panel. Requires Bun 1.4.4 or newer; npm distributes this package, but the executable runs on Bun.
Create a panel
bunx @begyoupardon/marzgah init my-panel
The CLI creates a complete project from the template bundled with this release, installs its dependencies, and starts the interactive setup wizard. It refuses to overwrite a non-empty directory. Setup supports Bun directly, Docker, and Cloudflare configuration instructions. Docker and Cloudflare require their respective tools/accounts.
To create files without installing dependencies, contacting your VPN backend, or requesting credentials:
bunx @begyoupardon/marzgah init my-panel --scaffold-only
cd my-panel
bun install --frozen-lockfile
bun run cli init
Inside an existing generated project, init with no directory runs the configuration wizard.
Administer a panel
Run commands from the panel's directory, where its .env and data live:
cd my-panel
bunx @begyoupardon/marzgah doctor
bunx @begyoupardon/marzgah migrate
bunx @begyoupardon/marzgah create-admin
bunx @begyoupardon/marzgah reset-password
bunx @begyoupardon/marzgah backup --out ./backups/manual.db
Stop the panel before restoring a backup:
bunx @begyoupardon/marzgah restore ./backups/manual.db
Database administration commands operate on local SQLite. Cloudflare D1 migrations use Wrangler as described by the setup wizard. DATABASE_PATH defaults to ./data/panel.db; relative paths are resolved from the current directory. The package ships its own migrations, with MIGRATIONS_DIR available as an explicit override. Environment variables take precedence over .env values. Use the CLI version matching your panel release when managing its database.
For repeated use, install the command with bun add --global @begyoupardon/marzgah, then run marzgah --help.
Source and licensing
Source and issues: https://github.com/begyoupardon/marzgah
Application code currently has no open-source license (UNLICENSED); no license grant is implied. Third-party dependency licenses remain applicable. The bundled Arad font's SIL Open Font License is retained under public/licenses/Arad-OFL.txt in generated projects. Poppins is installed locally through its Fontsource package.