
Deploy Convex | (Just Updated) Firebase Alternative, HTTP Actions on HTTPS, Admin Key in Logs
Convex backend and dashboard. HTTPS HTTP actions, data kept on a volume
site
Just deployed
Just deployed
/convex/data
dashboard
Just deployed
Deploy and Host Convex on Railway
Convex is an open-source reactive backend: a database, server functions written in TypeScript, file storage, scheduled jobs and live queries that push updates to every connected client. This template runs the official self-hosted Convex backend and dashboard images (pinned by digest) as three Railway services, with the database on a Railway volume.
About Hosting Convex
- Three services, one deploy.
convexis the backend (API and WebSocket sync),siteis a small HTTPS proxy for HTTP actions, anddashboardis the admin UI. Nothing has to be typed into the deploy form. - HTTP actions get a real HTTPS URL. Convex serves HTTP actions, webhooks and auth callbacks (Convex Auth,
OAuth redirects) from a second port. The
siteservice puts that port on its own public Railway domain andCONVEX_SITE_ORIGINpoints at it, so callbacks work without any extra setup. - Data survives redeploys. SQLite and file storage live on a Railway volume mounted at
/convex/data. The instance secret is generated per deploy and stored on the volume with the instance credentials. - Admin key in the deploy log. Every boot, the
convexservice prints a line starting with[railway] DASHBOARD ADMIN KEY:. Open the service's Deploy Logs, copy the key and paste it into the dashboard login. - Healthchecks. The backend is checked on
/version, the proxy on/railway_health, the dashboard on/.
Getting started
- Deploy the template and wait for all three services to go green.
- Open the
dashboardservice domain. Enter theconvexservice domain as the deployment URL if asked, and the admin key from theconvexdeploy logs. - In your project, set these two values (for example in
.env.local) and runnpx convex devornpx convex deploy:
CONVEX_SELF_HOSTED_URL=https://
CONVEX_SELF_HOSTED_ADMIN_KEY=
- Point your client at the same URL:
new ConvexReactClient("https://"). HTTP actions are served athttps://.
Common Use Cases
- A self-hosted backend for a React, Next.js or mobile app that needs live, reactive queries
- Backend for AI and vibe-coding projects that already target the Convex API
- Webhook receivers and OAuth callbacks through Convex HTTP actions
- Keeping app data on infrastructure you control instead of the Convex cloud
Dependencies for Convex Hosting
- One Railway volume on the
convexservice (created by the template)
Deployment Dependencies
- Self-hosting guide: https://github.com/get-convex/convex-backend/tree/main/self-hosted
- Convex documentation: https://docs.convex.dev/
- Backend image: https://github.com/get-convex/convex-backend/pkgs/container/convex-backend
- Dashboard image: https://github.com/get-convex/convex-backend/pkgs/container/convex-dashboard
Implementation Details
| Variable | Service | Purpose |
|---|---|---|
INSTANCE_SECRET | convex | 64 hex characters, generated per deploy. The admin key is derived from it, so do not change it after first boot. |
CONVEX_CLOUD_ORIGIN | convex | Public HTTPS URL of the backend, used in storage URLs and callbacks. |
CONVEX_SITE_ORIGIN | convex | Public HTTPS URL of the site service, used for HTTP actions. |
BACKEND_HOST | site | Private address of the backend that the proxy forwards to. |
NEXT_PUBLIC_DEPLOYMENT_URL | dashboard | Backend URL the dashboard connects to. |
Why Deploy Convex 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 Convex 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