burrowdb

mcp
Security Audit
Fail
Health Warn
  • License — License: Apache-2.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Fail
  • rm -rf — Recursive force deletion command in .github/workflows/release.yml
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

PocketBase on PostgreSQL, scaled out. Same API, dashboard, SDKs and JS hooks, with many replicas, realtime across all of them, and one-command deploys to Docker, Kubernetes, AWS, GCP and Azure.

README.md

burrowDB by TestZeus

PocketBase on PostgreSQL, scaled out. Same API, dashboard, SDKs and JS hooks. Many replicas, realtime across all of them, and one command to run it on your laptop, Kubernetes, AWS, GCP or Azure.

Release
GitHub stars
CI
License: Apache 2.0
TestZeus
Built on PocketBase
PostgreSQL 17
MCP
Docs

burrowDB is PocketBase on vanilla PostgreSQL, scaled out, by
TestZeus, the makers of Hercules,
the open-source QA agent, and Hearth, the open-source
browser and device farm. You keep PocketBase's REST API, realtime subscriptions, admin dashboard, auth,
JS hooks and SDKs. Underneath, the data lives in PostgreSQL, many API replicas serve it behind a load
balancer, crons run once per cluster, and files sit in S3-compatible storage. One command brings the
whole stack up on your laptop, on Kubernetes, or on AWS, GCP and Azure.

It is for teams that started on PocketBase, love it, and outgrew one process on one disk: you need a
second replica, a managed database, real backups and failover, without rewriting your app.

A JS hook sets the slug on every replica; one replica is killed and the next write still succeeds, and both realtime clients get every event

Watch burrowDB in three minutes (2:08, subtitled), or
follow the same steps in the Tutorial.

burrowDB is a fork of PocketBase by Gani Georgiev and builds on the PostgreSQL port in
fondoger/pocketbase. Both are MIT-licensed and both did the
work that matters most. See Acknowledgements.

Status: 0.1.0 (0.x, so APIs may change before 1.0). Everything below runs and is
tested locally on Docker Compose and kind. The AWS, GCP and Azure modules pass terraform validate
but have not been applied to a real cloud account yet. See the changelog and the
roadmap.

Get started

# the burrow CLI from https://github.com/test-zeus-ai/burrowdb/releases (macOS, Apple silicon, shown)
curl -fsSL https://github.com/test-zeus-ai/burrowdb/releases/download/v0.1.0/burrow_v0.1.0_darwin_arm64.tar.gz | tar -xz
sudo mv burrow_v0.1.0_darwin_arm64/burrow /usr/local/bin/
burrow up local --replicas 3                   # Docker with Compose

