Mem0 on Railway
An open-source memory layer for AI agents, with REST API, dashboard and pgvector, on Railway.
Mem0 is an open-source memory layer for AI agents and assistants. It extracts facts from conversations, stores them as embeddings, and returns the relevant ones per user, agent or session so that an application can remember earlier interactions.
Developers use it to give chatbots and agents long-term memory without building a retrieval pipeline themselves. Mem0 also offers a hosted Platform; the self-hosted server is what this page covers.
Mem0 is licensed under Apache-2.0.
What Mem0 can do
- REST API with interactive docs at /docs
- Dashboard for memories, entities, requests and API keys
- Memory scoped to user, agent or session
- Postgres with pgvector for storage
- Configurable model provider
What people use it for
- Long-term memory for a chatbot or assistant
- Personalising agent responses per user
- Keeping context across sessions in an AI app
- Inspecting what an agent has stored about users
Videos
Running Mem0 on Railway
The Railway template deploys the Mem0 v2.2.1 REST API, its dashboard and Postgres 17 with pgvector, plus a daily job that prunes request logs older than 30 days. You supply an OpenAI key or one for an OpenAI-compatible endpoint. The template notes measured about 217 MB for the API, 97 MB for the dashboard and 71 MB for Postgres after start; embedding and LLM calls are billed by your model provider.
Mem0 templates on Railway
Tracklayer templates are listed first. Other Mem0 templates follow, ordered by total deployments on Railway. How this works.
Deployment numbers as of 2026-11-20.
Questions about Mem0
What do I need to provide?
An OpenAI API key in OPENAI_API_KEY, or a key for any OpenAI-compatible endpoint through OPENAI_BASE_URL. Anthropic and Google keys are optional for switching models in the dashboard.
How do I log in and get an API key?
Open the dashboard URL and sign in with MEM0_ADMIN_EMAIL and MEM0_ADMIN_PASSWORD from the Mem0 API service variables, then create a key under API Keys.
Does it include an MCP server?
No. Mem0's official MCP server is a hosted service for the Mem0 Platform, and the self-hosted OpenMemory MCP server was removed upstream. Connect agents through the REST API or the Mem0 SDKs.
Can it scale out?
The API runs as one replica because memory history is kept in a SQLite file on its volume. The dashboard is stateless.
How do I upgrade?
The release and checksum are build arguments in both Dockerfiles. Change them together, back up Postgres and the history volume, and redeploy.
Guides
Similar apps
Tracklayer maintains the templates marked as such; Mem0 is a trademark of its owners and this site is not affiliated with them.