Marzban README

The project's README from github.com/x4gpanell/Marzban. As one markdown file: README.md.

🚀 Marzban Panel روی Railway (روش PasarGuard)

این ریپازیتوری دقیقاً به همان روش ریپازیتوری PasarGuard ساخته شده: به‌جای اینکه سورس Marzban را داخل ریپو کپی (vendor) کنیم، Dockerfile در لحظه‌ی build خودش سورس رسمی را از Gozargah/Marzban کلون می‌کند، داشبورد را می‌سازد، Xray را نصب می‌کند و ایمیج نهایی را می‌سازد.

مزیت این روش نسبت به کپی‌کردن سورس داخل ریپو:

نصب

  1. این ریپو را در گیت‌هاب خودتان Fork کنید.

  2. در Railway: New Project → Deploy from GitHub Repo و ریپوی فورک‌شده را انتخاب کنید.

  3. صبر کنید تا Build تمام شود (به‌خاطر build گرفتن از داشبورد، کمی طول می‌کشد).

  4. (اختیاری ولی پیشنهادی) در تب Variables این دو متغیر را اضافه کنید تا اولین ادمین به‌صورت خودکار ساخته شود:

    • SUDO_USERNAME
    • SUDO_PASSWORD

    اگر تنظیم نکنید، بعداً از Console سرویس همین دستور را بزنید:

    marzban-cli admin create --sudo
    
  5. دیتابیس پیش‌فرض SQLite است. اگر می‌خواهید از Postgres پلاگین Railway استفاده کنید، متغیر SQLALCHEMY_DATABASE_URL را در Variables ست کنید.

نکات

Marzban (x4gpanell/Marzban)

paas
Searching Database…

What is this?This is a Railway deployment template for the Marzban VPN panel (an Xray-based proxy management dashboard). The Dockerfile clones the official Marzban source from Gozargah/Marzban at build time instead of vendoring it, builds the dashboard, installs Xray, and produces the final image.
Is this a fork of Marzban, or just a deployment wrapper?It is only a thin deployment wrapper, built the same way as the PasarGuard repo: no app source is copied into this repo, the Dockerfile fetches it fresh from upstream on every build.
How do I deploy this?Fork this repository on GitHub, then in Railway create a New Project and choose 'Deploy from GitHub Repo', selecting your fork. Wait for the build to finish (it takes a bit since it also builds the dashboard).
Do I need anything set up before deploying?You need a Railway account to deploy. Optionally set the SUDOUSERNAME and SUDOPASSWORD variables in Railway's Variables tab so the first admin account is created automatically; otherwise you create it later from the service console.
What about the database and port configuration?The default database is SQLite; to use Railway's Postgres plugin instead, set the SQLALCHEMYDATABASEURL variable. The listening port is injected automatically by Railway via $PORT, so no manual port setup is needed.
What is Marzban?Marzban is a web-based panel for managing Xray proxy/VPN users and configurations, built by Gozargah; this repo just packages it for one-click Railway hosting.
Why clone the source at build time instead of copying it into the repo?Cloning at build time means you always get the latest Marzban release with no stale files, keeps this repo's size tiny, and makes updating as simple as redeploying on Railway.
Can I pin a specific Marzban version?Yes, add a MARZBANREF build argument in railway.toml or your Build settings to pin the cloned branch/tag; it defaults to master.
Does this include Xray itself?Yes, the Dockerfile installs Xray as part of the image build alongside the Marzban dashboard.
Creator
x4gpanell
Size
<0.1 MB
Stars
190
Updated
CommitAug 23
Age
1mo
Commits · 90 Days