Hasura
Instant GraphQL over Postgres - queries, mutations, live subscriptions - stateless and Apache-2.0.
One-click deploy, from $13/mo on a Miget plan.
Hasura’s trick still lands a decade in: point it at Postgres, track your tables, and you have a production GraphQL API - queries, mutations, and live subscriptions - with row-level permissions, remote schemas, and event triggers. No resolvers written, no N+1 hand-wringing.
This template ships v2 CE deliberately: it is the Apache-2.0, self-hosted product - one stateless container on the managed Postgres (metadata and default source in one URL). Hasura’s newer DDN/v3 is cloud-first and priced per active model, which makes the v2-self-host math pointed: a 30-table API with traffic costs $150/month there and $13 here.
It completes the backend lane: Postgres-native like the supabase template, but as a layer over databases you already have - including, by service name, every Postgres-family stack in your project.
Upstream project: Hasura v2 CE
#what you get
- Instant GraphQL: queries, mutations, live subscriptions
- Row-level permissions; JWT auth wires to the catalogue’s IdPs
- Event triggers and scheduled triggers to webhooks
- Remote schemas and multiple database sources
- Stateless single container, /healthz, Apache-2.0
- Console gated by the admin secret
#topology
| Service | Role | Public |
|---|---|---|
| hasura | GraphQL engine + console (:5000) | yes (admin secret) |
| db | Postgres - managed service on Miget, container locally | no |
#miget sizing
// this stack needs
2 GiB RAM · 5 GB disk · 2 services
1 GiB suits real APIs; heavy subscription fan-out is the dimension that grows it. Everything persistent is in Postgres.
Hobby - recommended fit
$13/mo
1 vCPU · 2 GiB · 50 GiB disk
Headroom for your own apps: 2 GiB at $19/mo
Professional - production
$22/mo
1 vCPU · 2 GiB · 10 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 |
|---|---|---|---|
| Hasura on Miget ★ | 2 GiB plan | $13 | this whole stack, flat - no usage meters, and room left for your own apps |
| Hasura DDN | Base | ~$150 | $5 per active model/mo - a 30-table API with traffic costs $150/mo |
v2 CE self-hosted has no per-model arithmetic; DDN is the cloud-first v3 product.
#vs. other PaaS
Estimated monthly cost of running this exact stack (2 GiB RAM, 5 GB disk, 2 containers) elsewhere, from published June 2026 rates.
| Platform | Est. monthly | Notes |
|---|---|---|
| Miget ★ | $13 flat | compose stacks first-class: one deploy, dedicated vCPU, managed Postgres/Valkey, volumes and TLS all included in the plan |
| Heroku | ~$100 | no volumes; nothing between 1 GB ($50) and 2.5 GB ($250) dynos - 2 GB containers cost far more than shown |
| DO App Platform | ~$29 | no persistent volumes - stateful containers need managed DBs/Spaces (base $5 Spaces included here) |
| Render | ~$26 | per-service instances (0.5 GB $7, 2 GB $25) - every container is its own paid service |
| Railway | ~$21 | usage-based ($10/GB RAM-mo); vCPU billed separately at $20/vCPU-mo on top |
| Fly.io | ~$13 | 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
hasura -
Set the required variable:
HASURA_ADMIN_SECRET, gates the console and admin APIs
- 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/hasura
docker compose up -d Same files, same behavior. The template README covers connection strings and scaling notes.
#faq
Why v2 instead of Hasura DDN (v3)?
v2 CE is the self-hosted, Apache-2.0 product with years of production mileage; DDN is the cloud-first successor priced at $5 per active model per month - real money for any non-trivial schema. When DDN’s self-host story matures, the calculus gets revisited; today v2 is the honest ship.
How do clients authenticate?
The admin secret is for you; clients use JWTs via HASURA_GRAPHQL_JWT_SECRET - and every IdP in this catalogue (keycloak, authentik, zitadel, logto) issues compatible tokens with role claims for row-level permissions.
Can it expose databases other than its own?
Yes - add sources from the console: other Postgres instances in the project by service name (timescaledb included), each with its own permission rules, unified under one GraphQL endpoint.
Ship Hasura today
One compose stack, 2 GiB of RAM, from $13/month flat, and it runs on your laptop with the same files.