gbrain-aio

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:

  1. 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
  2. Set GBRAIN_LAN_BIND to your Unraid host LAN IP and GBRAIN_PUBLIC_URL to https://that IP:3132. Both are local-network only.
  3. 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).
  4. 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.
  5. 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.

gbrain-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:

  1. PostgreSQL + pgvector — all data + vector embeddings live here
  2. A reverse proxy — the admin UI and MCP endpoint need HTTPS
  3. A job worker — background maintenance, nightly "dream," weekly doctor
  4. Embedding + chat models — Ollama for embeddings, plus a chat model
  5. 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 on 3132
  • 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-wiredgbrain-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 supportollama: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. Point OLLAMA_BASE_URL at 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:

  1. Runs gbrain init with ollama:embeddinggemma @ 768d
  2. Git-inits the brain if it is not a repo
  3. Registers and federates your source
  4. Writes sync paths and enables the gbrain-everything schema
  5. Sets model routing for Ollama
  6. Enqueues a sync once /health is up

No docker exec required.

Install (Unraid, ~3 min)

  1. Install the template
  2. Set POSTGRES_PASSWORD (alphanumeric) and GBRAIN_ADMIN_BOOTSTRAP_TOKEN (32+ chars)
  3. Leave default appdata paths, set your LAN HTTPS origin, Apply
  4. Wait for init
  5. 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>:11434 for 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.

Open the Apps tab on your Unraid server Search Community Apps for gbrain-aio Review the template variables and paths Click Install

Requirements

Docker with Compose. A LAN IP you control. Optional: a local Ollama at http://lan:11434 for embeddings and chat.

Download Statistics

292
Total Downloads

Related apps

Explore more like this

Explore all

Details

Repository
dub19/gbrain-aio
Last Updated2026-08-19
First Seen2026-08-19

Runtime arguments

Web UI
https://[IP]:[PORT:3132]
Network
bridge
Shell
sh
Privileged
false

Template configuration

Web UI PortPorttcp

Published HTTPS port (Caddy).

Target
3132
Default
3132
Value
3132
Postgres DataPathrw

Persistent PostgreSQL data.

Target
/data/postgres
Default
/mnt/user/appdata/gbrain-aio/data/postgres
Value
/mnt/user/appdata/gbrain-aio/data/postgres
GBrain HomePathrw

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
Caddy CertsPathrw

Persistent TLS certs and CA.

Target
/config/caddy
Default
/mnt/user/appdata/gbrain-aio/caddy
Value
/mnt/user/appdata/gbrain-aio/caddy
Brain PathPathrw

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 UserVariable

Postgres superuser. Keep gbrain.

Target
POSTGRES_USER
Default
gbrain
Value
gbrain
Postgres PasswordVariable

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 DBVariable

Postgres database name. Keep gbrain.

Target
POSTGRES_DB
Default
gbrain
Value
gbrain
LAN BindVariable

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
Public URLVariable

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
Admin Bootstrap TokenVariable

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
Source NameVariable

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
Brain UIDVariable

UID for the brain bind mount. Unraid default is 99 (nobody). Keep 99 unless you know otherwise.

Target
BRAIN_UID
Default
99
Value
99
Brain GIDVariable

GID for the brain bind mount. Unraid default is 100 (users). Keep 100 unless you know otherwise.

Target
BRAIN_GID
Default
100
Value
100
Ollama Base URLVariable

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 KeyVariable

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 API KeyVariable

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 ModelVariable

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
Brain Git Push URLVariable

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
Brain Git Push TokenVariable

Optional. Masked token for Brain Git Push URL. Empty = unauthenticated push. Never pasted into git remote -v.

Target
BRAIN_GIT_PUSH_TOKEN
Doctor Remediate Max USDVariable

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
Skillopt EnabledVariable

Optional. Empty = off. Set 1/true/yes/on to enable cycle.skillopt.enabled.

Target
SKILLOPT_ENABLED
Nightly Quality ProbeVariable

Optional. Empty = off. Set 1/true/yes/on to enable autopilot.nightly_quality_probe.enabled.

Target
NIGHTLY_QUALITY_PROBE
Parser Probe EnabledVariable

Optional. Empty = off. Set 1/true/yes/on to enable autopilot.conversation_parser_probe.enabled.

Target
PARSER_PROBE_ENABLED
Anthropic API KeyVariable

Optional. Enables Claude models for chat/think. Secret.

Target
ANTHROPIC_API_KEY
OpenAI API KeyVariable

Optional. Enables OpenAI models for chat/embeddings. Secret.

Target
OPENAI_API_KEY
Google Gemini API KeyVariable

Optional. Enables Google Gemini models. Secret.

Target
GEMINI_API_KEY
DeepSeek API KeyVariable

Optional. Enables DeepSeek models. Secret.

Target
DEEPSEEK_API_KEY
Groq API KeyVariable

Optional. Enables Groq models. Secret.

Target
GROQ_API_KEY
Voyage API KeyVariable

Optional. Enables Voyage embeddings/rerank. Secret.

Target
VOYAGE_API_KEY