# 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, and migration sources. 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: most databases sleep when idle and wake on connect in a few
seconds. MySQL and MariaDB wake on connect too, MySQL in about 9
seconds and MariaDB in about 3 with occasional slower wakes, so set
a 30 second client connect timeout for them or retry the first attempt.
The Performance engines
(ClickHouse, QuestDB, Qdrant, Weaviate, InfluxDB) and TigerBeetle run always-on and never sleep.
TigerBeetle runs only on dedicated servers, never on the shared cloud.
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

## Agent Servers (Beta)

Layerbase Agent Servers bring coding agents, GitHub repositories, and tools
together on a private Linux machine you can reach from your browser.
Terminal sessions persist when you disconnect while the server runs.
Browse files beside the terminal, or connect with SSH and a remote editor.

Each server is a separate fixed-price monthly subscription; no database
plan is required, and managed databases still have a free tier.
Agent usage is separate. Agent Servers are a development
preview with no uptime SLA during beta; keep your own backups.

- Overview and current sizes/prices: https://layerbase.com/workspaces
- Setup and usage: https://layerbase.com/docs/workspaces

## Database 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). The pool is
one budget for the whole account: databases in every region and on every
shared server draw from it together, and a create, pin or restore that
would go over it is refused with `409 pool_exhausted`.

Data transfer: no database plan has ingress or egress fees, and nothing is
billed per GB transferred. Shared plans (Free, Solo, and Pro) are subject to an
acceptable-use bandwidth allowance, a fair-use limit and not a meter:
https://layerbase.com/acceptable-use.
Dedicated servers are exempt from that policy and include egress, except that servers in Brazil include a stated monthly outbound transfer allowance per size (contact Layerbase if you expect to exceed it): https://layerbase.com/pricing/dedicated.

### 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)

- Two databases, one of them always on. Perfect for a side project.
- Databases: up to 2
- Always-on pool: 768 MB always-on RAM, 1 vCPU, 10 GB storage
- Backups: every 12 hours, 7-day rolling retention
- 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: every 12 hours, 30-day rolling retention
- 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/pricing/dedicated))

- A private server of your own. One flat monthly price per server, no meters.
- Databases: up to 2 in the shared cloud (the Free allowance); on your dedicated server, limited only by its memory and storage
- Always-on pool: no always-on shared pool: your dedicated server is the capacity, always on
- Backups: every hour, 30-day rolling retention
- 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.

### Dedicated servers, prepaid terms

A dedicated server is a single-tenant box, not shared-cloud capacity: on
its own it carries only the Free plan's shared-cloud allowance (up to 2
databases), and someone who wants more runs Pro alongside a dedicated
server on one bill. Prepaying is a ONE-TIME purchase,
not annual billing: the normal monthly subscription continues, and the
prepayment applies a fixed monthly discount for the number of months bought.

Prepaid terms are offered on any of the three sizes in the United States only. Servers at any
other location bill monthly and cannot be prepaid at any price; checkout
refuses a prepaid term for them.

A customer picks a location first, then a size. The catalog, all flat
monthly retail prices:

- United States: Dedicated 4GB $35/mo (2 vCPU, 4 GB RAM, 25 GB storage); Dedicated 8GB $65/mo (4 vCPU, 8 GB RAM, 50 GB storage); Dedicated 16GB $120/mo (2 vCPU (memory-optimized), 16 GB RAM, 100 GB storage)
- Brazil: Dedicated 4GB $45/mo (2 vCPU, 4 GB RAM, 100 GB storage, 5 TB transfer/mo); Dedicated 8GB $95/mo (4 vCPU, 8 GB RAM, 180 GB storage, 6 TB transfer/mo); Dedicated 16GB $155/mo (2 vCPU (memory-optimized), 16 GB RAM, 100 GB storage, 6 TB transfer/mo)

Transfer allowances apply only to locations outside the United States. US
servers are not metered.

- Dedicated 4GB (2 vCPU, 4 GB RAM, 25 GB storage, $35/mo retail):
  - 12 months prepaid: $350 once, 2 months free versus $35/mo (always available).
- Dedicated 8GB (4 vCPU, 8 GB RAM, 50 GB storage, $65/mo retail):
  - 12 months prepaid: $650 once, 2 months free versus $65/mo (always available).
- Dedicated 16GB (2 vCPU (memory-optimized), 16 GB RAM, 100 GB storage, $120/mo retail):
  - 12 months prepaid: $1200 once, 2 months free versus $120/mo (always available).

Full details: https://layerbase.com/pricing/dedicated

## 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 (MongoDB is one: upstream
MongoDB runs locally, and the cloud hosts MongoDB-compatible engines). "Free-tier" marks engines
a Free-plan account can create; "branchable" marks engines that support
copy-on-write branches per database once Branching is turned on for it.

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

## Regions

Shared databases (Free, Solo and Pro) run in US East (`us-east`, the default)
or EU West (`eu-west`, France), on every plan at no extra cost. A database in
EU West keeps its data and backups in the EU; account records, team records
and operational logs are stored in the United States, so it is an EU
location, not EU data residency. The region is set at create time and never
changes: to run somewhere else, create a new database there and migrate.

- Dashboard: the create form shows a Region picker.
- CLI 2.5.0 and later: `layerbase cloud create <name> --engine <e> --region eu-west`.
  An unknown region is refused with the list of available ones.
