What is Hasura?
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 pays for every active model there, and nothing per model 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.
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
How it runs on Lyngbak
| Service | Role | Public |
|---|---|---|
hasura | GraphQL engine + console (:5000) | yes (admin secret) |
db | Postgres - managed service on Lyngbak, container locally | no |
Before you deploy
HASURA_ADMIN_SECRETgates the console and admin APIs
Sizing and billing
1 GiB suits real APIs; heavy subscription fan-out is the dimension that grows it. Everything persistent is in Postgres.
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 5 GiB of volumes cost $0.15 per GiB a month ($0.75/mo) for as long as they exist. One workspace can use both. See pricing
Compared with the managed service
| Service | Plan | Price | Includes |
|---|---|---|---|
| Hasura DDN | Base | $150/mo | $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. 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
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 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.