All apps · 0 apps
gbrain-aio
Docker app from dub19's Repository
Overview
Vanilla GBrain all-in-one for Unraid. One s6 container runs PostgreSQL 17 + pgvector, the official GBrain HTTP server, a Caddy TLS reverse proxy, the GBrain job supervisor, and in-container maintain (autopilot every 30 minutes, nightly dream, weekly doctor). Postgres listens on loopback only and is never published. Agents connect only through the MCP endpoint, never to Postgres.
First run:
- Set POSTGRES_PASSWORD (alphanumeric) and GBRAIN_ADMIN_BOOTSTRAP_TOKEN (32+ chars, alphanumeric + _-). Generate a token with: head -c 32 /dev/urandom | base64 | tr -d '+/=' | head -c 48
- Set GBRAIN_LAN_BIND to your Unraid host LAN IP and GBRAIN_PUBLIC_URL to https://that IP:3132. Both are local-network only.
- Create an empty brain folder (e.g. /mnt/user/my-brain) and set Brain Path to it. Set Source Name to the folder's name (e.g. my-brain).
- Start the container, then open https://lan:3132/admin/ and paste the bootstrap token. The container inits the brain, git-inits if needed, registers the source, and queues a sync. No docker exec required.
- Trust the generated CA once (caddy/certs/ca.pem) on any phone or WebView.
Advanced users can point OLLAMA_BASE_URL at a local Ollama for embeddings and openai-compat chat, or add a provider API key (Anthropic, OpenAI, Gemini, DeepSeek, Groq, Voyage) in the advanced fields. Leave optional URL, budget, and toggle fields empty to keep them off.
Readme
View on GitHubgbrain-aio
Run GBrain as one container — a hosted knowledge base and MCP server for AI agents. No Postgres setup, no reverse proxy, no worker to manage. Install the Unraid template, set a few values, and it's ready on first boot.
What this is for
GBrain is a self-hosted second brain. Point an AI agent harness at it and it becomes your persistent memory and knowledge store. gbrain-aio packages GBrain so you can run it as a hosted GBrain MCP server for agent frameworks like Hermes Agent, OpenClaw, Codex, and any harness that speaks MCP. Agents connect to it over HTTPS and get queryable memory — not a raw database.
The problem it solves
GBrain will not just run. A real deployment needs five things bolted together:
- PostgreSQL + pgvector — all data + vector embeddings live here
- A reverse proxy — the admin UI and MCP endpoint need HTTPS
- A job worker — background maintenance, nightly "dream," weekly doctor
- Embedding + chat models — Ollama for embeddings, plus a chat model
- A build — GBrain has no official Docker image
Wiring those by hand on Unraid is the whole problem. gbrain-aio does it for you.
What you get in this container
GBrain, running with its full default setup — the reason you're here:
- The GBrain HTTP + MCP server on
127.0.0.1:3131, fronted by Caddy TLS on3132 - The job supervisor — runs background work
- Autopilot — self-maintenance every 30 min
- Nightly dream (02:00) and weekly doctor (Monday 06:00)
- Schema + sources pre-wired —
gbrain-everything, your source federated, sync queued
Plus the supporting infrastructure, all in the same container:
- PostgreSQL 17 + pgvector — loopback only, never published
- Caddy TLS — the public face
- Embedding support —
ollama:embeddinggemma@ 768d
Pinned to official garrytan/gbrain releases. Agents connect only through HTTPS — Postgres is never handed to them.
Embeddings & models
A local Ollama is required for embedding — the container indexes every document into vector space and needs ollama:embeddinggemma @ 768d to do it. Only embeddinggemma is supported today.
- Ollama (required) — the container uses
ollama:embeddinggemma@ 768d. PointOLLAMA_BASE_URLat your local Ollama (e.g.http://<lan>:11434). A GPU is strongly recommended — large brains index and query much faster with GPU-backed embeddings. - Chat / expansion models — add an Anthropic, OpenAI, Gemini, DeepSeek, Groq, or Voyage API key, or route through the same Ollama instance. Leave chat model fields empty to keep defaults.
First boot does the setup for you
Start empty, and the container:
- Runs
gbrain initwithollama:embeddinggemma@ 768d - Git-inits the brain if it is not a repo
- Registers and federates your source
- Writes sync paths and enables the
gbrain-everythingschema - Sets model routing for Ollama
- Enqueues a sync once
/healthis up
No docker exec required.
Install (Unraid, ~3 min)
- Install the template
- Set
POSTGRES_PASSWORD(alphanumeric) andGBRAIN_ADMIN_BOOTSTRAP_TOKEN(32+ chars) - Leave default appdata paths, set your LAN HTTPS origin, Apply
- Wait for init
- Open
https://<lan>:3132/admin/, paste the token, trust the generated CA once
Requirements
- Unraid (with Community Applications) or any Docker host
- A LAN IP you control
- Ollama at
http://<lan>:11434for embeddings (GPU recommended)
Not included
- No host PostgreSQL — everything runs inside the container
Persistence
Back up the brain repo, Postgres data, and Caddy certs under /mnt/user/appdata/gbrain-aio/ if you care about the instance.
License
MIT. GBrain under its own upstream license.
Install gbrain-aio on Unraid in a few clicks.
Find gbrain-aio in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Requirements
Categories
Download Statistics
Related apps
Explore more like this
Explore allDetails
dub19/gbrain-aioRuntime arguments
- Web UI
https://[IP]:[PORT:3132]- Network
bridge- Shell
sh- Privileged
- false
Template configuration
Published HTTPS port (Caddy).
- Target
- 3132
- Default
- 3132
- Value
- 3132
Persistent PostgreSQL data.
- Target
- /data/postgres
- Default
- /mnt/user/appdata/gbrain-aio/data/postgres
- Value
- /mnt/user/appdata/gbrain-aio/data/postgres
GBrain config, OAuth secrets, runtime.env.
- Target
- /var/lib/gbrain
- Default
- /mnt/user/appdata/gbrain-aio/gbrain-home
- Value
- /mnt/user/appdata/gbrain-aio/gbrain-home
Persistent TLS certs and CA.
- Target
- /config/caddy
- Default
- /mnt/user/appdata/gbrain-aio/caddy
- Value
- /mnt/user/appdata/gbrain-aio/caddy
Host path to the brain markdown repo. This is the folder GBrain reads/writes as its knowledge base. It should be an empty folder (or a git repo) that GBrain will initialize. The folder name must match the Source Name below.
- Target
- /my-brain
- Default
- /mnt/user/my-brain
- Value
- /mnt/user/my-brain
Postgres superuser. Keep gbrain.
- Target
- POSTGRES_USER
- Default
- gbrain
- Value
- gbrain
REQUIRED. Alphanumeric only (A-Za-z0-9). Secret. Example: mypass123. Generate: head -c 16 /dev/urandom | base64 | tr -d '+/=' | head -c 16
- Target
- POSTGRES_PASSWORD
Postgres database name. Keep gbrain.
- Target
- POSTGRES_DB
- Default
- gbrain
- Value
- gbrain
Your Unraid host LAN IP (e.g. 192.168.1.50). The container binds HTTPS to this IP. This is local-network only, not a public address.
- Target
- GBRAIN_LAN_BIND
Local HTTPS origin clients use. Must be https://your LAN IP:3132 (same IP as LAN Bind). Local-only. Example: https://192.168.1.50:3132
- Target
- GBRAIN_PUBLIC_URL
First /admin login token. Must be 32+ chars, alphanumeric + _-. Secret. Generate: head -c 32 /dev/urandom | base64 | tr -d '+/=' | head -c 48
- Target
- GBRAIN_ADMIN_BOOTSTRAP_TOKEN
Name of the mounted brain source. MUST equal the basename of the Brain Path folder. Example: if Brain Path is /mnt/user/my-brain, Source Name is my-brain.
- Target
- SOURCE_NAME
- Default
- my-brain
- Value
- my-brain
UID for the brain bind mount. Unraid default is 99 (nobody). Keep 99 unless you know otherwise.
- Target
- BRAIN_UID
- Default
- 99
- Value
- 99
GID for the brain bind mount. Unraid default is 100 (users). Keep 100 unless you know otherwise.
- Target
- BRAIN_GID
- Default
- 100
- Value
- 100
OpenAI-compatible endpoint for embeddings + chat. Point at your local Ollama. Example: http://192.168.1.50:11434/v1 (replace with your Ollama host IP). Leave empty to skip local Ollama.
- Target
- OLLAMA_BASE_URL
Ollama API key. 'ollama' is the default for a local Ollama. Only needed if your Ollama requires a key.
- Target
- OLLAMA_API_KEY
- Default
- ollama
- Value
- ollama
Together-compatible key. GBrain routes chat/dream/think through the Ollama /v1 endpoint using this key. For a local Ollama, 'ollama' works. Set a real Together key only if you route through Together.
- Target
- TOGETHER_API_KEY
- Default
- ollama
- Value
- ollama
Chat model name used when OLLAMA_BASE_URL is set. Written as together:this name. Leave the default unless you know another model. Empty Ollama URL means no chat model (keyword/embed-or-skip).
- Target
- CHAT_MODEL
- Default
- deepseek-v4-flash:cloud
- Value
- deepseek-v4-flash:cloud
Optional. After a successful autopilot-cycle, push the mounted brain to this remote. Empty = off. Do not point a test copy at a live canonical remote. The token is not stored in the remote URL.
- Target
- BRAIN_GIT_PUSH_URL
Optional. Masked token for Brain Git Push URL. Empty = unauthenticated push. Never pasted into git remote -v.
- Target
- BRAIN_GIT_PUSH_TOKEN
Optional. Weekly doctor exam always runs. Set a number to also run gbrain doctor --remediate --max-usd N for that run's estimate. Empty = exam only. Not a weekly wallet.
- Target
- DOCTOR_REMEDIATE_MAX_USD
Optional. Empty = off. Set 1/true/yes/on to enable cycle.skillopt.enabled.
- Target
- SKILLOPT_ENABLED
Optional. Empty = off. Set 1/true/yes/on to enable autopilot.nightly_quality_probe.enabled.
- Target
- NIGHTLY_QUALITY_PROBE
Optional. Empty = off. Set 1/true/yes/on to enable autopilot.conversation_parser_probe.enabled.
- Target
- PARSER_PROBE_ENABLED
Optional. Enables Claude models for chat/think. Secret.
- Target
- ANTHROPIC_API_KEY
Optional. Enables OpenAI models for chat/embeddings. Secret.
- Target
- OPENAI_API_KEY
Optional. Enables Google Gemini models. Secret.
- Target
- GEMINI_API_KEY
Optional. Enables DeepSeek models. Secret.
- Target
- DEEPSEEK_API_KEY
Optional. Enables Groq models. Secret.
- Target
- GROQ_API_KEY
Optional. Enables Voyage embeddings/rerank. Secret.
- Target
- VOYAGE_API_KEY