Railway

Deploy Engram

Git-backed markdown memory for AI agents that knows what's still true

Deploy Engram

rwnalds/engram:latest

rwnalds/engram:latest

Just deployed

/data

Deploy and Host Engram on Railway

Engram is a self-hosted MCP server and dashboard that gives Claude Code, Cursor, and any Model Context Protocol agent shared long-term memory over a plain, git-backed folder of markdown. Unlike a vector store, it tracks whether a fact is still true — retire a price or a contract term and search stops surfacing it, and tells the agent what it skipped and why.

About Hosting Engram

Engram runs as a single Docker container with a persistent volume. It is not serverless — it holds a mounted volume, a file watcher, and an in-memory search index that a serverless function cannot keep alive. This template deploys the dashboard plus the HTTP MCP endpoint from a pinned, multi-arch image.

Setup is one volume mounted at /data and five environment variables that bootstrap auth and tell the app where state lives. Everything else — git sync, commit author, the optional Curator agent, GitHub OAuth — is configured in the dashboard Settings page with no redeploy. Vault repositories are connected through the UI rather than baked into the deployment, so you can add, switch, or remove them at any time.

Common Use Cases

  • Shared memory for a team running several AI agents — one vault, many agents reading and writing concurrently, each with its own read-only or read-write token and a git audit trail of who changed what
  • Long-term memory for Claude Code and other coding agents — stop re-explaining your project every session
  • A self-hosted, Obsidian-compatible second brain exposed over MCP — point it at an existing vault, no import step
  • Markdown RAG without a vector database — full-text search plus a wikilink graph over human-readable files
  • An audit trail for autonomous agents — every write is committed to git and attributed, with per-file diffs in the dashboard

Dependencies for Engram Hosting

  • A persistent volume mounted at /data — holds app state, token hashes, and vault clones. Without it your data is wiped on every redeploy.
  • A Google OAuth client — dashboard login. Free to create in Google Cloud Console.
  • A git repository of markdown — your vault. Can be an existing Obsidian vault, or a fresh empty repo.

Deployment Dependencies

Implementation Details

Five variables are required on the host, because they gate login itself or say where state lives, so they cannot be configured from inside the app:

VariableValue
ENGRAM_DATA_DIR/data — must match the volume mount path
AUTH_SECRETGenerate a random value. If left empty the dashboard is open to anyone.
APP_URLhttps://${{RAILWAY_PUBLIC_DOMAIN}}
ALLOWED_EMAILSComma-separated Google accounts allowed to sign in
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRETFrom your Google OAuth client

In the Google Cloud Console, register these against your APP_URL:

  • Authorized redirect URI: /api/auth/callback
  • Authorized JavaScript origin: ``

After deploying, sign in, connect a vault repository under Workspaces, then create a per-agent token on the Connect page and point your agent at it:

claude mcp add --transport http engram https://.up.railway.app/api/mcp \
  --header "Authorization: Bearer "

Claude.ai custom connectors authenticate over OAuth instead of a pasted token; Engram serves that flow automatically whenever AUTH_SECRET is set.

## Why Deploy Engram on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Engram on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Template Content

rwnalds/engram:latest

ghcr.io/rwnalds/engram:latest

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
113
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
1
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
51