---
title: "Deploy Convex Backend"
description: "Self-hosted Convex reactive database and backend"
category: "Other"
url: https://railway.com/deploy/convex-backend-1
---

# Deploy Convex Backend

Self-hosted Convex reactive database and backend

**[Deploy Convex Backend on Railway](https://railway.com/template/convex-backend-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/convex-backend-1/manifest.json

- **Creator:** zer0person's Projects
- **Category:** Other
- **Total deploys:** 1

## Template content

### Convex Backend

- **Image:** ghcr.io/convex/convex-backend:latest
- **Start command:** `sh -c 'cd /convex; echo "CONVEX ADMIN KEY: $(./generate_admin_key.sh | tail -n 1)"; exec ./run_backend.sh'`
- **Public domain:** Yes

## Documentation

# Deploy and Host Convex Backend on Railway

[Convex Backend](https://github.com/get-convex/convex-backend) is the open-source reactive database and backend behind Convex, with queries, mutations, actions, file storage and search.

## About Hosting Convex Backend

This template runs the official `ghcr.io/convex/convex-backend:latest` image with SQLite storage on a persistent volume at `/convex/data`. A random instance secret is generated, and an admin key derived from it is printed in the deploy logs on every start (search for `CONVEX ADMIN KEY`). Set `CONVEX_SELF_HOSTED_URL` to your public URL and `CONVEX_SELF_HOSTED_ADMIN_KEY` to that key in your Convex project, then run `npx convex dev`. The dashboard is a separate image and is not included.

## Common Use Cases

- Self-host the Convex backend for your app
- Real-time reactive queries with TypeScript functions
- Keep data and file storage on infrastructure you control

## Dependencies for Convex Backend Hosting

- One service with a volume; nothing else

### Deployment Dependencies

- [Convex Backend on GitHub](https://github.com/get-convex/convex-backend)
- [Docker image](https://github.com/get-convex/convex-backend/pkgs/container/convex-backend)

## Why Deploy Convex Backend on Railway?

Railway gives you a public HTTPS URL, persistent storage where needed and automatic restarts with no server to maintain. Keep the admin key from the deploy logs private.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/convex-backend-1