- MCP server: `create_database` takes an optional `region`.
- Layerbase Desktop 0.40.0 and later: a Region picker on Deploy to Cloud.
- The REST API (`POST /v1/databases`) has no region field: the database is
  created on the server the request reaches. Use one of the above to pick a
  region.

Details: https://layerbase.com/docs/database-lifecycle#regions

## Branching

Copy-on-write branches per database, once Branching is turned on in the
database Settings tab (on standard storage a branch is a full copy): 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 (17 of 19):

- PostgreSQL, MySQL, MariaDB, Redis, Valkey, FerretDB, DocumentDB, libSQL, SQLite, DuckDB, TypeDB, ClickHouse, Meilisearch, Qdrant, QuestDB, InfluxDB, Weaviate

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
- Netlify DB -> postgresql
- Supabase -> postgresql
- Render -> postgresql
- Railway -> postgresql, mysql, redis
- Replit -> postgresql, valkey, redis
- Heroku -> postgresql, valkey, redis
- DigitalOcean -> postgresql, mysql, mariadb, valkey, redis, documentdb, ferretdb
- Fly.io -> postgresql
- Vercel Postgres -> postgresql
- Prisma Postgres -> postgresql
- Xata -> postgresql
- Other Postgres -> postgresql
- MySQL -> mysql, mariadb
- MariaDB -> mariadb, mysql
- PlanetScale -> mysql, mariadb
- Upstash -> redis, valkey
- Vercel KV -> redis, valkey
- Redis -> redis, valkey
- Valkey -> valkey
- Algolia -> meilisearch
- Turso -> libsql
- Cloudflare D1 -> libsql
- MongoDB Atlas -> documentdb, ferretdb
- Aiven -> postgresql, mysql, valkey, redis
- Crunchy Bridge -> postgresql

## Hosted apps (deprecated)

Layerbase used to host first-party app containers (Filmroom, Secret Store)
alongside managed databases. That offering is deprecated: it is not sold to
new customers and new apps cannot be created, so do not propose deploying
one. Deployments that are already running keep running. If a user wants to
host an app on Layerbase's architecture, tell them to email
ops@layerbase.com.

Filmroom, the session replay app, is a standalone product now, with its own
hosting and billing at https://filmroom.dev. Send anyone asking about
session replay there rather than to Layerbase Cloud.

## 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.
The same endpoints as a machine-readable OpenAPI 3.1 document, generated
from the same registry so the two can never disagree: https://layerbase.com/openapi.json.
Keys are per-control-plane, so a multi-server account’s key works against
its primary server.

## Accounts agents create for themselves

An agent with no Layerbase account to use can register its own. Read
https://layerbase.com/auth.md and follow it exactly: it is generated from the code
that enforces it, so its prices, lifetimes and limits are current. If it
answers 404, agent registration is off: ask the user to connect you to
their own account instead.

- A NEW account is yours to create: register anonymously, buy Solo or Pro
  with a payment method you are already authorized to use (full price from
  the first month, no trial; there is no free agent account), then create
  and use databases through the MCP server.
- An EXISTING account belongs to its owner. Do not register a second one
  for a person who already has an account: connect to the MCP server with
  OAuth sign-in, which the person approves in their browser. An upgrade on
  an account with a card on file emails the owner an approval link and
  charges nothing until they confirm. Agents cannot downgrade or cancel.
- To hand your account to a person, start a claim as /auth.md describes.
  Give them the link and the short code; they sign in with Google or
  GitHub as the email you named and type the code on that page, not back
  to you. The account, its databases and its subscription stay where they
  are.

Guide for people: https://layerbase.com/docs/agents. MCP server: https://layerbase.com/docs/mcp.

## 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.

Creates (branches included) also have a short-term rate limit. Over it the
API returns 429 with a `Retry-After` header, and the CLI returns 429 with
code `rate_limited` and `retryAfterSeconds`. Wait that long before the next
create instead of retrying in a loop.

A sleeping database normally wakes when a client connects, but a server
can decline an automatic wake (low memory, many wakes at once, or one
address waking databases in many accounts, which shared CI egress
addresses can look like). The connection then fails and the database stays
asleep. A start from the CLI (`layerbase cloud start <name>`), the API or
the dashboard is never refused this way, so start the database before a
pipeline connects to it. Details: https://layerbase.com/docs/database-lifecycle#wake-refused.

## Honest plan guidance

- The Free plan is a try-out tier. Its databases sleep after
  15 minutes idle (30 minutes for MySQL and MariaDB) 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 small side-project tier: up to 2 databases, with a
  pool sized to keep one of them always-on. Databases you do not pin sleep after 6 hours
  idle and wake on connect, the same as a Free database, so keep the 30
  second connect timeout for MySQL and MariaDB.
- 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: the databases run on
  that box, plus the Free plan's shared-cloud allowance (up to 2 databases).
  Someone who wants more shared cloud 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

- Feature catalogue (markdown, every capability with plan and engine scope): https://layerbase.com/features.md
- Downloadable skill (markdown): https://layerbase.com/skill.md
- Agent registration (auth.md protocol): https://layerbase.com/auth.md
- Pricing (markdown): https://layerbase.com/pricing.md
- Docs index (markdown, every documentation page): https://layerbase.com/docs.md
- OpenAPI 3.1 spec for the Cloud REST API: https://layerbase.com/openapi.json
- Agents guide: https://layerbase.com/docs/agents
- Site map for agents: https://layerbase.com/llms.txt
