Skip to main content
Beads uses Dolt as its storage backend. Dolt provides a version-controlled SQL database with cell-level merge, native branching, and two deployment modes.

Why Dolt?

  • Native version control — cell-level diffs and merges, not line-based
  • Multi-writer support — server mode enables concurrent agents
  • Built-in history — every write creates a Dolt commit
  • Native branching — Dolt branches independent of git branches
  • Single-binary option — embedded mode for solo users (no server needed)

Getting Started

Install Dolt (Server Mode Only)

Embedded mode includes everything in the bd binary; no separate Dolt install is needed. Install the standalone dolt CLI only when you want to run server mode or work directly with the database via dolt sql. Install a specific version. Do not install releases/latest — see Which Dolt version to install for the version to use and why the pin exists.
brew install dolt installs whatever version the Homebrew formula currently points at, which is not pinned. If you install that way, check dolt version against the pin below.

Which Dolt version to install

Beads pins Dolt to 2.6.0. CI installs that same pin with scripts/ci/install-dolt.sh, which records the per-version measurements and the criterion for raising it; raise the pin here and in that script together. This pin is about the standalone dolt CLI, which only server and proxied-server mode use. Embedded mode is unaffected either way: it links the Dolt 2.6.0 engine into bd (dolthub/driver v2.4.1 with github.com/dolthub/dolt/go at the v2.6.0 release, in go.mod), no matter which dolt CLI is on your PATH. The CLI pin tracks that engine, so every mode runs the same Dolt. bd requires Dolt 2.6.0 or newer outside embedded mode, and refuses to run against anything older:
  • bd dolt start, and the auto-start behind server mode, refuse to launch a dolt binary older than 2.6.0.
  • Managed proxied-server mode (bd init --proxied-server, and every command after it) refuses a dolt binary older than 2.6.0 before it launches it.
  • Every server-mode and proxied-server store open asks the server it reached for SELECT dolt_version() and refuses a server older than 2.6.0, whoever started it, before it reads or writes through that open. That includes an external server and a shared one.
  • bd bootstrap and bd init --remote check the server, or the dolt CLI, before they clone; bd init checks a shared server before it creates beads_global on it; and bd dolt clean-databases refuses an older server before it drops anything.
  • A bd dolt push, pull or fetch (federation sync included) that runs through the dolt binary on your PATH (git-protocol, credentialed, cloud-auth and local remotes) refuses that binary when it is older than 2.6.0, like every other dolt bd runs. When bd’s own server holds the database, dolt hands the transfer to that server; otherwise the binary’s own engine runs it. The check comes as soon as bd chooses the CLI route, before it runs anything through the binary.
  • The remote-repo cache (bd create --repo <url>, bd repo sync for a remote-URL repo) refuses the dolt on your PATH when it is older than 2.6.0, before it clones, pulls or pushes. No server holds the cache, so that binary’s own engine would run the transfer.
  • bd doctor --server reports a server older than 2.6.0 as an error.
  • bd doctor, bd doctor --fix included, is exempt, so you can still diagnose and repair a workspace on an older server: its own checks and repairs connect without the floor. Its checks that open the workspace’s store fail: the ✖ Database and Permissions errors only point at bd dolt status, and the refusal itself is printed by the ⚠ checks further down (Peer Connectivity, Sync Staleness, Federation Conflicts, Dolt Mode). Run bd doctor --server to see the version.
  • bd admin compact --dolt is exempt: its dolt gc runs in an owned or shared server’s database, which the store open has already checked, and dolt hands the GC to that running server. Read-only probes (bd dolt status, bd init’s existing-database check) and the working-set commit bd dolt stop makes before it stops a server bd runs are not checked either.
  • Federation peers are not checked: bd checks only its own server and its own dolt binary, so a peer on an older engine can still merge the same criss-cross history differently (see below).
