~/.clawboo by default). It also reads OpenClaw’s directory (~/.openclaw) for interop, but never writes there.
There is no migration ladder. The SQLite schema is bootstrapped from an idempotent CREATE TABLE IF NOT EXISTS DDL block when a database is opened (once at boot for the server), and opening an older file also adds any columns it is missing, so a normal upgrade needs no action from you. Resetting is for wiping state, or for the rare schema change that is not additive; see Hard reset.
The state directory
Clawboo’s own state lives underresolveClawbooDir(), which defaults to ~/.clawboo. The CLAWBOO_HOME environment variable overrides the location (it expands a leading ~ and resolves to an absolute path), useful for test sandboxes or running multiple isolated instances.
The Express server (and the entire web app) reads and writes
~/.clawboo/clawboo.db. The defaultDbPath() helper in @clawboo/db resolves a different path (~/.openclaw/clawboo/clawboo.db) and is only used by the out-of-process MCP stdio bins; see The database path.OpenClaw interop (read-only)
Clawboo reads two files from OpenClaw’s state directory for interop and never writes to~/.openclaw. The directory resolves via resolveStateDir(); OPENCLAW_STATE_DIR overrides it; otherwise it is ~/.openclaw.
Backing up or resetting
~/.clawboo never touches OpenClaw’s data. The two directories are independent.
The database
clawboo.db is a single SQLite file holding 28 tables. There is no separate Postgres, no external store, no migration ladder. The schema is applied by ensureSchema() (packages/db/src/schemaBootstrap.ts), an idempotent CREATE TABLE IF NOT EXISTS block that the server runs once at boot; createDb() is the batteries-included open-and-bootstrap form still used by one-shot processes (the MCP stdio bins, the eval harness, tests). That DDL is the sole source of truth for the schema (the Drizzle schema.ts is the typed query layer over the same tables, never used to apply migrations). See the database schema reference for the full table list and ERD.
The database path
The path you back up is~/.clawboo/clawboo.db. Two resolvers exist, for two consumers:
getDbPath()(apps/web/server/lib/db.ts) →~/.clawboo/clawboo.dbviaresolveClawbooDir(). This is the path the Express server uses everywhere. It honorsCLAWBOO_HOME. The server opens it once throughgetDb()and reuses that one connection for the whole process lifetime;closeDb()on shutdown is the only thing that closes it.defaultDbPath()(@clawboo/db) →~/.openclaw/clawboo/clawboo.db, with aCLAWBOO_DB_PATHoverride. This is used only by the MCP stdio bins (clawboo-mcp-tasks,clawboo-mcp-memory,clawboo-mcp-tools,clawboo-mcp-teamchat) that an external runtime may spawn out of process.
The two resolvers default to different paths. If an external runtime spawns a Clawboo MCP stdio bin and you want it to read the same database the server serves, set
CLAWBOO_DB_PATH to the server’s actual clawboo.db so both processes open one file. The multi-process WAL recipe (below) is what keeps concurrent access safe.WAL files
Every connection opens in WAL (Write-Ahead Logging) mode with this pragma set:clawboo.db-wal: the write-ahead log (recent writes not yet checkpointed into the main file).clawboo.db-shm: shared-memory coordination for concurrent readers/writers.
Back up your data
Everything recoverable lives in~/.clawboo. A copy of the whole directory is a complete backup, and the simplest one.
Every “stop the server first” step on this page is
clawboo stop. Paths below are written as ~/.clawboo; if you set CLAWBOO_HOME, substitute that directory. The launcher starts the dashboard server detached, so there is usually no terminal holding it and no Ctrl-C to press. clawboo stop finds the running instance through ~/.clawboo/api-port.txt and terminates it; clawboo restart does the stop and the start in one step, reclaiming the same port when it is free after the stop (so an open browser tab reconnects); if something else has taken it, the successor falls back to normal port resolution. See the CLI reference.Quick backup (whole state dir)
Stop the server first so writes are quiesced, then copy the directory:Database-only backup
To back up just the data tables, copy the database plus its WAL sidecars. With WAL mode, recent writes may still live inclawboo.db-wal; copying only the main file can miss them.
The vault is useless without its master key, and the master key is useless without the vault. If you back up
secrets/runtime-keys.json you must also back up secrets/master.key (or set CLAWBOO_SECRETS_MASTER_KEY to a key you control). A wrong, rotated, or lost master key fails closed; saved runtime provider keys cannot be decrypted, and you re-enter them in the Runtimes panel. See Security.Restore
Restore by copying the files back into~/.clawboo with the server stopped (clawboo stop), then bring it back with clawboo. If you restore a database-only backup, restore the WAL sidecars too, or delete a stale clawboo.db-wal / clawboo.db-shm so SQLite re-creates them clean against the restored main file.
Hard reset
There is no schema migration step to run. Upgrading Clawboo brings an existing database up to the new schema when it opens it, adding any columns it is missing (see Upgrading an existing database). A reset is for when you want the data gone, or after the rare schema change that is not additive, and means deleting the database file; the boot-timeensureSchema() bootstrap re-creates every table the next time the server opens it.
Reset just the data (keep credentials and settings)
ensureSchema() recreates an empty, fully-bootstrapped schema. Your settings.json and the secrets vault are untouched.
Full reset (everything)
The clean-slate remedy, also what the boot probe recommends after a fatal failure, is to remove the whole state directory and re-run onboarding:Stop the server before deleting the directory. A running server keeps writing to the deleted files through their open handles and re-creates
api-port.txt and a fresh database underneath you, so the reset looks like it didn’t take.How boot health checks your data
On every start (and from the System Health surface viaGET /api/health), Clawboo runs a boot probe that reports a per-check verdict. Three of its checks concern your data, and those three are the only fatal ones (the server cannot run without them); everything else degrades (the server keeps serving and shows a banner):
A fatal check means the install is broken in a way the probe cannot fix, so read its
detail first: it says what is wrong and what to do. Upgrading is not one of those cases, because opening an older database adds any columns it is missing on its own. When nothing in the detail applies, the full reset above and re-running onboarding against a clean ~/.clawboo is the supported recovery.
Verify it worked
- After a reset, start the server and open System Health (
GET /api/health).databaseIntegrityanddatabaseSchemashould pass; the report’sresolved.dbPathshould point at your expectedclawboo.db. - After a backup/restore, confirm
clawboo.dbis present atresolved.dbPathand the integrity check passes. - After setting
CLAWBOO_HOME, the boot report’sresolved.clawbooHomeandresolved.dbPathreflect the override.
Troubleshooting
System Health shows
master key changed. The master key no longer decrypts the vault sentinel. If you rotated or lost secrets/master.key (or changed CLAWBOO_SECRETS_MASTER_KEY), saved runtime keys are unrecoverable; re-enter them in the Runtimes panel, or do a full reset.One-shot upgrades on first boot after an update
Some releases have to repair data that already exists, because nothing else rewrites a stored row. These run once, record that they ran, and never reverse a later deliberate change. Coordination toolset repair. Native agents created before the coordination overhaul were frozen with the Tasks and TeamChat MCP servers switched off, which disables the coordination plane those agents are now expected to use: the peer-inbox pull becomes a no-op and a leader cannot read the board it presides over. On the first boot after upgrading, existing native agents get those two axes turned back on (Tasks read-only, TeamChat on), leaving every other tool toggle exactly as you set it. A settings flag records that the pass ran, so turning either back off afterwards sticks. A failure is logged and retried on the next boot rather than being silently skipped.See also
- CLI reference:
clawboo backup,clawboo stop,clawboo restart - Configuration:
settings.json, file and directory locations - Environment variables:
CLAWBOO_HOME,CLAWBOO_DB_PATH,CLAWBOO_SECRETS_MASTER_KEY,OPENCLAW_STATE_DIR - Database schema: the 28 tables and ERD
- Security: the encrypted vault, redaction, and safe exposure
- Deployment: ports, the bundled server, and the CLI