CockroachDB through Squiid

Distributed SQL that survives node failure and spans regions. CockroachDB is on the Squiid roadmap.

Roadmap Provisioned Provisioned. Squiid creates the project or account for you and keeps the provider keys.

What CockroachDB is

CockroachDB is a distributed SQL database that speaks the Postgres wire protocol. Data is replicated across at least three nodes with consensus, so a node or an entire availability zone can fail without losing writes or requiring a manual failover. Multi-region configuration lets you pin rows to a jurisdiction for data residency or place them near the users who read them, and the serverless tier scales request units without a cluster to size. Online schema changes run without taking the table offline, and backups are continuous rather than a nightly dump.

Most AI-coded apps do not need this on day one, and that is the honest framing. It becomes relevant when downtime has a contractual cost, when a customer asks where their data physically lives, or when an app genuinely serves several continents and a single-region database has become the slowest part of a request. Because it is Postgres-compatible, moving to it later is usually less work than the equivalent move to a non-relational store. Transaction retries are the one behavioural difference worth knowing about, because contention is surfaced to the client rather than hidden behind a lock.

Why connect it through Squiid

CockroachDB is on the Squiid roadmap. When it is connected, Squiid will provision the cluster, hold the connection credentials and certificates, and route access through https://api.squiid.io/v1/cockroachdb/... with Authorization: Bearer $SQUIID_API_KEY, with Postgres drivers working by base URL swap (gateway convention). Request units, storage and cluster cost will bill at Cockroach Labs' listed prices on your single monthly Squiid invoice, with no markup and no second vendor relationship to manage.

  • One account, one key, one bill, one dashboard. CockroachDB sits beside every other service your project uses, on the same invoice and the same credit balance.
  • Key custody. Squiid holds the CockroachDB credentials. Your code carries SQUIID_API_KEY, so DATABASE_URL, COCKROACH_DSN, COCKROACH_CLUSTER never land in a repository, a preview deployment or an agent’s context.
  • Metering you can see. Every call is counted per service and per day, so you know what CockroachDB costs before the month ends.
  • Pause on zero. When prepaid credits run out the gateway stops authorizing usage instead of running up a bill you did not fund.
  • One rotation. Rotating the Squiid key cuts off every agent, worker and deployment at once, with no provider key to hunt down.

What you get

  • A provisioned distributed SQL cluster
  • Postgres wire compatibility with existing drivers
  • Automatic replication and failover across nodes
  • Multi-region row placement for residency
  • Cockroach Labs list pricing, no markup

How to connect CockroachDB

One variable replaces the provider credentials this service would normally need. Requests go to the gateway and the official SDKs work by pointing their base URL at it (gateway convention).

# .env
# replaces DATABASE_URL, COCKROACH_DSN, COCKROACH_CLUSTER
SQUIID_API_KEY=sq_live_xxxxxxxxxxxxxxxxxxxxxxxx

# every request: https://api.squiid.io/v1/cockroachdb/...
# header:       Authorization: Bearer $SQUIID_API_KEY
01

Add it in your dashboard

Open the Squiid catalog, add CockroachDB and fund credits. Squiid provisions the project and keeps the provider keys.

02

Put the one key in your env

Add SQUIID_API_KEY to .env and delete DATABASE_URL, COCKROACH_DSN, COCKROACH_CLUSTER. Nothing else from CockroachDB needs to exist in your project.

03

Point your agent at it

Claude Code, Cursor and Codex read the same variable and call https://api.squiid.io/v1/cockroachdb/. Agents treat it as Postgres, with the main difference being transaction retry logic that the client library usually handles.

Pricing through Squiid

CockroachDB charges for request units and storage on the serverless tier, or per node hour on dedicated clusters, at the provider's listed price. Squiid passes that through at par: one dollar of prepaid credit is one dollar of CockroachDB usage, with no markup and no per-request margin.

CockroachDB has no subscription attached on Squiid today. If a plan is required for a feature you need, it passes through at the provider’s listed price with no Squiid fee.

Squiid adds no markup to provider prices. There is a free plan at $0 a month with a 15% fee when you top up credits, Solo at $19.97 a month with a top-up fee that starts at 8% and falls to 3.5% as your spend grows, Team from $29.97 a seat a month with the same ladder one point lower, and Custom with a rate of 3% or less. Credits are prepaid, so CockroachDB usage stops when the balance reaches zero rather than producing an invoice you did not fund. Auto top-up with a cap keeps production running without handing anyone an open-ended card.

If you leave

Export: dump the database and restore it into a project in your own CockroachDB account; CockroachDB has no project transfer we are confident of. Squiid never owns your code, your schema or your domain, and the gateway speaks CockroachDB's own API, so the client change is a base URL. The handover page lists what happens for every provider in the catalogue.

Works with every coding agent

CockroachDB through Squiid is just an HTTP call with a bearer token, so every agentic coding tool can use it with the single key already in your environment:

Vibe coding a feature on CockroachDB usually means asking for it in plain language and letting the agent write the integration. Because the key is Squiid’s rather than the provider’s, it can do that without ever holding a credential that could be leaked, logged or committed.

Related services

Questions people ask

Is CockroachDB connectable through Squiid?

Not yet. It is on the roadmap as a provisioned service.

Can I use my Postgres ORM?

Generally yes, because CockroachDB speaks the Postgres wire protocol. A few Postgres-specific features behave differently, which the documentation lists.

Do I need it for a side project?

Usually not. It earns its place when uptime guarantees, multi-region latency or data residency requirements make a single-region database insufficient.

How will Squiid bill it?

Request units, storage and cluster cost at Cockroach Labs' listed price on your single invoice, with no markup.

Will Squiid hold the certificates?

Yes. Connection credentials and certificates stay with Squiid, and your app carries only SQUIID_API_KEY.

Connect CockroachDB with one key.

CockroachDB is a distributed, Postgres-compatible SQL database that replicates data across nodes and regions with strong consistency and automatic failover. Planned for Squiid.