Railway

Deploy self-hosted Panel

A self-hosted subscription panel for VLESS over WebSocket + TLS. Single

Deploy self-hosted Panel

Just deployed

/data/

Deploy and Host self-hosted Panel on Railway

SE7O-SNA Panel is a single-file, self-hosted subscription management panel for VLESS over WebSocket and TLS. Built with FastAPI, it bundles the backend, REST API, and web dashboard into one main.py file, with SQLite or PostgreSQL storage. It handles inbound lifecycle, per-user quotas, live traffic analytics, and Telegram alerts.

About Hosting self-hosted Panel

Hosting self-hosted Panel means running one Python process that terminates WebSocket connections and serves an authenticated dashboard. The container listens on the port Railway injects, so no reverse proxy or build pipeline is needed.

Why Deploy

The main operational concerns are state and secrets. The SQLite database must live on a volume mounted at /data, or be replaced by an external PostgreSQL instance through DATABASE_URL, otherwise data is lost on redeploy. You also set an admin username, a strong password, and a stable SECRET_KEY. If the key is left unset, a fresh one is generated on every restart and all sessions are invalidated. Background tasks flush traffic counters and disable expired inbounds automatically.

Common Use Cases

  • Running a private WebSocket tunnel for your own devices with a dashboard instead of hand-edited config files
  • Managing time-limited or quota-limited access for a small group, with automatic expiry and usage caps
  • Self-hosting a lab deployment to study VLESS transport, subscription link generation, and real-time traffic accounting

Dependencies for self-hosted Panel Hosting

  • Python 3.11 runtime, provided by the included Dockerfile which Railway detects and builds automatically
  • A persistent volume mounted at /data for the SQLite database, or an external PostgreSQL database referenced by DATABASE_URL

Dependencies for railway

Deployment Dependencies

Implementation Details

Configure these variables in the Railway service settings:

ADMIN_USERNAME • Required: Recommended • Example: se7oadmin • Description: Panel login username. Defaults to admin.

ADMIN_PASSWORD • Required: Yes • Example: StrongPass!123 • Description: Login password. Minimum 8 characters with upper case, lower case, and a digit.

SECRET_KEY • Required: Yes • Example: long random string • Description: Signs JWT session cookies. Must be stable across restarts.

DOMAIN • Required: Recommended • Example: se7o-sna.up.railway.app • Description: Public domain, used to generate correct subscription links.

DB_PATH • Required: Recommended • Example: /data/panel.db • Description: SQLite location. Pair with a volume mounted at /data.

DATABASE_URL • Required: Optional • Example: postgres://user:***@host/db • Description: External PostgreSQL. Overrides DB_PATH when set.

PORT • Required: Optional • Example: 8080 • Description: Railway injects this automatically. The app defaults to 8080.

The application selects its storage backend at startup: when DATABASE_URL is present it uses an asyncpg connection pool against PostgreSQL, otherwise it falls back to aiosqlite with WAL journal mode at DB_PATH.

After deploying, attach a volume at /data, then open your public URL at /panel and sign in with ADMIN_USERNAME and ADMIN_PASSWORD. Both credentials can be changed later from Settings. Stored values persist in the database and take precedence over the environment variables. A health endpoint is available at /health for Railway health checks.

Why Deploy self-hosted Panel on Railway? Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying self-hosted Panel on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway


Template Content

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
36
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51