
Deploy Engram Cloud
Sync and search AI coding agent memory across machines and teammates.
Just deployed
/var/lib/postgresql/data
Just deployed
Deploy and Host Engram Cloud on Railway

Engram is an open source persistent memory system for AI coding agents. Your agent forgets everything when a session ends; Engram gives it a place to save decisions, bug fixes, conventions and discoveries, and to search them in later sessions. It's a single Go binary with a local SQLite database and full-text search, it plugs into Claude Code, Codex, Cursor, Gemini CLI, OpenCode and other agents through MCP, and it's MIT-licensed with about 8,200 GitHub stars. This template deploys Engram Cloud on Railway: the engram cloud serve runtime with its web dashboard, backed by managed PostgreSQL. Each developer's machine keeps its own local memory and pushes selected projects to the cloud server, so memory follows you between laptops and a team can share one searchable index. Tokens for syncing and for the admin dashboard are generated at deploy time. Hosting costs about $5–15/month on Railway.
What This Template Deploys
| Service | Purpose |
|---|---|
| engram | ghcr.io/gentleman-programming/engram:1.20 running the cloud server on port 18080 with a public domain. Sync API, dashboard at /dashboard and /health. |
| Postgres | PostgreSQL 18 with a volume. Synced chunks, sessions, observations, projects and audit events. |
ENGRAM_CLOUD_TOKEN (for CLI sync), ENGRAM_CLOUD_ADMIN (for the dashboard), ENGRAM_JWT_SECRET and ENGRAM_CLOUD_TOKEN_PEPPER are all generated for each deploy.
About Hosting Engram Cloud
Coding agents are good at a task and bad at remembering why things are the way they are. Engram stores structured observations rather than raw transcripts, so an agent can recall "we use pnpm, not npm" or "this test is flaky because of the timezone" in a new session without reading old chats.
Local first. Every machine keeps its own SQLite store, which stays authoritative. Nothing goes to the server until you enroll a project and run a sync, so you choose exactly what is shared.
What gets stored. Observations have a type, such as decision, bug fix, discovery or convention, plus a topic key, so an evolving decision is updated instead of piling up contradictory copies.
MCP tools. Agents save and search memories through Engram's MCP server, so you don't paste context by hand; the agent decides when to remember and recall.
Why a cloud server. Without one, memory lives on a single laptop. With Engram Cloud, you can sync a project from your work machine and import it on another, and a team can push to one server so everyone's agent benefits from the same decisions and fixes.
Dashboard. The browser dashboard lists projects, sessions and observations, so you can see what your agents have learned, search it, and check sync activity. Sign in with the admin token.
Access control. Sync clients authenticate with a bearer token, and ENGRAM_CLOUD_ALLOWED_PROJECTS limits which project names the server accepts. It's * by default; set a comma-separated list to lock it down.
Version note. This template is pinned to Engram 1.20. The Engram CLI has since moved to the 3.x series, so install a CLI version that matches the server, or test a newer image tag before upgrading.
Typical cost: ~$5–15/month on Railway for the Engram server and Postgres. Memory data is small text, so storage grows slowly.
Deploy Engram Cloud in Under 5 Minutes
- Click Deploy on Railway. Postgres and the Engram server start.
- Copy
ENGRAM_CLOUD_ADMINandENGRAM_CLOUD_TOKENfrom the engram service's Variables. - Open
https://your-domain/dashboardand sign in with the admin token. - On your machine, run
engram cloud config --server https://your-domainand exportENGRAM_CLOUD_TOKEN. - Run
engram cloud enroll my-project, thenengram sync --cloud --project my-project.
The project appears in the dashboard. On a second machine, run engram sync --cloud --import --project my-project to pull the memories down. If the import is empty, check that both machines use the same project name and token.
Common Use Cases
- Memory across laptops. Keep your agent's knowledge in sync between work and home machines.
- Team knowledge base. Share decisions, conventions and fixes so every teammate's agent knows them.
- Onboarding. New developers' agents start with the project's accumulated context.
- Multi-agent setups. Let Claude Code, Codex and Cursor read and write the same memory.
- Auditing what agents learned. Review observations in the dashboard and spot bad assumptions.
- Private alternative to vendor memory. Keep engineering context on your own infrastructure.
- Consultants and freelancers. Keep a project per client and sync only the ones you choose.
- Code review context. Let review agents recall past decisions about a module before suggesting changes.
- Long-running projects. Preserve months of decisions that would otherwise vanish with each session.
Configuration
| Variable | Required | Description |
|---|---|---|
ENGRAM_CLOUD_TOKEN | 🔐 Auto-generated | Bearer token CLI clients use to sync. |
ENGRAM_CLOUD_ADMIN | 🔐 Auto-generated | Admin token for the dashboard and admin routes. |
ENGRAM_JWT_SECRET | 🔐 Auto-generated | Signs dashboard session cookies. |
ENGRAM_CLOUD_TOKEN_PEPPER | 🔐 Auto-generated | Hashes managed per-user tokens. |
ENGRAM_DATABASE_URL | ✅ Auto-injected | Postgres connection string. |
ENGRAM_CLOUD_ALLOWED_PROJECTS | ✅ Set | *. Set a comma-separated list to restrict project names. |
ENGRAM_CLOUD_HOST | ✅ Set | 0.0.0.0, so Railway can reach the server. |
ENGRAM_PORT, PORT | ✅ Set | 18080. |
ENGRAM_CLOUD_MAX_PUSH_BYTES | Optional | 8388608, the largest chunk a client can push (8 MB). |
Rotating tokens. Change ENGRAM_CLOUD_TOKEN or ENGRAM_CLOUD_ADMIN and redeploy, then update every client that syncs.
Team members. Instead of sharing one sync token, create managed users and per-person tokens with Engram's admin tools; that relies on ENGRAM_CLOUD_TOKEN_PEPPER, which is already set.
Custom domain. Add it to the engram service and point engram cloud config --server at the new address.
Engram Cloud vs. Alternatives
| Engram Cloud on Railway | Local Engram only | Vendor agent memory | Notes in the repo | |
|---|---|---|---|---|
| Monthly cost | ~$5–15 usage | Free | Bundled in plans | Free |
| Self-hosted | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
| Works across agents | ✅ Via MCP | ✅ Via MCP | ❌ One vendor | ⚠️ Manual |
| Sync across machines | ✅ Yes | ❌ No | ✅ Yes | ⚠️ Through Git |
| Shared team memory | ✅ Yes | ❌ No | ⚠️ Limited | ⚠️ Manual |
| Searchable dashboard | ✅ Yes | ⚠️ Local TUI | ⚠️ Varies | ❌ No |
| License | ✅ MIT | ✅ MIT | ❌ Proprietary | ✅ Yours |
Dependencies for Engram Cloud Hosting
- Railway account. Hobby is enough for a person or small team.
- The Engram CLI installed on each machine that syncs, at a version compatible with the server.
- An AI coding agent connected to Engram through MCP.
- Optional: a second machine to confirm that import works.
Deployment Dependencies
- Engram on GitHub: source code, releases and docs
- Engram website: overview and setup guides
- Engram Cloud docs: cloud server reference
- Railway Private Networking: how services connect
Implementation Details
The server binds to 0.0.0.0 on port 18080 because the image's default is loopback, which Railway couldn't reach. Railway checks /health, which returns a small JSON status, before routing traffic. Postgres has no public domain and talks to Engram over the private network. Back up Postgres to keep your team's shared memory safe. Each push is a chunk of sessions and observations up to 8 MB, and the server records an audit event for every sync.
Frequently Asked Questions
What is Engram? An MIT-licensed memory system for AI coding agents, with a local SQLite store, full-text search, MCP integration and an optional cloud server for syncing.
What does Engram Cloud add? A server with Postgres and a dashboard, so memory syncs across your machines and a team can share one index.
How much does it cost? About $5–15/month on Railway for the server and Postgres.
Is my local memory uploaded automatically? No. Only projects you enroll are pushed, and only when you run a sync.
Which agents work with Engram? Agents that support MCP, including Claude Code, Codex, Cursor, Gemini CLI and OpenCode.
Which CLI version should I use? One that matches the server. This template runs Engram 1.20, while current CLI releases are 3.x, so pin your CLI or test a newer server image first.
Why Deploy and Host Engram Cloud 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 Cloud on Railway, you get private, shared memory for your AI coding agents, synced across machines and teammates on infrastructure you control.
Template Content

