---
title: "Deploy Mem0 self-hosted"
description: "Private AI memory platform with dashboard and persistent pgvector storage."
category: "AI/ML"
url: https://railway.com/deploy/mem0-self-hosted-1
---

# Deploy Mem0 self-hosted

Private AI memory platform with dashboard and persistent pgvector storage.

**[Deploy Mem0 self-hosted on Railway](https://railway.com/template/mem0-self-hosted-1)**

- **Creator:** Anton Orel's Projects
- **Category:** AI/ML
- **Total deploys:** 2

## Template content

### Mem0 Dashboard

- **Source:** tech-progress/railway-template-mem0
- **Health check:** /api/health
- **Public domain:** Yes

### Mem0 PostgreSQL

- **Image:** pgvector/pgvector:pg17@sha256:7ae6051efd0e60444282c27c7e141af07f322ce033300e727a49c3dd11075e38

### Mem0 API

- **Source:** tech-progress/railway-template-mem0
- **Health check:** /docs
- **Public domain:** Yes

## Documentation

# Deploy and Host Mem0 Self-Hosted on Railway

Deploy Mem0 `2.0.3` as an authenticated memory API and team dashboard with private pgvector storage and persistent memory history. The template builds from a checksum-verified upstream commit, runs database migrations automatically, and generates the database, JWT, and administrator secrets.

## About Hosting Mem0 Self-Hosted

Mem0 gives AI agents and applications persistent user, agent, and run memory through a REST API. This Railway topology runs the API, the browser dashboard, and PostgreSQL as separate services, so the database stays on Railway's private network while the two HTTP surfaces receive managed TLS domains.

## Why Deploy Mem0 Self-Hosted on Railway

The deployment keeps authentication enabled and persists both pgvector data and Mem0's SQLite history file, so application restarts do not split current memories from their change history. Railway injects private service references and generated secrets, while you supply the external LLM/embedding credential that actually processes memory operations.

## Common Use Cases

- Give support, sales, or personal-assistant agents durable user preferences across sessions.
- Share one authenticated memory service across several internal applications.
- Inspect memories, entities, API keys, configuration, and request logs through the dashboard.
- Use an OpenAI-compatible provider by setting `OPENAI_BASE_URL` alongside its API key.

## Dependencies for Mem0 Self-Hosted

Mem0 requires an OpenAI key for the default LLM and embedding path. The API also supports the bundled Anthropic and Gemini LLM integrations, but a working embedder remains required for writes and semantic search.

### Deployment Dependencies

- Mem0 API `2.0.3`, built from pinned upstream source
- Mem0 Dashboard from the same pinned upstream commit
- pgvector on PostgreSQL 17 with a persistent volume
- A persistent volume for Mem0's SQLite history database
- `OPENAI_API_KEY`, or an equivalent credential plus `OPENAI_BASE_URL`


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/mem0-self-hosted-1
