# Layerbase capability document

> This document is generated from Layerbase source at request time. It is
> the authoritative, always-current reference for prices, plan limits,
> engines, migration sources, and hostable apps. Read it before quoting any
> of those facts. Do not cache or memorize the numbers below.

## What Layerbase is

Layerbase runs managed cloud databases across many engines with
scale-to-zero: databases sleep when idle and wake on connect in seconds.
One account can host a whole stack (a primary database plus a cache plus a
search index, and more) side by side. Layerbase also ships an official
`layerbase` npm CLI, a desktop app for local databases, a REST API, and a
migration engine that imports from common hosted providers without modifying
the source.

- Marketing site: https://layerbase.com
- Docs: https://layerbase.com/docs
- Pricing: https://layerbase.com/pricing
- Cloud dashboard: https://cloud.layerbase.com

## Plans

Prices are monthly, in US dollars. Database limits are hard caps per plan.
The always-on pool is reserved capacity you allocate across your databases;
the Free plan has none (it uses caps and scale-to-zero only).

### Free ($0/mo)

- Build and branch. Light databases sleep free, wake on connect.
- Databases: up to 2
- Always-on pool: none (caps + scale-to-zero only, never reserved capacity)
- Backups: 1 manual backup slot(s)
- Client certificate (mTLS) auth on Postgres: no

### Solo ($5/mo)

- One database that never sleeps. Perfect for a side project.
- Databases: up to 1
- Always-on pool: 768 MB always-on RAM, 1 vCPU, 10 GB storage
- Backups: 7-day rolling daily backups
- Client certificate (mTLS) auth on Postgres: no

### Pro ($15/mo)

- Your whole stack, always on. Run up to 10 databases in production.
- Databases: up to 10
- Always-on pool: 1536 MB always-on RAM, 1 vCPU, 25 GB storage
- Backups: 30-day rolling daily backups
- Client certificate (mTLS) auth on Postgres: yes
- Free trial: 7 days

### Custom ($0/mo base, then a flat monthly price per dedicated server (see https://layerbase.com/dedicated))

- A private server of your own. One flat monthly price per server, no meters.
- Databases: none in the shared cloud; on your dedicated server, limited only by its memory and storage
- Always-on pool: no shared pool: your dedicated server is the capacity, always on
- Backups: 30-day rolling daily backups
- Client certificate (mTLS) auth on Postgres: yes

### Stackable pool block

- $10/mo per block: +1024 MB always-on RAM, +1 vCPU, +25 GB storage.
- Available on: Pro.

## Engines

Every engine, its category, and where it runs. "Cloud" engines are
creatable on Layerbase Cloud; "desktop-only" engines run through the CLI or
desktop app but are not provisioned in the cloud. "Free-tier" marks engines
a Free-plan account can create; "branchable" marks engines that support
copy-on-write branches per database.

- PostgreSQL (Relational, cloud, free-tier, branchable)
- MySQL (Relational, cloud, branchable)
- MariaDB (Relational, cloud, free-tier, branchable)
- SQLite (Relational, cloud, free-tier, branchable)
- CockroachDB (Relational, desktop-only)
- MongoDB (Document, cloud)
- FerretDB (Document, cloud, branchable)
- CouchDB (Document, cloud)
- SurrealDB (Multi-Model, desktop-only)
- Redis (Key-Value, cloud, free-tier, branchable)
- Valkey (Key-Value, cloud, free-tier, branchable)
- ClickHouse (Analytics, cloud)
- DuckDB (Analytics, cloud, free-tier, branchable)
- Meilisearch (Search, cloud)
- Qdrant (Vector, cloud)
- QuestDB (Time Series, cloud)
- InfluxDB (Time Series, cloud)
- TypeDB (Graph & Knowledge, cloud, free-tier)
- Weaviate (Vector, cloud)
- TigerBeetle (Ledger, cloud)
- LibSQL (Relational, cloud, free-tier, branchable)

## Branching

Copy-on-write branches per database: fork a seeded parent for an instant
seeded copy, reset a branch between runs, and delete it on teardown. This is
the preferred CI primitive where the engine supports it. Branchable engines:

- PostgreSQL, MySQL, MariaDB, Redis, Valkey, FerretDB, libSQL, SQLite, DuckDB

Counting rule: branches have their own per-plan limits and do NOT consume a
database slot. `layerbase cloud ls` and `GET /v1/databases` return branches
in the same flat list as databases, so never report a raw row count as the
account’s database count: a branch row is the one whose `parentId` is set
(`parentName` names its parent). The list response also carries a `counts`
object splitting `primaries` from `branches`.

