ghostbrain/docs/self-host

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

resourceminimumrecommended
cpuapple silicon (m1 or later)m2 / m3 / m4
memory4 gb free8 gb free
disk2 gb + 1× your mail/slack archivesame, on an ssd
osmacos 12 (apple silicon only — windows + linux builds soon)macos 14+
obsidian1.5.01.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:

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.

note

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:

channelwhat you get
stableonce-a-month tagged release. recommended.
betarelease candidates, one or two weeks before stable.
nightlymain 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:

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:

componentlicensewhat it means
obsidian pluginmitdo whatever you want. attribution preserved.
indexer (rust)fair-source 0.9read, build, fork for personal & small-org use (≤ 5 users). reach out for a commercial license at the 6th user.
extraction modelresearch-only weightsincluded for use inside ghostbrain. not redistributable as a standalone model.
note

"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

  1. on a connected machine, run ghostbrain bundle --output offline.tar. this packages the binary, the model, and a pinned dependency mirror.
  2. transfer offline.tar to the airgapped machine.
  3. ghostbrain bundle --install offline.tar.
  4. 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:

symptomcausefix
"port 7349 in use"another ghostbrain or unrelated process bound the portset GHOSTBRAIN_PORT to another port, restart obsidian
fan spins on backfillworking as designed, brieflybackfill rate-limits itself; let it finish once and idle cpu drops < 1%
"keychain access denied" on macosobsidian sandboxing edge caseopen keychain access, grant ghostbrain-indexer "always allow"
graph view doesn't updateobsidian's cache stalecmd+r in obsidian to reload, or run ghostbrain reindex