The whole box, in Compose.
The repository includes Docker Compose for PostgreSQL with pgvector, the gateway, and the console. You need Docker with Compose v2 or later, storage for your database and backups, and capacity for the gateway and active workspace processes. The build downloads base images, packages, and the pinned gbrain engine.
Built on good foundations.
Engram’s memory engine is gbrain by Garry Tan, used through a pinned fork. Engram and gbrain are MIT licensed.
As Engram earns revenue, we’ll use a portion to sponsor open-source projects.
Configure and start.
From the repository directory, copy the example environment file and make it private. Generate a password, then put it in POSTGRES_PASSWORD in .env. Do not commit the file.
cp .env.example .env
chmod 600 .env
openssl rand -hex 32
# Put the generated password in POSTGRES_PASSWORD in .env.
docker compose up --build -dThe gateway starts at http://localhost:8080. The default Compose setup binds the web port to loopback and does not publish the database port. Open http://localhost:8080/app for the console.
Create your owner account.
Use a trusted admin terminal. This creates a team workspace and a separate personal workspace, and prints a temporary owner credential once.
docker compose exec engram bun cli/engram-admin.ts workspace create --name "My workspace" --email you@example.comIn your self-hosted console, choose “Use an access token” and paste the temporary credential. This recovery path is available on self-hosted installations; the hosted console uses verified email sign-in.
Keep the credential out of screenshots, logs, and command history. For an existing owner who needs another temporary session, use the documented owner recovery command.
Give each agent its own connection.
Open Connections and create a named workspace key for each agent. Turn off write access for connections that should only read. Then use the hidden token prompt in guided setup:
npx @ani-hq/engram-mcp setup --host http://localhost:8080Restart the agent connection and perform a real remember-and-recall check. Email login requires an email provider; chat connectors that need OAuth also require signing-key and canonical-URL configuration. Bearer MCP connections work without those services.
Optional: bring your own Jev key.
Jev uses TypeSafe for routing, ranking, and review suggestions. It is optional: core memory, keyword search, and activity work without it. Add JEV_API_KEY to your private .env file and keep REFLEX_MODEL=jev-1.13.0 pinned. The included Compose configuration passes these values to the server.
# Edit .env locally. Never put the key in a browser field.
# JEV_API_KEY and REFLEX_MODEL are documented in .env.example.
docker compose up -d engramThen sign in as a workspace owner and enable Jev in Workspace settings. A configured key alone does not grant workspace permission. Voyage embeddings and OpenAI briefs keep their separate permission.
Your TypeSafe account pays the provider directly. Engram adds no usage charge and does not show a provider-spend meter for self-hosted usage. A monthly budget of 0 leaves monetary limits to your provider account; Engram’s configured daily call cap still applies. Relevant query text and bounded memory or activity context can leave the server when Jev is used. Provider terms and retention apply.
Keep it running. Keep it yours.
Self-hosted mode does not call Stripe, enforce a hosted trial, or contact a licence server. Optional external AI starts off; adding a provider key alone does not turn it on for a workspace.
You are responsible for TLS, updates, strong credentials, database backups, retention, and network access. Before exposing the service, put it behind an HTTPS reverse proxy, set the canonical URL, and enable secure cookies. Do not expose the loopback HTTP quickstart directly to the internet.
Host and database administrators can access stored content. Self-hosting is an infrastructure choice, not an end-to-end encryption guarantee.