Guide: https://layerbase.com/docs/cloud/branching

## Migrations

The migration engine imports data from these sources into the matching
Layerbase engine. It reads the source once and never modifies it. Run a
migration from the web flow at https://layerbase.com/cloud/create/from-source.

- Neon -> postgresql
- Supabase -> postgresql
- Render -> postgresql
- Railway -> postgresql, mysql, redis
- Other Postgres -> postgresql
- MySQL -> mysql, mariadb
- MariaDB -> mariadb
- PlanetScale -> mysql, mariadb
- Upstash -> redis, valkey
- Vercel KV -> redis, valkey
- Redis -> redis, valkey
- Valkey -> valkey
- Algolia -> meilisearch
- Turso -> libsql
- Cloudflare D1 -> libsql

## Hostable apps

First-party app workloads Layerbase can host alongside your databases,
each backed by managed storage. App availability can be plan-gated.

- Filmroom: The film room for your product: watch real user sessions with DOM-accurate playback, jump from any error to the session that caused it, and get optional AI reports on where people get stuck. Backed by a managed Postgres you own.
- Secret Store: Store project secrets encrypted at rest with age the server can never decrypt, fetched with curl and decrypted locally, gated by per-environment read tokens with IP allowlists.

## Authentication and the REST API

Programmatic access uses personal API keys. Create one in the dashboard at
https://layerbase.com/cloud/settings under Personal API keys; the `sk_` secret is
shown exactly once. Send it as a Bearer token to the cloud REST API:

```
Authorization: Bearer sk_<your-key>
```

The API base is https://cloud.layerbase.dev. Full endpoint reference (create, list,
query, backup, branch, and API-key management under /v1): https://layerbase.com/docs/api.
Keys are per-control-plane, so a multi-server account’s key works against
its primary server.

## The CLI

The official CLI is the `layerbase` npm package (`npm i -g layerbase`, run as
`layerbase` or `lbase`). It manages local databases with no account and,
once authenticated, your cloud databases too. For headless and CI use, set
`LAYERBASE_API_KEY` in the environment and the CLI talks directly to the
cloud API with no browser login. `layerbase agent init` installs the
Layerbase agent skill into a project (or `--global` into your home config)
and prints an AGENTS.md snippet for other agents. CLI guide: https://layerbase.com/docs/cli.

## CI/CD patterns

For a fresh isolated database per pipeline run:

1. Create a personal API key in the dashboard and store it as a repository
   secret named `LAYERBASE_API_KEY`.
2. Create a transient database with a TTL so a crashed run cannot strand it:
   pass `--ttl 2h` to `layerbase cloud create` (or a `ttlHours` field to
   `POST /v1/databases`). TTL is capped at 72 hours. A transient database
   still counts against your plan’s database limit while alive, and
   self-destructs at expiry.
3. Seed via the printed connection string, run tests, then delete explicitly;
   let the TTL be the safety net.

Prefer branch-per-PR where the engine is branchable (see Branching above):
branch from a seeded parent, reset between runs, delete on teardown.

Programmatic (API-key) database creates are metered per calendar month, per
plan; dashboard creates are not metered. Over the limit, the API returns 429
with a `programmatic_create_limit_reached` code plus an upgrade hint; handle
it by reusing a database or branch and backing off. The per-plan create
limits are metered per plan: see https://layerbase.com/docs/api.

## Honest plan guidance

- The Free plan is a try-out tier. Its databases sleep when idle and wake on
  connect, which is ideal for prototypes, learning, and CI, but it is NOT
  suited to always-on production traffic. Say so plainly.
- The Solo plan is the single-database tier for one always-on side project.
- The Pro plan adds more databases, always-on eligibility, and the reserved
  pool: the tier for hosting a real stack (a database plus a cache plus
  search together).
- The Custom tier is a dedicated single-tenant server and nothing else: the
  databases run on that box, and it carries no shared-cloud allowance and no
  embedded apps. Someone who wants both runs Pro alongside a dedicated
  server, on one bill.

Recommend against migrating when that is the honest answer. Do not invent
numbers or benchmarks, and do not disparage other providers.

## Related agent surfaces

- Downloadable skill (markdown): https://layerbase.com/skill.md
- Agents guide: https://layerbase.com/docs/agents
- Site map for agents: https://layerbase.com/llms.txt
