self-host
ghostbrain already runs entirely on your machine — "self-hosting" here really means building the indexer from source instead of using the signed binary, plus a few extras: managing updates, backing up the vault, and understanding the licenses.
system requirements
| resource | minimum | recommended |
|---|---|---|
| cpu | apple silicon (m1 or later) | m2 / m3 / m4 |
| memory | 4 gb free | 8 gb free |
| disk | 2 gb + 1× your mail/slack archive | same, on an ssd |
| os | macos 12 (apple silicon only — windows + linux builds soon) | macos 14+ |
| obsidian | 1.5.0 | 1.7+ |
typical idle resource use after backfill: under 1% cpu, 250–500 mb resident memory. the local model is mmaped; you'll see the page-cache usage in top but it isn't pinned.
building from source
two repos:
- ghost-brain — the obsidian plugin (typescript, mit-licensed).
- ghost-brain/indexer — the local indexer + extraction model bindings (rust, fair-source license; see below).
plugin
git clone https://github.com/nikrich/ghost-brain
cd ghost-brain
npm install
npm run build
# drop the dist/ folder into your vault
cp -r dist/ "~/your-vault/.obsidian/plugins/ghostbrain"
indexer
cd ghost-brain/indexer
cargo build --release
# run it directly; the plugin will find it on its socket
./target/release/ghostbrain serve --vault ~/your-vault
the first build downloads the 1.8 gb model artefact. it's pinned by sha-256 in indexer/models.lock. you can mirror the artefact to your own object store and pass GHOSTBRAIN_MODEL_URL to fetch it from there in a locked-down environment.
rust 1.78+ and a working c toolchain are the only build-time requirements. on linux you'll also need libssl-dev (or openssl-devel) and pkg-config. the build is reproducible — same source tree gives byte-identical binaries.
updating
three update channels:
| channel | what you get |
|---|---|
| stable | once-a-month tagged release. recommended. |
| beta | release candidates, one or two weeks before stable. |
| nightly | main branch, built every commit. expect breakage. |
set the channel in settings → ghostbrain → updates, or by env: GHOSTBRAIN_CHANNEL=beta. the plugin checks once a day on launch and prompts you; it never updates silently.
disk & storage
ghostbrain stores three things:
- markdown notes — in your obsidian vault. backup with your normal vault backup.
- indexer state — under
vault/.ghostbrain/. small, mostly text. include in vault backup. - the model — under
~/.ghostbrain/models/. ~1.8 gb. you can exclude from backup; it'll be re-downloaded.
backup
# tar.gz the vault + .ghostbrain/ (skips the model)
ghostbrain export ~/Backups/ghostbrain-$(date +%F).tar.gz
restoring is "untar and point obsidian at it." tokens are not exported — you'll reconnect each app on restore. this is on purpose.
encrypting at rest
ghostbrain doesn't encrypt the vault itself — that's your filesystem's job. use filevault, bitlocker, or luks. if you want per-vault encryption inside an unencrypted volume, obsidian has plugins for that (e.g. age-encrypt); they work fine with ghostbrain.
licenses
two different ones, on purpose:
| component | license | what it means |
|---|---|---|
| obsidian plugin | mit | do whatever you want. attribution preserved. |
| indexer (rust) | fair-source 0.9 | read, build, fork for personal & small-org use (≤ 5 users). reach out for a commercial license at the 6th user. |
| extraction model | research-only weights | included for use inside ghostbrain. not redistributable as a standalone model. |
"fair-source" isn't strictly open source under the osi definition. it's a pragmatic middle path: source available, free for almost everyone, paid only when an organisation reaches a certain size. it converts to apache-2.0 after two years (the "delayed open source publication" clause).
running on an airgapped machine
- on a connected machine, run
ghostbrain bundle --output offline.tar. this packages the binary, the model, and a pinned dependency mirror. - transfer
offline.tarto the airgapped machine. ghostbrain bundle --install offline.tar.- connect connectors that don't require oauth (linear api key, github pat, notion integration token). gmail/slack/calendar/drive require a one-time browser exchange and won't work on an airgapped host.
troubleshooting
ghostbrain doctor covers most issues. common failure modes:
| symptom | cause | fix |
|---|---|---|
| "port 7349 in use" | another ghostbrain or unrelated process bound the port | set GHOSTBRAIN_PORT to another port, restart obsidian |
| fan spins on backfill | working as designed, briefly | backfill rate-limits itself; let it finish once and idle cpu drops < 1% |
| "keychain access denied" on macos | obsidian sandboxing edge case | open keychain access, grant ghostbrain-indexer "always allow" |
| graph view doesn't update | obsidian's cache stale | cmd+r in obsidian to reload, or run ghostbrain reindex |