The error names what was checked (the binary’s path or the server’s address), the version it reported, the 2.6.0 minimum, and where to get Dolt. To fix it, install 2.6.0 with the steps above (or brew upgrade dolt, then check dolt version) and restart any dolt sql-server on the new binary: for a server bd manages, bd dolt stop and bd dolt start; in a managed proxied-server workspace, bd dolt stop alone, since the proxy starts its server again on the next command and refuses bd dolt start. There is no override. A version bd cannot determine is not refused: a dolt binary whose dolt version output does not parse runs with a warning (proxied-server mode) and a server that does not answer dolt_version() with a version is used without the check (logged under BD_DEBUG). The Dolt 2.6.0 release notes list what changed. Two changes matter to bd users moving a server up to 2.6.0:
  • When two histories have more than one merge base (criss-cross merges, e.g. federation peers that pull from each other, or branches merged into each other), Dolt 2.6.0 merges against a virtual base like git’s ORT strategy (new in 2.6.0, dolthub/dolt#12125). Some merges that 2.5.x completed silently now conflict, and some spurious conflicts no longer occur. Pull/push through a single remote is unaffected.
  • Dolt reports MySQL 8.0’s strict default sql_mode, which includes NO_ZERO_IN_DATE, NO_ZERO_DATE and ERROR_FOR_DIVISION_BY_ZERO, so anything that reads @@sql_mode sees it. Dolt has done so since 2.3.3, so this is new only to a server coming from a release before 2.3.3.
Dolt 2.3.3 is the first release that stores a descending index column as descending (dolthub/dolt#11746), and older releases cannot read a table that holds one: even a plain INSERT fails with table has unknown fields, and an UPDATE or DELETE on issues fails with cannot add or update a child row: a foreign key constraint fails on fk_comp_snap_issue. Migration 0010 declares compaction_snapshots.idx_comp_snap_issue with created_at DESC. So every database bd creates in embedded mode from this release on, and every database whose schema a dolt sql-server 2.3.3 or newer created, holds one. This is one-way: bd does not convert the index back, so such a database needs Dolt 2.3.3 or newer, and a bd built on Dolt 2.3.3 or newer, for good. Other databases keep an ascending index and stay readable and writable by older Dolt even after this release migrates and writes to them (measured 2026-10-21 with Dolt 2.2.0 and 2.3.2). Dolt 2.3.0 (released 2026-08-13) regressed CALL DOLT_RESET('--hard'). A few percent of freshly created databases come up with that procedure unusable — every call answers Error 1105 (HY000): context canceled, from any session and any new connection, for the life of that server process. Nothing else about the database looks wrong: SELECT 1, CALL DOLT_CLEAN(), CALL DOLT_CHECKOUT('.'), CALL DOLT_COMMIT() and soft resets all work normally, so the damage is invisible until something needs a hard reset. The table records, per release, whether it opens a database bd creates, whether its engine answers an ungrouped MAX or MIN over an unmatched primary-key prefix correctly (the shape of dolthub/dolt#12093), and the DOLT_RESET('--hard') regression, measured by creating fresh databases and immediately calling the procedure: “Opens a database bd creates” means information_schema reads and writes don’t fail with table has unknown fields. Every row of that column is measured (2026-10-23, on a database bd created in embedded mode); plain reads of issues still succeed on the releases marked “no”.
  • The embedded engine measured 0 / 100 on 2.5.1 and 0 / 100 on 2.4.1 (2026-10-21), and 0 / 60 on 2.4.1 (2026-10-10). The 2026-10-10 and 2026-10-21 runs re-measured 2.3.1 as a positive control, confirming the method still reproduces the regression.
  • 2.6.0 (2026-10-24): 0 / 500 on one server, and 0 / 1000 across 50 fresh servers of 20 databases each; the embedded engine (go.mod’s dolthub/dolt/go at the v2.6.0 release) 0 / 100 on one open and 0 / 400 across 20 fresh opens. The regression hits databases created soon after a server starts, so one long-running server under-reports it: that day 2.3.1, the positive control, measured 0 / 300 on one server but 31 / 600 across 30 fresh servers of 20 databases each. Measure across fresh servers.
  • 2.6.0: when two histories have more than one merge base (criss-cross merges, e.g. federation peers that pull from each other, or branches merged into each other), it merges against a virtual base like git’s ORT strategy (dolthub/dolt#12125). Some merges that 2.5.x completed silently now conflict, and some spurious conflicts no longer occur. Pull/push through a single remote is unaffected.
  • The MAX/MIN column is bee-ghosttrack’s reproduction from #7646, reproduced on linux/amd64 and darwin/arm64. bd’s one query of that shape, the versioned-history revision read, no longer depends on it.
  • 2.4.0 through 2.4.2 also panic on an ungrouped MAX of a non-key column under a fully bound primary key (dolthub/go-mysql-server#4037).
  • “Correct” is for the shape the column names. Every release before 2.5.0, 2.2.0 included, returns no row for an ungrouped MAX over the whole primary key of an empty table (SELECT COALESCE(MAX(pk), 0) FROM t); 2.5.0 and later return one row. bd’s production queries of that shape accept either answer.
  • Releases before 2.4.0 drop a join condition when an ON clause has an OR over indexed columns (dolthub/dolt#11886).
Raise the pin only once a newer release is confirmed clean by that same measurement — not because it is newer. Pin rather than track latest for a second, independent reason: the upstream releases/latest URL resolves to the most recently created release, not the highest version, so it can move backwards — v1.88.2 was created on 2026-08-17, after both v2.2.4 and v2.3.0.

If you are already running 2.3.x

Whether a database is affected is decided per database, when it is created — two databases on the same server can differ — so check each one you care about, against the server that is actually serving it:
Step 2 succeeding while step 3 answers Error 1105 (HY000): context canceled is the discriminating result — that database is affected. Both succeeding means it is not. The breakage lives in the running server process, not on disk, so restarting dolt sql-server clears it — verified by re-running the check on an affected database after a restart, with a healthy database on the same server as the control. A restart re-rolls the dice for every database, though, so the durable fix is to move to the pinned version. This matters because the merge-settle path behind bd dolt pull / bd sync falls back to a hard reset when it has to abandon a merge. bd flatten and the Dolt-history compaction, bd compact, also hard-reset main in older releases (bd compact in v1.3.2 and earlier); builds with the fixes listed in the CHANGELOG move main with a soft reset, which this breakage does not affect. See Maintenance.

New Project

Migrate from SQLite (Legacy)

If upgrading from an older version that used SQLite:
Note: The bd migrate --to-dolt command was removed in v0.58.0. For pre-0.50 installations with JSONL data, use the migration script:
See Troubleshooting if you encounter connection errors after migration.
Migration creates backups automatically. Your original SQLite database is preserved as beads.backup-pre-dolt-*.db.

Modes of Operation

Embedded Mode (Solo / Standalone)

In-process Dolt engine — no separate server needed. This is the default for standalone Beads users. The bd binary includes everything; just bd init and go.
  • Single-writer (one process at a time)
  • Data lives in .beads/embeddeddolt/ alongside your code
  • Push to GitHub with bd dolt push — code and issues in one repo
  • Zero ops: no server, no ports, no PID files
Each bd command starts the embedded engine, so a script or agent loop that calls bd hundreds of times pays that startup every time. bd batch runs a limited set of write commands (close, update, create, dep add, dep remove; see bd batch --help) in one transaction and one process. For sustained concurrent agents, use server or proxied-server mode, where one Dolt server keeps the engine running (see Migrating Between Backends). Neither repairs a damaged journal; for that, see Engine won’t open.

Server Mode (Multi-Writer / Orchestrator)

Connects to a running dolt sql-server for multi-client access.
Configure the connection with flags or environment variables: BEADS_DOLT_SERVER_PORT also declares the server externally managed. Setting it — or the legacy BEADS_DOLT_PORT — makes ResolveServerMode classify the workspace as an externally-managed server, so bd will not auto-start a server for it: if nothing is listening on that port you get BEADS_DOLT_SERVER_PORT declares the Dolt server at 127.0.0.1:<port> externally managed, so bd did not start one rather than a server started on it. Use these vars to point bd at a server you already run; they are not a way to choose the port of a bd-owned server. A dolt_mode: proxied-server workspace is exempt — it reaches its server through the proxy, so an ambient port does not describe its lifecycle — and a shared-server workspace is already classified external on its own. Unix domain sockets: Use --server-socket to connect via a Unix socket instead of TCP. This avoids port conflicts between concurrent projects and is useful in sandboxed environments (e.g., Claude Code) where file-level access control is simpler than network allowlists. The Dolt server must be started with dolt sql-server --socket <path>. Auto-start is not supported in socket mode. bd init --server-socket records the path as dolt_server_socket in .beads/metadata.json. BEADS_DOLT_SERVER_SOCKET wins over it. The socket is a preference, not a requirement: if it does not answer but the TCP host and port do, bd connects over TCP. If neither answers, the error names the socket. In releases after v1.3.2, opens that read metadata.json (beads.OpenFromConfig and the other config-based library opens, bd doctor and its repairs, and routed stores) take the socket the same way, after a socket the library caller passes directly. Earlier releases read only BEADS_DOLT_SERVER_SOCKET on those opens and dialed TCP beside a metadata.json socket. beads.Open does not read metadata.json. Switch to server mode when you need:
  • Multiple agents writing simultaneously
  • Orchestrator multi-rig setups
  • Federation with remote peers

Shared Server Mode

On machines with multiple beads projects, each project normally starts its own Dolt server. Shared server mode runs a single Dolt server at ~/.beads/shared-server/ that serves all projects:
Benefits:
  • No port conflicts between projects (single server on port 3308, avoids orchestrator on 3307)
  • Reduced resource usage (one process instead of many)
  • Automatic database isolation (each project uses its own database name)
How it works:
  • Server state files (PID, port, lock, log) live in ~/.beads/shared-server/
  • Dolt data directory: ~/.beads/shared-server/dolt/
  • Each project’s database is stored as a subdirectory (e.g., ~/.beads/shared-server/dolt/myproject/)
  • The file lock mechanism ensures safe concurrent access from multiple projects
  • Default port is 3308 (not 3307) to avoid conflict with the orchestrator. Override with BEADS_DOLT_SERVER_PORT or dolt.port in config.yaml
Important: Each project on a shared server must have a unique prefix (database name). Two projects with the same prefix share the same database — if this happens accidentally, the project identity check will detect the mismatch and refuse to connect, preventing silent data corruption. Always use distinct prefixes when running bd init --shared-server.
The global database. bd init --shared-server (or init on a machine with shared mode on) also creates beads_global on the shared server and records it in .beads/metadata.json as the workspace’s global database. It holds issues that belong to no single project, with the global prefix. Pass the root flag --global to any command to read or write beads_global instead of the project’s database:
Every project on the shared server reads beads_global, so no command drops it.

Removing a project from the shared server

A project’s database lives on the shared server, under ~/.beads/shared-server/dolt/, not in the project. Deleting the project’s .beads directory (or the whole checkout) does not drop its database: the server keeps serving it, and its name stays taken. To remove it, run bd dolt drop-database <name> from another workspace on the same server:
It drops only the database you name, and refuses beads_global, the server’s system databases, the workspace’s own database and test databases. The drop is recoverable with CALL DOLT_UNDROP('old_project') until the server’s dropped databases are purged (bd dolt clean-databases --purge-dropped, which purges every dropped database on the server at once). Note the project’s database name before you delete its .beads directory: it is dolt_database in .beads/metadata.json. bd sql 'SHOW DATABASES' lists every database the server holds.

Durability and Dolt history

Saving a write and recording it in Dolt history are separate steps:
  • SQL commit (saved). When a bd write succeeds, its SQL transaction has committed and Dolt has synced it to the shared server’s local data directory through its chunk journal. With supported journal-backed Dolt and the journal left at its default (enabled), the write survives the server being killed (SIGKILL, out-of-memory, an ungraceful logout) and is there after the next start. Surviving power loss also depends on the filesystem and device honoring sync. A write still in an open transaction when the server dies is lost, as in any database.
  • Dolt commit (history). A Dolt commit records saved changes in version history: what bd history shows and what bd dolt push sends. With dolt.auto-commit set to batch or off, saved changes wait in the working set (bd doctor reports them under “Dolt Status”) until you record them yourself:
    A graceful bd dolt stop also records them, best-effort. A crash does not discard them: they are still pending after the restart.
A local commit of either kind is not a backup. To keep a copy off the machine, push history to a remote, or point bd backup at a separate or off-machine destination: run bd backup init <path-or-url> once, then bd backup sync. Only bd backup sync writes to that destination, so run it again to bring the copy up to date. bd does not turn on Dolt’s behavior.dolt_transaction_commit, and saving writes does not need it. It would turn every SQL transaction into its own Dolt commit: history grows faster, Dolt’s generic transaction commits take the place of bd’s per-command messages and authors, and batch and off modes stop batching. Server config file. For a server bd launches with its default configuration, bd writes the shared server’s config to ~/.beads/shared-server/dolt-server-config.yaml and passes it with --config. bd rewrites it on every start, so edits to it do not last. With a Dolt too old for that config, bd passes command-line flags instead, and Dolt then writes a template to ~/.beads/shared-server/dolt/config.yaml that records those flag values and leaves its other settings commented out. The bd-launched server does not read that template, so its server settings have no effect. bd itself still reads the template’s listener.port when it resolves the shared server’s port: after BEADS_DOLT_SERVER_PORT and bd’s port file, ahead of dolt.port in config.yaml. Servers you configure and run yourself (external or proxied) use whatever config you give them.

Maintenance — bd prune and bd purge

bd prune permanently deletes closed non-ephemeral beads to reclaim storage and shrink auto-exports. bd purge does the same for ephemeral beads (wisps, transient molecules). Both require --force to execute.
Reference-aware protection: bd prune automatically skips closed beads whose ID appears in the description, notes, or comments of any open or in-progress bead. This prevents accidental deletion of ADR, decision, and verification beads that downstream work still cites. Use --ignore-references to override when cleaning up known-stale references:
bd purge is unaffected — ephemeral beads’ references are themselves transient. For full Dolt storage reclaim after deleting many rows, follow with bd flatten. On Dolt 2.3.x, storage-reclaim operations can fail partway. In older releases bd flatten builds a temporary branch and then hard-resets main onto it, as does the Dolt-history compaction, bd compact, in v1.3.2 and earlier, and the merge-settle path behind bd dolt pull / bd sync falls back to a hard reset when it abandons a merge. On an affected database that hard reset returns Error 1105 (HY000): context canceled: those bd flatten and bd compact releases stop at that step, and an abandoned merge is left without its rollback. See Which Dolt version to install for the check and the fix. Writes that reach main while bd compact runs. In v1.3.2 and earlier, bd compact’s hard reset discards them: changes in main’s working set that no Dolt commit holds yet (a batch under batched or disabled auto-commit), and a commit that lands on main while the history is being rebuilt. Builds with the fix listed in the CHANGELOG move main with a soft reset and keep both. The check that the rebuilt history reproduces main’s data compares it with main as bd compact read it, so such a write is not mistaken for a divergent replay. Working-set changes stay pending, as they were. A commit that landed during the rebuild is kept in one follow-up commit, compact: commit changes that reached main during compaction, so it does not keep its own hash, message or author on main; changes that were already staged when bd compact started go into that commit too. If that follow-up commit fails, bd compact stops after main has moved and before garbage collection, says so, and leaves the changes staged: commit them with bd dolt commit when you are ready. Writes that reach main while bd flatten runs. Older releases’ bd flatten hard-resets main onto the flattened branch, which discards the same two kinds of write and also drops the foreign keys of the clone-local (dolt_ignored) tables, events and the wisp_* tables. Builds with the fix listed in the CHANGELOG move main with a soft reset: the foreign keys stay, working-set changes stay pending, and a commit that landed during the flatten, with any changes already staged, is kept in one follow-up commit, flatten: commit changes that reached main during flatten. If checking for or making that commit fails, bd flatten stops after main has moved and before pruning and garbage collection, says so, and leaves the changes staged: inspect dolt_status and commit them with bd dolt commit when you are ready. If bd flatten fails or is interrupted after creating its temporary branch, it tries, within 30 seconds, to return to main and delete that branch so the next bd flatten can run; if that cleanup fails, the error keeps the original failure and names the branch left behind. A foreign key an older release already dropped stays dropped after a flatten. In server mode, bd doctor reports it, and bd doctor --fix deletes the rows it orphaned and re-adds it. Embedded mode has no check or repair for it yet: bd doctor and bd doctor --fix do not run there.

Why a garbage collection can reclaim nothing

Dolt’s garbage collector is generational. Every pass moves the data reachable at that moment into an old generation, and a default pass only examines the new generation — data written since the last collection. So the second collection on a store never revisits what the first one kept, however much of it has since become unreachable. Squashing history and then running a default dolt gc is the case where this bites: the orphaned commit chain usually sits in the old generation, and the pass frees almost nothing. dolt gc --full collects both generations. It frees everything a default pass frees, plus the old generation, so it is never worth running a default pass first to save time. If a full collection frees nothing, the remaining bytes are still referenced — by a branch, a tag, or a cached remote-tracking ref — and the fix is to remove the reference, not to collect again. The History Bloat runbook walks through that diagnosis; bd flatten, bd compact, and bd gc document the collection each one runs.

Migrating Between Backends

You can migrate data between embedded mode and server mode using bd backup. Both directions preserve full Dolt commit history. bd export is not a substitute for this flow. JSONL exports contain issue records from the issues table for migration and interoperability; they do not capture Dolt branches, full commit history, working-set state, or non-issue tables. Use bd backup or a manual Dolt backup when you need a restorable database backup.

Server → Embedded

  1. Create a backup from the server-mode project:
  2. Create a new embedded-mode project and restore:
    --force overwrites the freshly-initialized database with the backup contents. The restore automatically:
    • Updates metadata.json to match the restored project identity
    • Registers the backup directory for future bd backup sync
    • Backfills the embedded migration tracker (schema_migrations)
  3. Verify:

Embedded → Server

  1. Create a backup from the embedded-mode project:
  2. Create a new server-mode project and restore:
  3. Verify:

Backup Commands Reference

Notes

  • Data locations differ between modes: .beads/embeddeddolt/ (embedded) vs .beads/dolt/ (server)
  • The backup directory is a full Dolt backup, not an issues.jsonl export — it can be on a local drive, NAS, or DoltHub
  • You can also migrate via Dolt remotes (bd dolt push / bd dolt pull) if both projects share a remote
The sections below are the canonical backend migration reference.

Federation (Peer-to-Peer Sync)

Federation lets independent Dolt-backed workspaces (“towns”) sync issues directly with each other via bd federation add-peer/sync/status, without a central hub. Credentials are AES-256 encrypted and stored locally. See Federation Setup Guide for the full setup guide, including peer configuration, sovereignty tiers, sync/status/topology details, and troubleshooting.

Dolt Remotes

Use bd dolt remote add to configure remotes. This ensures the running Dolt SQL server sees the remote immediately. Remotes added directly with the dolt CLI are written to filesystem config and may not be visible to the server until restart.

Push/Pull

bd dolt remote add registers the remote through the Dolt store API. SQL remotes are the source of truth for bd dolt remote list, bd dolt push, and bd dolt pull. For git-protocol remotes, credentialed external-server remotes, and cloud remotes whose credentials are only present in the current shell, bd dolt push and bd dolt pull automatically materialize a matching local CLI remote before using the dolt CLI transport. The CLI remote is a local transport mirror, not a separate configuration source. If you are upgrading from an older beads version and previously added remotes with raw dolt remote add, re-register them with bd dolt remote add <name> <url> so they are visible through SQL. bd doctor reports legacy CLI-only or mismatched CLI remotes under Dolt Remote Migration.
Sharing a Git repo: Dolt stores data under refs/dolt/data, separate from standard Git refs (refs/heads/, refs/tags/). You can safely point a git+ssh:// remote at the same repository as your project source code. See Dolt Git Remotes.

List/Remove Remotes

Contributor Onboarding (Clone Bootstrap)

When someone clones a repository that uses Dolt backend:
  1. Run bd bootstrap in the clone
  2. If the git remote has refs/dolt/data (pushed via bd dolt push), bd bootstrap auto-detects it and clones the database from the remote
  3. Work continues normally — all existing issues are available
No manual steps required beyond bd bootstrap. The auto-detect:
  • Probes origin for refs/dolt/data
  • Clones the Dolt database from the remote (instead of creating a fresh one)
  • Configures the Dolt remote for future bd dolt push/pull
If sync.remote is set in .beads/config.yaml, that takes precedence over auto-detection. Any Dolt-compatible remote URL is supported (DoltHub, S3, GCS, file, or git). On brand-new projects, bd init auto-detects git origin and persists it as sync.remote, so the first bd dolt push publishes Dolt history to refs/dolt/data on the same git remote. bd init adopts the Dolt history of a remote it derived from git origin only with consent, because on a fork-less clone origin is the upstream project and adopting it imports that project’s whole issue history:
  • Interactively, bd init names the URL and asks once ([y/N], default no). A decline stops init without writing anything.
  • bd init --yes consents ahead of time and prints the URL it adopts from (unless --quiet). --non-interactive and --json are not consent: without --yes they refuse (exit 1) and name the URL.
  • bd init --no-adopt (or BD_NO_REMOTE_ADOPT=1) never derives a remote from git origin: no probe, no clone, no Dolt remote and no sync.remote. It wins over --yes.
The consent check covers only a remote derived from git origin. bd init does not ask before adopting from an explicit --remote or from a sync.remote in .beads/config.yaml, and neither does bd bootstrap. That includes a sync.remote committed to the repository you cloned: a plain bd init in a repository with a git origin writes the origin URL there, and .beads/config.yaml is tracked by git. So a fresh clone of a repository whose .beads/ was committed adopts that remote’s history without a prompt, even with --no-adopt. Before running bd init in a clone of someone else’s repository, check .beads/config.yaml; to start fresh there, remove sync.remote from it and run bd init --no-adopt. An explicit --remote wins over a configured sync.remote, and with either one set bd init never consults git origin. When the probe of git origin fails (for example a private origin and no credentials), nobody can see whether it holds Dolt history. bd init then keeps the fallback it always had: it warns, asks nothing, imports nothing and initializes a fresh local database. It still wires git origin as Dolt remote origin and writes it as sync.remote, as it does for an origin with no Dolt history, so a later bd bootstrap finds the workspace initialized and does nothing. To adopt the origin’s history once it is reachable, run bd init --yes in a fresh clone.

Verifying Bootstrap Worked

Troubleshooting

Server Not Running

Symptom: Connection refused errors when using server mode.
Fix:

Bootstrap Not Running

Symptom: bd list shows nothing on fresh clone. Check:
Force bootstrap:

Database Corruption

Symptom: Queries fail, inconsistent data, or every bd command fails while opening the database. Diagnosis and logical repair (server mode):
Embedded mode runs only bd doctor --check=artifacts, --check=conventions and --check=pollution. Recovery: bd doctor --fix does not rebuild a damaged store, and deleting the data directory destroys any work your remote or backups lack. Follow Engine won’t open: preserve the damaged store and its configuration first, then recover into a fresh store from a Dolt remote, a Dolt-native backup, or a JSONL export.

Already Committed .beads/dolt/ to Git

If you accidentally committed a Dolt data directory:
  1. Update gitignore: bd doctor --fix
  2. Remove it from git tracking: git rm --cached -r .beads/dolt/ (or .beads/embeddeddolt/)
  3. Commit the removal: git commit -m "fix: remove accidentally committed dolt data"
  4. To purge from history, use BFG Repo-Cleaner or git filter-repo

Lock Contention (Embedded Mode)

Symptom: “database is locked” errors. Embedded mode is single-writer (enforced via file lock). If you need concurrent access, switch to server mode. See Migrating Between Backends.

Configuration Reference

Environment Variables

Note: BEADS_DOLT_SERVER_PORT (and the legacy BEADS_DOLT_PORT) do more than name a port — setting either also marks the workspace as an externally-managed server and suppresses auto-start. See Server Mode above.

Credentials File

For multi-server setups, you can store passwords in an INI-style credentials file instead of juggling environment variables per project. Passwords are looked up by [host:port] section, so each project automatically gets the right password based on its configured server. Password resolution order:
  1. BEADS_DOLT_PASSWORD env var (highest priority, existing behavior)
  2. Credentials file lookup by [host:port] (using the resolved runtime port)
  3. Empty string (no password)
Port resolution note: The [host:port] used for credential lookup matches the resolved runtime port (from the port file, env var, or config — in that priority order), not necessarily the port stored in metadata.json. This matters when using IAP tunnels: if your tunnel maps remote:3307 to localhost:3308, store your password under [127.0.0.1:3308] and the credentials file will match the actual connection. Default location: ~/.config/beads/credentials (Linux/macOS), %APPDATA%\beads\credentials (Windows) Override location: Set BEADS_CREDENTIALS_FILE env var. File format:
Permissions: On Linux/macOS, a warning is printed to stderr if the file is readable by group or others (mirrors ssh behavior). Set permissions with:

Dolt Version Control

Dolt maintains its own version history, separate from Git:

Auto-Commit Behavior

In embedded mode (standalone default), each bd write command creates a Dolt commit:
In server mode (orchestrator), auto-commit defaults to OFF because the server manages its own transaction lifecycle. Firing DOLT_COMMIT after every write under concurrent load causes ‘database is read only’ errors. Config-table writes are the exception on a direct SQL server: bd config set and unset, bd remember, bd forget, bd kv set and bd kv clear commit their own config row while auto-commit is on, because nothing else commits a config row there. The memory and kv verbs commit only kv.* rows. If another write left an internal config key uncommitted, that commit is refused and the command still succeeds with a stderr warning naming the key; bd dolt commit publishes everything together. Under batch or off these writes wait in the working set like any other. Override for batch operations (embedded) or explicit commits (server):

Server Management (Orchestrator)

The orchestrator provides integrated Dolt server management:
Server runs on port 3307 (avoids MySQL conflict on 3306).

Standalone-to-managed-city handoff

When an existing standalone project is later added to a managed city or orchestrator, avoid letting two Dolt servers become sources of truth for the same beads database name. A common split-brain symptom is that .beads/dolt-server.port points at the old standalone server while the shell environment points bd at the managed server with BEADS_DOLT_PORT or BEADS_DOLT_SERVER_PORT. Check before migrating:
bd doctor warns when the runtime managed port differs from the local port file. The warning is intentionally diagnostic only; do not delete the local port file until the standalone store has been exported and imported into the managed server. Safe manual handoff:
After bd doctor shows one healthy store and the imported issue count is correct, archive the old local Dolt data directory instead of deleting it immediately. Keep the backup until the managed city has been pushed or otherwise snapshotted. Shared server mode, one Dolt server for every project on a machine, is described under Modes of Operation.

Data Location (Orchestrator)

Central Dolt Server (macOS LaunchAgent)

If you do not use the orchestrator but still want a single persistent Dolt server for multiple projects on macOS, run a custom LaunchAgent instead of spawning per-project embedded instances.

Why Not brew services start dolt?

After installing Dolt with brew install dolt, the natural next step is brew services start dolt. However, the Homebrew formula runs dolt sql-server without the --config flag, and Dolt does not auto-discover config.yaml from its working directory. The config file must be passed explicitly with --config <file>.

Setup with a Custom LaunchAgent

Install Dolt and initialize its data directory. Check the installed version against the pin — Homebrew’s formula is not pinned:
Configure Dolt for port 3307:
Create the LaunchAgent plist:
Load and verify the service:
Point beads at the central server:
Manage the service:

Advanced Dolt Usage

The dolt CLI lets you operate directly on the database for power-user workflows. The data directory depends on your mode: .beads/embeddeddolt/ (embedded) or .beads/dolt/ (server).

Branching

Time Travel

Diff and Blame

Migration Cleanup

After successful migration from SQLite, you may have backup files:
These are safe to delete once you’ve verified Dolt is working:
Recommendation: Keep backups for at least a week before deleting.

See Also