The self-hosted Neon alternative — database branching for Postgres, on infrastructure you own.
Copy-on-write branches of your real database — AWS, GCP, Azure, or your laptop's Docker — ready in seconds.
Documentation · Quickstart · Example app
The bundled console (tendb console) — branches, SQL editor, snapshots, and alerts on localhost.
Prereqs: Node ≥ 20, Terraform ≥ 1.11, and Docker (macOS: also Homebrew — the preflight builds a small colima VM, since Docker Desktop's kernel has no ZFS; Linux runs it natively).
npm install -g @10play/tendb
tendb init --platform local # scaffold terraform + tendb.json into your project
tendb up # ZFS/Docker preflight + terraform apply + config wiring
tendb branches create my-feature # copy-on-write branch DB, ready in ~5s
tendb psql my-feature # poke around; production never noticesThe same flow takes you to production: tendb init --platform aws points at
your own cloud account instead — see the
AWS quickstart,
or the GCP and
Azure platform guides.
One host — an EC2 instance, a cloud VM, or Docker containers on your laptop — runs DBLab Engine on ZFS. It syncs from your source Postgres (Neon, Aurora, RDS, anything with a URL) and serves copy-on-write clones: every branch is a real, writable Postgres that costs only the disk pages you change and appears in seconds, at any database size.
tendb branches create my-feature— a disposable, writable copy of production-shaped data.tendb ci ensure "$PR" | tail -1— a preview database per pull request, one line of CI.tendb migrate --scratch -- npm run migrate— rehearse a migration on an ephemeral branch that cleans up after itself; the real data is untouched.tendb console— a Neon-style dashboard (branches, SQL editor, snapshots, alerts) on localhost.
Your data never leaves your infrastructure: no SaaS, no control plane, no third party. The CLI reaches the host over each platform's native tunnel (SSM on AWS, IAP on GCP, Bastion on Azure, loopback locally) — no SSH, no open database ports.
A pnpm monorepo; the product lives in packages/tendb/:
| Path | What it is |
|---|---|
packages/tendb/terraform/ |
Per-platform engine/network/console modules behind one engine contract |
packages/tendb/cli/ |
The @10play/tendb CLI + bundled web console |
packages/tendb/snapshotd/ |
The on-host snapshot/schema executor |
apps/docs/ |
The documentation site (live) |
apps/example/ |
A runnable local-platform example: scaffold, branch, migrate, query |
Developing locally: pnpm install, then pnpm docs:dev for the docs site and
pnpm --filter @10play/tendb test for the CLI. See
packages/tendb/README.md for architecture,
sizing, and the CI contract.
tendb is built on DBLab Engine (Database Lab Engine) by Postgres.ai — the open-source engine that does the heavy lifting: ZFS thin cloning and copy-on-write branch databases. tendb adds the platform packaging around it (Terraform provisioning for AWS/GCP/Azure/local, tunnel transports, the CLI, the web console, and the CI contract).