Convex
Self-hosted Convex: the reactive backend (database + functions + scheduler) with its dashboard, on your infrastructure.
One-click deploy, from $25/mo on a Miget plan.
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.
Upstream project: Convex
#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
#topology
| 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 |
#miget sizing
// this stack needs
2.8 GiB RAM · 10 GB disk · 4 services
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.
Hobby - recommended fit
$25/mo
2 vCPU · 4 GiB · 80 GiB disk
Headroom for your own apps: 8 GiB at $49/mo
Professional - production
$43/mo
2 vCPU · 4 GiB · 25 GiB disk
Dedicated resources, production SLOs - plan details
One Miget plan is a fixed pool of compute - the whole stack (managed databases included) deploys inside it, and anything left over runs your other apps. No per-service or per-seat math.
#vs. the managed service
What the hosted equivalents charge, against the flat Miget plan this stack fits on. Prices as of June 2026, sources linked.
| Service | Plan | Monthly | What you get |
|---|---|---|---|
| Convex on Miget ★ | 4 GiB plan | $25 | this whole stack, flat - no usage meters, and room left for your own apps |
| Convex Cloud | Professional | ~$25 | per developer/mo - 25M function calls, 50 GB storage included, overages metered |
#vs. other PaaS
Estimated monthly cost of running this exact stack (2.8 GiB RAM, 10 GB disk, 4 containers) elsewhere, from published June 2026 rates.
| Platform | Est. monthly | Notes |
|---|---|---|
| Miget ★ | $25 flat | compose stacks first-class: one deploy, dedicated vCPU, managed Postgres/Valkey, volumes and TLS all included in the plan |
| Heroku | ~$138 | no volumes; nothing between 1 GB ($50) and 2.5 GB ($250) dynos - 2 GB containers cost far more than shown |
| DO App Platform | ~$38 | no persistent volumes - stateful containers need managed DBs/Spaces (base $5 Spaces included here) |
| Render | ~$37 | per-service instances (0.5 GB $7, 2 GB $25) - every container is its own paid service |
| Railway | ~$29 | usage-based ($10/GB RAM-mo); vCPU billed separately at $20/vCPU-mo on top |
| Fly.io | ~$18 | cheapest sticker price - but burstable shared CPUs (1/16 core; dedicated vCPUs cost ~2-3×), no compose deploys (one app per container, manual wiring), managed DBs billed extra |
Estimates assume RAM fully allocated at published on-demand rates - and sticker price isn't the whole comparison: the cheaper rows buy burstable shared CPUs, per-service wiring instead of a compose deploy, and managed databases billed separately. Heroku and DO App Platform have no persistent volumes at all - stateful stacks like this one need workarounds there.
#deploy it
On Miget
- Create a Compose Stack in app.miget.com pointing at the templates repository
- Set the stack path to
convex -
Set the required variable:
CONVEX_CLOUD_ORIGIN / CONVEX_SITE_ORIGIN, set to the api and site https domains after first deploy
- Deploy. Miget layers
compose.miget.yaml(RAM, privacy, volumes, managed services) automatically
Locally first?
Every template is portable, vanilla Docker Compose - the Miget overrides are ignored locally:
git clone https://github.com/deployable-sh/stacks
cd miget-compose-templates/convex
docker compose up -d Same files, same behavior. The template README covers connection strings and scaling notes.
#faq
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 ($25/dev/month on Pro). Self-hosting trades those for a flat infrastructure price 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.
Ship Convex today
One compose stack, 2.8 GiB of RAM, from $25/month flat, and it runs on your laptop with the same files.