What is Convex?
Convex inverts the usual backend: you write TypeScript queries and mutations, and every client subscribed to a query updates automatically when its data changes - reactive end to end, with no cache invalidation code. The backend is open source, and this template runs it self-hosted with the dashboard.
The topology has a quirk worth knowing: one Convex process serves two origins (the client API and HTTP actions), and each platform app publishes exactly one port - so two slim nginx proxies (api and site) front the private backend, plus the dashboard as a third public app. State lives in SQLite on a 10 GB volume.
After first deploy, set CONVEX_CLOUD_ORIGIN and CONVEX_SITE_ORIGIN to the api and site apps’ https domains and redeploy - then point your Convex CLI and clients at your own deployment.
What you get
- Reactive queries: subscribed clients update automatically on writes
- TypeScript server functions with transactional guarantees
- Built-in scheduler and cron functions
- Web dashboard (admin-key login) for data, functions, and logs
- Open-source backend serving one deployment - yours
- SQLite state on a persistent volume
How it runs on Lyngbak
| Service | Role | Public |
|---|---|---|
backend | Convex backend (API :3210, HTTP actions :3211) | no |
api | nginx → backend:3210 - client/deploy origin | yes |
site | nginx → backend:3211 - HTTP actions origin | yes |
dashboard | web dashboard (admin-key login) | yes |
Before you deploy
CONVEX_CLOUD_ORIGIN / CONVEX_SITE_ORIGINset to the api and site https domains after first deploy
Sizing and billing
2 GiB for the backend, slivers for the proxies, 512 MiB for the dashboard. The open-source backend serves a single deployment - one stack per project/environment.
A resource is a flat monthly price, with RAM and disk add-ons when the stack needs a little more than a tier, and room for your own apps on a larger one. On Usage Billing each service takes the smallest size that fits it and is billed by the second it runs, so a stopped stack stops costing CPU and RAM. Its 9.77 GiB of volumes cost $0.15 per GiB a month ($1.47/mo) for as long as they exist. One workspace can use both. See pricing
Compared with the managed service
| Service | Plan | Price | Includes |
|---|---|---|---|
| Convex Cloud | Professional | $25/mo | per developer/mo - 25M function calls, 50 GB storage included, overages metered |
Prices from each vendor's pricing page, June 2026.
Run it locally first
The same compose file runs with plain Docker Compose. Clone the template source, copy .env.example to .env, and run docker compose up -d.
Questions
Is self-hosted Convex the same as Convex Cloud?
The core engine is: reactive queries, mutations, actions, scheduler, dashboard. Cloud adds multi-deployment management, preview deploys, and operational SLAs, priced per developer on Pro. Self-hosting trades those for an infrastructure-only bill and full data ownership.
Why does this template have nginx proxies?
Convex serves two origins (client API and HTTP actions) from one process, and each platform app exposes exactly one public port - so api and site are thin nginx apps fronting the private backend. It is wiring, not architecture.
How do I deploy my Convex functions to it?
Generate an admin key (the backend image ships generate_admin_key.sh), then use the Convex CLI with CONVEX_SELF_HOSTED_URL pointing at your api domain and the admin key as credentials. The dashboard logs in with the same key.
Why is this marked experimental?
The multi-origin proxy design is young and upstream self-hosting evolves quickly. It works for development and small production; validate carefully before betting a critical app on it.