That pulls the image, starts PostgreSQL, pgbouncer, MinIO, the migrate step, three API replicas, a
cron worker and an nginx edge, and prints the URL (http://127.0.0.1:8090) and where the generated
superuser password is. Point any PocketBase SDK at it; nothing in your app changes:

import PocketBase from "pocketbase";

const pb = new PocketBase("http://127.0.0.1:8090");
await pb.collection("posts").subscribe("*", (e) => console.log(e.action, e.record)); // from any replica

burrow up kind does the same on a local Kubernetes cluster with the Helm chart, and
burrow up aws|gcp|azure plans it in your cloud account.

Or let your coding agent set it up

Paste this into your coding agent (Claude Code, Codex, Cursor, Copilot, Gemini CLI, ...) in your app's
folder. It looks around first, asks a few questions, brings burrowDB up and connects your app and
itself to it. Passwords never go through the chat.

Set up burrowDB (PocketBase on PostgreSQL that scales out, https://github.com/test-zeus-ai/burrowdb) for
this project. Guide: https://github.com/test-zeus-ai/burrowdb/blob/main/docs/guide/coding-agents.md

1. Look first, don't ask yet: does this project already use PocketBase (SDK, pb_data, pb_hooks,
   pb_migrations), are docker, kind, helm and kubectl installed, which Kubernetes contexts exist,
   and is `burrow` installed.
2. Build the CLI if it is missing (clone the repo, `go build -o ~/bin/burrow ./cmd/burrow`), then
   `burrow skills install` and follow the burrow-setup skill.
3. Ask me, one question at a time, with your best guess as the default: where to run it (local,
   kind, an existing cluster, a cloud), and, if there is a PocketBase app, whether to migrate its data
   (burrow-migrate-from-pocketbase skill).
4. Bring it up, have me sign in myself (`burrow login`), run `burrow doctor`, and point the app's
   PocketBase URL at it from configuration. Show me one record read through the app.
5. Connect yourself with `claude mcp add burrowdb -- burrow mcp` (or your agent's equivalent).

At a glance

PocketBase burrowDB
Database SQLite file PostgreSQL, managed or self-hosted
API replicas 1 As many as you need, no sticky sessions
Realtime One process Across every replica (LISTEN/NOTIFY)
Cron jobs In the one process Once per cluster, on worker replicas
Files Local disk or S3 S3-compatible storage
Backups Zip of the data folder Zip of pg_dump archives; a restore covers the whole cluster
Deploy Copy one binary burrow up local, kind, aws, gcp, azure, or the Helm chart
For coding agents None built in burrow mcp and agent skills

Your app code does not change: the REST API, SDKs, API rules and JS hooks are PocketBase's.

Why

PocketBase is a great backend: one binary, one SQLite file, everything you need. That design is also
its limit. One process serves every request, files sit on that process's disk, and the database is a
file next to it. You cannot add a second replica, put it behind a load balancer, or move the data to a
managed database.

burrowDB keeps PocketBase and changes what is underneath:

  • PostgreSQL instead of SQLite, managed or self-hosted (tested on 17).
  • Many API replicas. Any replica can serve any request. No sticky sessions.
  • Realtime across replicas. A change made on one replica reaches subscribers on every replica,
    through PostgreSQL LISTEN/NOTIFY.
  • Crons once per cluster. A separate worker role runs cron jobs. Each tick runs once across the
    cluster, claimed through a lease table (_burrowCronLeases).
  • pgbouncer in transaction mode in front of PostgreSQL.
  • Files and backups on S3-compatible storage, so every replica sees the same files.
  • A one-shot migrate step (burrow migrate) that applies migrations once, under a PostgreSQL
    advisory lock, before the replicas serve.
  • A way in and a way out. Move a SQLite PocketBase in, with row counts and checksums that prove the
    load and an API comparison of old and new, and export back to a SQLite file that stock PocketBase serves.

Architecture

flowchart TB
    clients["Clients<br/>JS / Dart SDK, browsers, agents"] -->|HTTP, SSE| lb["Load balancer<br/>(nginx locally, a Service or Ingress on Kubernetes)"]
    lb --> api1["burrow serve<br/>role=api"]
    lb --> api2["burrow serve<br/>role=api"]
    lb --> api3["burrow serve<br/>role=api"]
    api1 & api2 & api3 -->|pooled queries| pgb["pgbouncer<br/>transaction mode"]
    api1 & api2 & api3 -.->|direct: LISTEN/NOTIFY| pg
    worker["burrow serve<br/>role=worker<br/>crons via _burrowCronLeases"] --> pgb
    migrate["burrow migrate<br/>one-shot, advisory lock"] -.->|direct| pg
    pgb --> pg[("PostgreSQL<br/>burrow_data + burrow_aux")]
    api1 & api2 & api3 & worker --> s3[("S3-compatible storage<br/>files and backups")]
  • One binary, burrow. burrow serve runs the server. burrow migrate applies migrations.
    Every other subcommand is the client: deploy, data, backups, MCP, skills.
  • Roles come from BURROW_ROLE: all (the default: one process does everything, like
    PocketBase), api (HTTP and realtime, never runs crons) and worker (runs crons, answers only
    /livez, /readyz, /api/health and /metrics).
  • Two connections to PostgreSQL. Queries go through pgbouncer. LISTEN, migrations and backups use
    a direct connection, because a transaction pooler cannot hold session state.
  • Two databases. burrow_data holds your collections. burrow_aux holds the request and app logs,
    as auxiliary.db does in PocketBase.

More in Architecture.

Quick start, step by step

You need Docker with Compose and the burrow CLI from the
releases (or go build -o ~/bin/burrow ./cmd/burrow
from a checkout, Go 1.27 or later).

burrow up local --replicas 3

burrow up pulls ghcr.io/test-zeus-ai/burrowdb at the CLI's own version. From a checkout,
--source . builds the image from your code instead.

burrow up local writes a Docker Compose project to ~/.burrow/stacks/local with generated secrets,
starts PostgreSQL, pgbouncer, MinIO, the migrate step, the API replicas, a cron worker and an nginx edge,
and waits until the edge answers /readyz. It prints:

{
  "url": "http://127.0.0.1:8090",
  "dashboard": "http://127.0.0.1:8090/_/",
  "superuser": "[email protected]",
  "password": "in ~/.burrow/stacks/local/.env (BURROW_SUPERUSER_PASSWORD)",
  ...
}

Sign in and check the stack:

export BURROW_URL=http://127.0.0.1:8090
grep BURROW_SUPERUSER_PASSWORD ~/.burrow/stacks/local/.env | cut -d= -f2- | burrow login --email [email protected] --password-stdin
burrow status
burrow doctor

Open http://127.0.0.1:8090/_/ for the PocketBase dashboard. Point any PocketBase SDK at
http://127.0.0.1:8090.

Stop it with burrow down local. Add --volumes --yes to delete the data too.

Full walk-through: Quick start.

Kubernetes

On a local kind cluster (needs Docker, kind, Helm and kubectl):

burrow up kind --source .

This creates a kind cluster named burrowdb, loads the image, and installs the Helm chart with
in-cluster PostgreSQL and MinIO (charts/burrowdb/values-local.yaml). It prints the
kubectl port-forward command and how to read the superuser password from the Secret.

On an existing cluster, with your own PostgreSQL and S3 bucket:

burrow up k8s --kube-context my-cluster --values my-values.yaml

--kube-context is required. burrowDB never installs into whatever context happens to be current.
See Kubernetes for the values file and the chart.

Clouds

burrow up aws                  # terraform init + plan, nothing is created
burrow up aws --apply --yes    # creates billable resources
Target Creates
aws VPC, EKS, RDS for PostgreSQL 17, an S3 bucket, then the Helm chart
gcp VPC, GKE Autopilot, Cloud SQL for PostgreSQL 17 on a private IP, a GCS bucket (S3 interoperability with an HMAC key), then the Helm chart
azure VNet, AKS, Azure Database for PostgreSQL Flexible Server 17, then the Helm chart with in-cluster MinIO for files (Azure Blob has no S3 API)

--apply applies exactly the plan you reviewed. The API gets an internal load balancer by default;
expose it publicly through an Ingress with TLS, or with an explicit allow-list (public_lb,
lb_source_ranges). These modules pass terraform validate but have not been applied against real
cloud accounts yet. Read the plan before you apply. See Clouds.

Scaling up and down

API replicas keep no state, so scaling is adding or removing pods.

  • Up: docker compose -p burrowdb up -d --scale api=5, Helm --set api.replicas=5, or
    api.autoscaling.enabled=true (an HPA on CPU, 2 to 10 replicas). A new pod runs the migrate step
    (a no-op under the lock), joins the realtime bridge, and takes traffic once /readyz passes.
  • Down: the pod leaves the Service, waits 10 seconds so the load balancer stops sending to it,
    then finishes in-flight requests before it exits. Realtime clients reconnect to another replica
    through the SDK. A PodDisruptionBudget keeps at least one API pod during node drains.
  • Workers do not need scaling: each cron tick runs once across the cluster. Two give
    availability; a job cut off mid-run is picked up on another worker within about two minutes.
  • The limit is PostgreSQL. API pods share pgbouncer's pool, so adding them adds no database
    connections; keep pgbouncer replicas x pgbouncer.maxDbConnections under max_connections. All
    writes go to one primary; grow it vertically.

The autoscaler and rebalancing of long-lived realtime connections have not been load-tested yet.
More in Operations.

The CLI

burrow is also a client for any burrowDB (or PocketBase) server. It prints JSON when stdout is not a
terminal and uses stable exit codes, so scripts and agents can rely on it.

burrow collections list
burrow records list posts --filter 'published = true' --sort -created
burrow records create posts '{"title":"hello"}'
burrow realtime watch posts            # NDJSON stream
burrow backup create
burrow sql 'SELECT count(*) FROM posts'
burrow api GET /api/collections/posts/records -q perPage=5

All commands: CLI reference.

For coding agents

burrowDB ships an MCP server, agent skills and a Claude Code plugin.

claude mcp add burrowdb -- burrow mcp            # stdio; uses the stored `burrow login`
claude mcp add burrowdb-ro -- burrow mcp --read-only
burrow skills install                             # copies the skills to ~/.claude/skills

Read tools are always there. Tools that change data (create_record, update_record,
delete_record, save_collection, import_collections, create_backup) refuse to run until the
agent passes confirm=true, and --read-only does not register them at all. The agent sets
confirm=true itself, so it is a convention, not a security control: the real gate is your MCP host's
approval prompt, and a token with only the access the agent needs. The raw sql tool is registered
only with burrow mcp --allow-sql, and writes to system collections (_superusers and other names
starting with _) need --allow-system-collections.

The repository is also a Claude Code plugin marketplace. The burrowdb plugin brings the MCP server
and six skills: burrow-setup, burrow-connect-app, burrow-schema-and-data,
burrow-migrate-from-pocketbase, burrow-operate and burrow-hooks-at-scale.

/plugin marketplace add test-zeus-ai/burrowdb
/plugin install burrowdb@burrowdb

Codex, Cursor and others: Coding agents.

Migrating from PocketBase

burrow migrate-from-pocketbase moves a PocketBase data.db into PostgreSQL. It only reads the SQLite
file.

burrow migrate-from-pocketbase preflight -sqlite snapshot/data.db          # the day before
burrow migrate-from-pocketbase all -sqlite snapshot/data.db \
  -pg-url "$BURROW_POSTGRES_DIRECT_URL" -data-db burrow_data              # schema, copy, indexes, verify
burrow migrate-from-pocketbase apidiff -sqlite snapshot/data.db \
  -a http://old:8090 -b http://new:8090 -user [email protected] -pass "$PASS"

export-to-sqlite is the way back: it writes a new SQLite file from PostgreSQL that stock PocketBase
serves. The end-to-end test moves a stock PocketBase app in and back out: 0 checksum mismatches over 78
rows, 127 API responses with 0 unexpected differences, user password hashes intact (users can still log
in), and views, files and JSON filters working. See
Migrate from PocketBase for the maintenance-window procedure.

What is different from PocketBase

burrowDB aims to be a drop-in PocketBase: build your app with the
PocketBase docs. These are the honest differences:

  • SQL is PostgreSQL. Filters and the API behave as on SQLite, but anything you write as raw SQL
    ($app.db() in hooks, view collection queries, burrow sql) is PostgreSQL SQL. Backtick-quoted
    identifiers are rewritten to double quotes, and strftime, hex, randomblob, json_valid and a
    nocase collation are installed as shims, but other SQLite-only SQL must be ported.
  • JS hooks run on every API replica. A request hook runs once, on the replica that handles the
    request. Anything a hook keeps in memory ($app.store(), globals) is per replica. Side effects such as
    sending mail or calling another service must be safe to run on any replica, and crons must be
    idempotent. See Hooks at scale.
  • Crons run only on workers. cronAdd and the built-in jobs run on worker (or all) processes,
    once per tick across the cluster. api replicas never run them.
  • Files need S3 with more than one replica. Local disk works for one process. With more, every
    replica must see the same files, so configure S3-compatible storage.
  • Rate limits are per replica. PocketBase's rate limiter keeps its counters in memory, so a limit
    applies to each replica separately.
  • Backups are pg_dump. The Backups API and dashboard page work, with the same zip format on the
    outside. Inside are pg_dump archives of both databases instead of SQLite files. A restore loads them
    into new databases and swaps them in for the whole cluster.
  • Realtime clients should refetch after a reconnect. A client whose replica goes away reconnects to
    another one and can miss events sent in between. Refetch what the page shows on PB_CONNECT.

Status

burrowDB is early. What has been run, locally, in December 2026:

  • burrow up local --replicas 3 comes up in about 31 seconds. The cluster end-to-end suite then
    checks: 6 realtime subscribers on 3 replicas received every event; crons fired exactly once per
    minute across workers; killing an API replica under load: 2,424 of 2,424 requests returned 200; a
    graceful stop: 1,994/1,994; restarting pgbouncer: 4,237/4,237; restarting PostgreSQL: 4,144/4,144;
    backup and restore worked on every replica.
  • burrow up kind: Helm install, superuser login, CRUD, file upload to in-cluster MinIO. A Helm upgrade
    to 3 API replicas and 2 pgbouncers kept the generated secrets. A rolling restart of the API and
    pgbouncer under load: 27,221 of 27,221 requests returned 200.
  • The PocketBase migration round trip described above.
  • The AWS, GCP and Azure modules pass terraform validate. They have not been applied to a real
    account.

The roadmap lists what is next. The design record is docs/DESIGN.md.

Documentation

The docs site is test-zeus-ai.github.io/burrowdb.

Building your app: use the PocketBase docs. burrowDB runs PocketBase v0.40.5, so
pocketbase.io/docs is the reference for everything you build on it.
Using the PocketBase docs lists every page and what differs, if anything.
The ones you will use most:

Topic PocketBase docs
Collections, fields, view collections Collections
Who can read and write what API rules and filters
Sign-in: password, OAuth2, OTP, MFA Authentication
Files and thumbnails Files upload and handling
Relations and expand Working with relations
JavaScript and Dart SDKs Client-side SDKs
REST API Records API, Realtime API
Server-side JavaScript Extend with JavaScript, Event hooks, Routing, Jobs scheduling

Running burrowDB: use these docs.

Support the project

If burrowDB saves you a rewrite, star the repository
so other PocketBase users can find it, and tell us what you are building in
Discussions. Bug reports and pull requests are welcome:
see CONTRIBUTING.md.

Acknowledgements

burrowDB would not exist without:

  • PocketBase by Gani Georgiev and contributors (MIT). The API, the
    dashboard, realtime, auth, hooks, migrations and SDKs are PocketBase's. burrowDB changes the storage
    and the process model underneath. If one PocketBase process serves you well, use PocketBase.
  • fondoger/pocketbase by fondoger and contributors
    (MIT), the PostgreSQL port of PocketBase that burrowDB's engine is built on: the driver, the dialect,
    the SQLite shims, the PostgreSQL test suite and the first realtime bridge.
  • dbx (MIT), PocketBase's query builder.

More in ACKNOWLEDGEMENTS.md. License notices are in NOTICE.

Part of TestZeus

burrowDB is made by TestZeus, the team behind
Hercules, the open-source QA agent that tests web
apps, APIs and mobile apps from plain-language cases, and Hearth,
the open-source browser and device farm for Kubernetes.

License

burrowDB is licensed under the Apache License 2.0. The PocketBase fork in engine/ and the
dbx fork in dbx/ keep their MIT licenses (engine/LICENSE.md,
dbx/LICENSE).

Copyright 2026 TestZeus. The bDB tile and wordmark are set in Manrope (SIL Open Font License, docs/assets/fonts/OFL-Manrope.txt).

Reviews (0)

No results found