Configuration
burrowDB is configured with environment variables. The server reads BURROW_* variables; the CLI reads
a few of its own. Everything PocketBase lets you change in the dashboard still works there; the
variables below exist so a deploy can declare it instead.
Booleans accept true/false (and for most process settings also 1/0, yes/no, on/off).
Durations are Go durations: 500ms, 3s, 25s, 1m.
Database
| Variable |
Default |
Meaning |
BURROW_POSTGRES_URL |
postgres://user:pass@127.0.0.1:5432/postgres?sslmode=disable |
The pooled connection for ordinary queries. Connect as an ordinary role with LOGIN CREATEDB that owns the databases, never a superuser: the dashboard's SQL console and backup restore run with its rights, usually pgbouncer in transaction mode. The path (database name) is replaced by BURROW_DATA_DB or BURROW_AUX_DB. |
BURROW_POSTGRES_DIRECT_URL |
the pooled URL |
A connection that bypasses the pooler, for LISTEN (realtime bridge), the migrate step, CREATE DATABASE, backups and restores. Required whenever BURROW_POSTGRES_URL points at a transaction pooler. |
BURROW_DATA_DB |
burrow_data |
Data database: collections, records, settings. |
BURROW_AUX_DB |
burrow_aux |
Auxiliary database: request and app logs. |
BURROW_ALLOW_CREATE_DATABASE |
creation allowed |
false stops a process from creating a missing database, so a typo in a database name fails instead of starting on an empty one. The Helm chart and the Compose stack set it to false on API and worker processes; only the migrate step may create databases (postgres.createDatabases). 0, no and off also turn it off. |
BURROW_ENCRYPTION_KEY |
none |
32 characters. Encrypts the stored settings (which hold the SMTP and S3 secrets) at rest. Must be the same on every replica. Changing it later makes stored settings unreadable. |
The URLs accept the usual libpq parameters (sslmode=require, sslmode=verify-full, ...). Unless the
URL sets default_query_exec_mode, the engine uses cache_describe, which is safe behind pgbouncer;
the migrate step uses describe_exec on the direct URL.
Process
| Variable |
Default |
Meaning |
BURROW_ROLE |
all |
all: API and crons in one process (also applies migrations and settings at start). api: API and realtime, never crons. worker: crons, and only /livez, /readyz, /api/health, /metrics. Anything else is an error. |
BURROW_RUN_MIGRATIONS |
true for all, false for api and worker |
Whether burrow serve applies migrations at start. In a cluster, leave it to burrow migrate. |
BURROW_REALTIME_BRIDGE |
true |
Realtime fan-out and cache reloads across replicas over LISTEN/NOTIFY. Turn off only for a single process. |
BURROW_READ_RETRY_BUDGET |
3s |
How long a record list or view read keeps retrying while the database is unavailable before answering 503. 0s for none. Keep it under pgbouncer's query_wait_timeout. |
BURROW_SHUTDOWN_TIMEOUT |
1s (PocketBase's) |
How long the HTTP server waits for in-flight requests and SSE streams after SIGTERM. Raise it behind rolling updates, and keep it below the pod's termination grace period. The Helm chart sets 30s (api.shutdownTimeout), the Compose stack 25s. |
BURROW_DRAIN_FILE |
/tmp/burrow-drain |
While this file exists, /readyz answers 503 draining, so the load balancer stops sending traffic. |
BURROW_DATA_DIR |
./pb_data (/data in the image) |
PocketBase's data directory: local files when S3 is off, temporary files. |
BURROW_HOOKS_DIR |
<data dir>/../pb_hooks (/pb_hooks in the image) |
JS hooks (*.pb.js). |
BURROW_MIGRATIONS_DIR |
<data dir>/../pb_migrations (/pb_migrations in the image) |
JS migrations. |
BURROW_AUTOMIGRATE |
off |
true turns on PocketBase's automigrate: collection changes made in the dashboard are written as migration files into the migrations directory. For development. |
Migrate step
| Variable |
Meaning |
BURROW_PGBOUNCER_ADMIN_URLS |
Comma-separated URLs of each pgbouncer's admin console (database pgbouncer), for example postgres://burrow:PASSWORD@pgbouncer-0:5432/pgbouncer. After burrow migrate applies a migration it sends RECONNECT to each, so pooled server connections drop statements described against the old tables. Failures are printed as warnings. |
Settings from the environment
These are written into PocketBase's settings by the process that applies migrations: burrow migrate
(at its end) or a BURROW_ROLE=all process at start. Other replicas never write them, so they cannot
race. A setting is written only when its variable is set; anything not named here stays as the
dashboard left it. A change made in the dashboard is overwritten at the next migrate step if the
variable still says otherwise.
| Variable |
Setting |
BURROW_APP_NAME |
Application name |
BURROW_APP_URL |
Application URL (used in mail links) |
BURROW_SENDER_NAME, BURROW_SENDER_ADDRESS |
Mail sender |
Files on S3-compatible storage. Setting BURROW_S3_BUCKET turns S3 storage on.
| Variable |
Setting |
BURROW_S3_BUCKET |
Bucket (turns S3 on) |
BURROW_S3_ENDPOINT |
Endpoint; empty for AWS S3, https://storage.googleapis.com for GCS, http://minio:9000 for MinIO |
BURROW_S3_REGION |
Region |
BURROW_S3_ACCESS_KEY, BURROW_S3_SECRET |
Credentials |
BURROW_S3_FORCE_PATH_STYLE |
true for MinIO and most non-AWS stores |
Backups.
| Variable |
Setting |
BURROW_BACKUPS_CRON |
Schedule of automatic backups (cron syntax, for example 0 3 * * *); empty turns them off |
BURROW_BACKUPS_MAX_KEEP |
How many automatic backups to keep |
BURROW_BACKUPS_S3_BUCKET |
Bucket for backups (turns backups-on-S3 on) |
BURROW_BACKUPS_S3_ENDPOINT, _REGION, _ACCESS_KEY, _SECRET, _FORCE_PATH_STYLE |
As for files; each one not set falls back to the matching BURROW_S3_* value |
Mail. Setting BURROW_SMTP_HOST turns SMTP on.
| Variable |
Setting |
BURROW_SMTP_HOST |
Host (turns SMTP on) |
BURROW_SMTP_PORT |
Port |
BURROW_SMTP_USERNAME, BURROW_SMTP_PASSWORD |
Credentials |
BURROW_SMTP_TLS |
true for implicit TLS |
BURROW_SMTP_AUTH_METHOD |
PLAIN or LOGIN |
First superuser.
| Variable |
Meaning |
BURROW_SUPERUSER_EMAIL |
Creates this superuser if it does not exist. Never changes an existing account's password. |
BURROW_SUPERUSER_PASSWORD |
Its password; required when the account has to be created. |
| Variable |
Default |
Meaning |
BURROW_PG_DUMP |
pg_dump from PATH |
Command used for backups (for example a wrapper that runs it in a container). The image ships PostgreSQL 17 client tools. |
BURROW_PG_RESTORE |
pg_restore from PATH |
Command used for restores. |
BURROW_RESTORE_DROP_PREVIOUS |
false |
true drops the previous database after a restore instead of keeping it as <name>_pre_restore_<time>. |
Engine names
The engine (the PocketBase fork) also reads its own names. A BURROW_* variable sets them when they
are not already set, so either works:
| burrowDB |
Engine |
BURROW_POSTGRES_URL |
POSTGRES_URL, PB_POSTGRES_URL |
BURROW_POSTGRES_DIRECT_URL |
POSTGRES_DIRECT_URL, PB_POSTGRES_DIRECT_URL |
BURROW_DATA_DB, BURROW_AUX_DB |
POSTGRES_DATA_DB, POSTGRES_AUX_DB |
BURROW_DATA_DIR |
PB_DATA_DIR |
BURROW_READ_RETRY_BUDGET |
PB_READ_RETRY_BUDGET |
BURROW_SHUTDOWN_TIMEOUT |
PB_SHUTDOWN_TIMEOUT |
BURROW_ALLOW_CREATE_DATABASE |
PB_ALLOW_CREATE_DATABASE |
BURROW_REALTIME_BRIDGE |
PB_REALTIME_BRIDGE |
Server flags
burrow serve and burrow migrate take PocketBase's flags plus the PostgreSQL ones. Flags win over
variables.
| Flag |
Meaning |
--http ADDR |
Listen address (default 127.0.0.1:8090; the image uses 0.0.0.0:8090) |
--https ADDR, serve DOMAIN... |
PocketBase's built-in TLS |
--origins |
CORS allowed origins (default *) |
--dir |
Data directory |
--postgresUrl, --postgresDirectUrl |
The pooled and direct URLs |
--postgresDataDB, --postgresAuxDB |
Database names |
--realtimeBridge |
Realtime bridge on or off |
--queryTimeout |
Default timeout of SELECT queries, in seconds (default 30) |
--encryptionEnv |
Name of the variable that holds the encryption key (default BURROW_ENCRYPTION_KEY) |
--dev |
Print logs and SQL statements to the console |
CLI
| Variable |
Meaning |
BURROW_URL |
Server URL (default: the last burrow login, else http://127.0.0.1:8090) |
BURROW_TOKEN |
Auth token (default: the stored login) |
BURROW_EMAIL, BURROW_PASSWORD |
Defaults for burrow login |
BURROW_HOME |
Where the CLI keeps credentials and stacks (default ~/.burrow) |
The local stack's .env
burrow up local writes ~/.burrow/stacks/local/.env (mode 0600) and keeps its values on later runs:
| Variable |
Meaning |
BURROW_IMAGE |
Image for the migrate step, API replicas and worker |
BURROW_PORT |
Port of the nginx edge on 127.0.0.1 (default 8090) |
BURROW_API_REPLICAS |
API replicas |
POSTGRES_PASSWORD |
Password of the burrow PostgreSQL role (generated). burrow has LOGIN CREATEDB and is not a superuser; the bootstrap superuser postgres has no password and is reachable only with docker compose -p burrowdb exec postgres psql -U postgres |
BURROW_ENCRYPTION_KEY |
Settings encryption key (generated) |
MINIO_ROOT_USER, MINIO_ROOT_PASSWORD |
MinIO credentials (password generated) |
BURROW_SUPERUSER_EMAIL, BURROW_SUPERUSER_PASSWORD |
The first superuser (password generated) |
BURROW_BACKUPS_CRON |
Backup schedule (Compose default 0 3 * * *) |
Helm values
The chart is in charts/burrowdb. The full list, with comments, is
values.yaml. The main ones:
| Value |
Default |
Meaning |
image.repository, image.tag, image.digest, image.pullPolicy |
ghcr.io/test-zeus-ai/burrowdb, chart appVersion, -, Always for latest else IfNotPresent |
The image; a digest wins over the tag |
secrets.mode |
generate |
generate: generate missing secrets once and keep them across helm upgrade. explicit: generate nothing, fail unless every needed secret is given (Argo CD, Flux, helm template) |
api.replicas |
2 |
API replicas (burrow up --replicas sets it) |
api.autoscaling.* |
off; 2 to 10 at 70% CPU |
HorizontalPodAutoscaler for the API |
api.podDisruptionBudget |
minAvailable: 1 |
PDB for the API |
api.preStopSleepSeconds |
10 |
Seconds a stopping API pod keeps serving before SIGTERM, so the Service drops it first |
api.shutdownTimeout |
30s |
BURROW_SHUTDOWN_TIMEOUT for API and worker pods: time to finish in-flight requests and streams |
api.terminationGracePeriodSeconds |
45 |
Grace period of API pods |
topologySpread |
true |
Spread API, worker and pgbouncer replicas over nodes and zones (soft) |
worker.replicas |
1 |
Cron workers |
api.resources, worker.resources |
small requests |
Resources |
service.type, service.port |
ClusterIP, 80 |
The API Service |
service.annotations, .loadBalancerSourceRanges, .loadBalancerClass, .externalTrafficPolicy |
empty |
Load balancer options: internal-LB annotations, the client ranges allowed in |
ingress.enabled, .className, .host, .tls, .annotations |
off |
Ingress for the API |
postgres.host, .port, .user, .sslmode |
-, 5432, burrow, require |
External PostgreSQL. user is the app role: LOGIN CREATEDB, never a superuser |
postgres.admin.user, .password / .existingSecret, .database |
-, -, postgres |
Admin login used by the db-bootstrap init container to create the app role and databases (key postgres-admin-password) |
postgres.password / postgres.existingSecret |
generated / - |
Password, or a Secret with key postgres-password. Must be URL-safe |
postgres.dataDB, postgres.auxDB |
burrow_data, burrow_aux |
Database names |
postgres.createDatabases |
true |
Let the migrate step create missing databases (API and worker pods never do) |
postgres.bundled.enabled |
false |
In-cluster PostgreSQL 17 (tests and kind only); superuser postgres, app role created by db-bootstrap |
pgbouncer.enabled, .replicas, .podDisruptionBudget |
true, 2, minAvailable: 1 |
pgbouncer StatefulSet in transaction mode; the PDB applies with two or more |
pgbouncer.defaultPoolSize, .maxDbConnections, .maxClientConn |
20, 80, 2000 |
Pool sizes; keep replicas x maxDbConnections under PostgreSQL's max_connections |
s3.endpoint, .bucket, .region, .forcePathStyle |
-, -, us-east-1, false |
File storage |
s3.accessKey, s3.secret / s3.existingSecret |
- |
Credentials, or a Secret with keys s3-access-key, s3-secret |
s3.bundled.enabled |
false |
In-cluster single-disk MinIO (tests, kind, and the dev-grade Azure module) |
backups.cron, .maxKeep, .bucket |
0 3 * * *, 7, s3.bucket |
Scheduled backups and their bucket; scheduled only when S3 is configured |
smtp.host, .port, .username, .tls, .password / .existingSecret |
- |
Mail |
appName, appURL, senderAddress, senderName |
- |
Application settings |
superuser.email, .password / .existingSecret |
- / generated |
First superuser |
encryptionKey / encryptionKeyExistingSecret |
generated / - |
Settings encryption key (32 characters), or a Secret with key encryption-key. Never change it once set |
hooks, migrations |
{} |
JS hooks and migrations by file name, mounted at /pb_hooks and /pb_migrations |
readRetryBudget |
3s |
BURROW_READ_RETRY_BUDGET |
extraEnv |
[] |
More environment variables for every burrow container |
serviceAccount.create, .annotations |
true, {} |
Service account (the engine's S3 client uses static keys; IRSA and workload identity are not supported yet) |
tests.image |
busybox |
Image of the helm test pod |
imagePullSecrets, podAnnotations, nodeSelector, tolerations, affinity |
empty |
Scheduling |
Generated values (database passwords, encryption key, superuser password, MinIO keys) live in the
release's Secret, which has helm.sh/resource-policy: keep and is reused on every helm upgrade.
That reuse depends on Helm reading the live Secret, which helm template, Argo CD and Flux cannot do:
with those, set secrets.mode: explicit and give every secret yourself, ideally as existing Secrets
(see Kubernetes). The values file is validated
against values.schema.json, so a misspelt key fails the install.