Configure

Put the three values in deploy/.env. In a Compose .env file, write every $ in the password hash as $$. Keep this file out of Git.

Run

The app listens on 127.0.0.1:8787 with the vault mounted from the host. Change the vault path with BRAIN_VAULT.

Add TLS

Put a reverse proxy in front. With Caddy:
Set BRAIN_SECURE_COOKIE=1 once the app is served over HTTPS.

Read-only snapshot on Vercel

deploy/vercel.sh publishes a read-only copy of the vault as a serverless app. It ships a prebuilt index with the deployment, so a new instance does not have to index the vault before it answers.
The snapshot is a copy from the time of deployment. Writes are refused.

Keep the vault in sync

The vault is a Git checkout. To pick up changes pushed from elsewhere, pull on a timer: