Use this after docs/getting-started.md. Getting-started covers first install and client wiring; this runbook covers operating an existing Dory host.
Foreground daemon:
uv run dory-http --corpus-root data/corpus --index-root .dory/index --host 127.0.0.1 --port 8766Docker:
cp .env.example .env
mkdir -p data/corpus
# Edit .env and set either Gemini embedding auth or local embedding endpoint variables.
docker compose up -d --buildClient or solo bootstrap:
bash scripts/ops/install-dory.sh client
bash scripts/ops/install-dory.sh soloEnvironment-specific paths:
DORY_DATA_ROOT— Docker host storageDORY_CORPUS_ROOT— markdown source of truthDORY_INDEX_ROOT— disposable SQLite index stateDORY_AUTH_TOKENS_PATH— bearer tokensDORY_HTTP_URL— client connection
docker compose up -d --build- Check out the previous working git commit.
- Run
docker compose up -d --build. - If you publish your own image, pin that tag in your deployment override and restart from it.
If the sidecar index is corrupted or stale, delete ~/dory/.index/ and rebuild:
export DORY_GEMINI_API_KEY=...
# or:
export DORY_EMBEDDING_PROVIDER=local
export DORY_LOCAL_EMBEDDING_BASE_URL=http://127.0.0.1:8000/v1
export DORY_LOCAL_EMBEDDING_MODEL=qwen3-embed
uv run dory --corpus-root ~/dory --index-root ~/dory/.index reindex- Confirm the git backup remote is reachable.
- Restore the markdown tree into a temp directory.
- Rebuild the index with the reindex command above.
GET /v1/statusoruv run dory --corpus-root ~/dory --index-root ~/dory/.index status.
Backups are git-based and intentionally separate from the Dory code repository. The corpus directory must be its own private git repository with a configured origin remote. If the corpus uses git-crypt, keep .gitattributes in that corpus repo so commits are encrypted before they reach the remote.
Commit and push the markdown repo to its backup remote:
DORY_CORPUS_ROOT=~/dory bash scripts/ops/backup.shThe script stages corpus changes, creates a timestamped backup commit when there is anything to commit, and pushes origin. It explicitly skips runtime indexes, Dory auth state, env files, keys, logs, and OS junk. It fails fast if DORY_CORPUS_ROOT is not a git repository or has no origin.
For encrypted corpus backups, install git-crypt on the host before initializing or committing the corpus repo. A .gitattributes file alone is not enough; without the git-crypt filter installed, Git cannot safely clean/smudge encrypted paths. The backup script fails before staging if it sees filter=git-crypt but cannot find git-crypt.
Install a nightly cron entry:
bash scripts/ops/install-backup-cron.sh '17 3 * * *' ~/doryDefault schedule is 17 3 * * *. Pass a custom cron expression as the first argument and the corpus root as the second. The installer writes DORY_CORPUS_ROOT into the cron entry so it does not depend on an interactive shell environment.
One-shot:
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops dream-once
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops daily-digest-once
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops weekly-digest-once
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops maintain-once
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops wiki-refresh-once
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops wiki-refresh-indexes
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops eval-once
uv run dory --corpus-root ~/dory --index-root ~/dory/.index maintain wiki-health
uv run dory --corpus-root ~/dory migrate ~/legacy-brain
uv run dory --corpus-root ~/dory migrate --estimate --sample 25 ~/legacy-brain
uv run dory --corpus-root ~/dory migrate --interactive ~/legacy-brainForeground watcher:
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops watch --debounce-seconds 1.0macOS launchd helpers:
bash scripts/ops/install-ops-launchd.shInteractive bootstrapper for host or client:
bash scripts/ops/install-dory.sh host
bash scripts/ops/install-dory.sh client
bash scripts/ops/install-dory.sh soloThe client flow writes a local Dory config, registers Claude Code MCP when available, and installs the local session shipper service for the selected OS.
Solo writes both host and client configs so one machine runs Dory locally and also auto-discovers local sessions from Claude, Codex, and opencode.
Full client setup: client-runbook.md.
Move a large markdown corpus into the new Dory schema without switching any harness memory backend:
uv run dory --corpus-root ~/dory migrate ~/legacy-brain
uv run dory --corpus-root ~/dory migrate --estimate --sample 25 ~/legacy-brain
uv run dory --corpus-root ~/dory migrate --interactive ~/legacy-brainWhat it does:
- stages legacy files
- classifies them into the new schema
- extracts memory atoms
- bootstraps canonical pages
- preserves original evidence
- writes a report to
references/reports/migrations/ - quarantines ambiguous cases into
inbox/quarantine/
--estimate → non-interactive preflight with selected file counts, folder stats, token totals, and pricing when configured.
migrate --interactive → operator console with scope controls, live progress, and report pointers.
Expected layout after a successful run:
core/people/projects/concepts/decisions/logs/sessions/sources/*digests/daily/digests/weekly/references/reports/migrations/
After migration, regenerate the compiled wiki:
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops wiki-refresh-onceSave a markdown artifact instead of a transient answer:
uv run dory research "What are we working on right now?" --kind report
uv run dory research "Summarize Rooster." --kind briefing
uv run dory research "What do we know about Crawstr?" --kind wiki-noteDestinations:
report→references/reports/YYYY-MM-DD-<slug>.mdbriefing→references/briefings/YYYY-MM-DD-<slug>.mdwiki-note→wiki/concepts/<slug>.md
Preferred memory writes are semantic and fuzzy-routed, not path-first:
uv run dory --corpus-root ~/dory --index-root ~/dory/.index memory-write \
"Rooster is the active focus this week." \
--subject rooster \
--kind decisionEquivalent surfaces:
- HTTP:
POST /v1/memory-write - MCP:
dory_memory_write - Claude bridge:
dory_memory_write - OpenClaw plugin tool:
memory_write - Hermes provider:
memory_write(...)
Use legacy write only for compatibility and debug flows where a path-first markdown mutation is intentional.
Parity surfaces:
POST /v1/recall-eventGET /v1/public-artifacts/v1/status→openclawdiagnostics block- non-null OpenClaw plugin flush plan
- recall-promotion candidate tracking feeding
ops dream-once
Not parity-complete yet:
- builtin/local fallback if Dory HTTP is unavailable
Timeline migration preview / write:
uv run python scripts/ops/migrate_timeline_v1.py --corpus-root ~/dory
uv run python scripts/ops/migrate_timeline_v1.py --corpus-root ~/dory --writeuv run dory --corpus-root ~/dory --index-root ~/dory/.index reindex
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops eval-once
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops dream-once
uv run dory --corpus-root ~/dory --index-root ~/dory/.index ops maintain-once
uv run dory-http --corpus-root ~/dory --index-root ~/dory/.index --host 127.0.0.1 --port 8766
export DORY_CLIENT_AUTH_TOKEN="$(uv run dory --corpus-root ~/dory --index-root ~/dory/.index auth new runbook)"
curl http://127.0.0.1:8766/v1/status -H "Authorization: Bearer $DORY_CLIENT_AUTH_TOKEN"
curl -X POST http://127.0.0.1:8766/v1/search \
-H "Authorization: Bearer $DORY_CLIENT_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"who is Alex","k":3}'ops dream-once does two things:
- distills new session logs into
inbox/distilled/* - materializes recall-promotion notes from repeated OpenClaw recall hits, then proposes durable writes
Dream proposal/apply is semantic-first:
- proposal JSON stores
action,kind, fuzzysubject,content dream applyroutes through Dory semantic memory writes instead of path-first markdown mutations
- HTTP status:
GET /v1/status - Metrics:
GET /metrics - Logs:
docker compose logs -f doryd - Embedding provider: default Gemini uses
DORY_GEMINI_API_KEYorGOOGLE_API_KEY; local/LAN OpenAI-compatible embeddings useDORY_EMBEDDING_PROVIDER=localwithDORY_LOCAL_EMBEDDING_* - OpenRouter auth for dreaming / maintenance:
DORY_OPENROUTER_API_KEYorOPENROUTER_API_KEY - Optional active-memory LLM:
DORY_ACTIVE_MEMORY_LLM_PROVIDER(off/local/openrouter/auto). Forlocal, pointDORY_LOCAL_LLM_BASE_URLat an OpenAI-compatible endpoint (e.g.http://127.0.0.1:11434/v1) and setDORY_LOCAL_LLM_MODEL.DORY_ACTIVE_MEMORY_LLM_STAGESpicksplan,compose, orboth;composeis the safest default for small local models. Dory skips the LLM path when the request deadline is too tight, and active-memory stays read-only with budget-clamped evidence either way.