Skip to content
CockroachDB

CockroachDB on Layerbase Desktop and CLI

Distributed SQL with strong consistency, Postgres wire-protocol compatible. Available on Layerbase Desktop and self-hosted with the Layerbase CLI.

Layerbase Desktop / CockroachDB / app_prod

Database

app_prod

Schema

  • users
  • sessions
  • orders
  • audit_log
CockroachDB SQLCmd+Enter to run
SELECT region, COUNT(*) AS users
FROM users
WHERE created_at > now() - INTERVAL '7 days'
GROUP BY region
ORDER BY users DESC;
regionusers
us-east112,847
us-west29,231
europe-west46,402
asia-northeast13,118
4 rows ยท 18ms
  • Upstream binary

    No license substitution

  • Your machine

    Data stays on your disk

  • Price

    Free for personal use

  • Desktop and CLI

    Run it locally or self-host

The CockroachDB Software License (CSL) wording makes us uncomfortable to host CockroachDB as a serverless platform. We didn't want to ship something where the licensing story was murky for our paying customers.

If you're with Cockroach Labs and would like to work with us on a clean managed offering, we would love to hear from you.

Contact us

CockroachDB on your machine, same dashboard

CockroachDB is not on Layerbase Cloud, but it is first-class everywhere else. Layerbase Desktop runs the upstream binary with the same dashboard chrome, query console, and connection manager as the cloud product, and the Layerbase CLI runs the same engine runtime from the terminal, as native processes with no Docker required. Data stays on your disk: no managed-host TLS to terminate, no IP allowlist to maintain, no third party to trust.

View the CLI docs
Run it locally with the CLI
npm i -g layerbase
lbase create mydb -e cockroachdb
lbase start mydb

Cloud, desktop, or self-host

One database, three places it can live. Pick the speed you want and move between them when you outgrow it.

Common CockroachDB questions

What is CockroachDB?

CockroachDB is a distributed SQL database with strong consistency that speaks the PostgreSQL wire protocol, so psql, libpq-based drivers, and Postgres ORMs connect to it. It is built for transactional workloads that need horizontal scale or want to span regions. Layerbase does not host it on Cloud for licensing reasons, but it runs on Layerbase Desktop and self-hosted through the Layerbase CLI, in both cases as the upstream binary.

How much does CockroachDB cost on Layerbase?

There is no managed CockroachDB to buy: it is not on Layerbase Cloud for licensing reasons, so no plan includes it. Layerbase Desktop is free for personal use and runs the upstream binary on your own machine, and self-hosting it with the Layerbase CLI costs whatever your own hardware costs.

Why is CockroachDB not on Layerbase Cloud?

CockroachDB ships under the CockroachDB Software License (CSL), which restricts hosted commercial offerings. We do not run it as a managed service for that reason. On the desktop or via the Layerbase CLI you run the upstream binary directly under its standard license.

Can my Postgres app connect to CockroachDB?

Yes. CockroachDB speaks the PostgreSQL wire protocol, so psql, libpq-based drivers, ORMs (Prisma, Drizzle, etc.) all work. There are some SQL dialect differences, primarily around schema and transactions.

How is the desktop experience different from cloud Postgres?

Desktop CockroachDB still runs the full distributed SQL engine, just with a single in-process node. The dashboard surfaces the same connection panel, query console, and management UI as the rest of Layerbase.

When would Layerbase Cloud add CockroachDB?

If the licensing landscape changes or we partner with Cockroach Labs directly. For now, desktop and self-host are the supported paths.

Can I move a schema from Postgres to CockroachDB?

For most apps, yes. Identify Postgres-specific features your schema uses (custom types, certain extension features) and confirm they map to CockroachDB before migrating.

Desktop app or self-host with the Layerbase CLI

CockroachDB runs on your laptop with the Layerbase Desktop app, or anywhere else with the Layerbase CLI, which runs the same engine runtime from the terminal as native processes with no Docker required.

Native dashboard

Same dashboard chrome, query console, and connection manager as the Layerbase Cloud experience, running on your own machine.

Runs the upstream binary

No license substitution. You are running the engine maintainers ship, with the configuration knobs they document.

Your machine, your data

Data stays on disk. No managed-host TLS to terminate, no IP allowlist to maintain, no third party to trust.

Free for personal use

Layerbase Desktop is free for personal projects. Team and commercial use is covered under the standard license.

Hosted CockroachDB, compared

CockroachDB Cloud exists: its Basic plan includes 50 million request units and 10 GiB of storage free each month, then bills request units. CockroachDB's license terms keep it off Layerbase Cloud, so we do not host it, but you can run it free on Layerbase Desktop.

Competitor facts verified September 7, 2026 against each vendor's own pricing and documentation pages: CockroachDB Cloud.

CockroachDB is developed by the CockroachDB project. Layerbase packages official releases; the engine itself is built upstream.

cockroachlabs.com