š³ Mem0ā self-hosted memory layer (API + dashboard + pgvector) in a single stack.
š¹ f3l1x.ioā | š» f3l1xā | š¦ @xf3l1xā
Mem0 ships a self-hosted server, but no maintained prebuild images (the last
mem0/mem0-api-server push is from 2025 and predates auth + dashboard).
This repository provides prebuild multiarch images and a ready-to-run stack.
dockette/memzero:server - Mem0 REST API (FastAPI + Alembic migrations)dockette/memzero:dashboard - Mem0 dashboard (Next.js)Both images are built from a pinned upstream tag (MEM0_VERSION).
.env file.# Docker images
DOCKER_SERVER_IMAGE=dockette/memzero:server
DOCKER_DASHBOARD_IMAGE=dockette/memzero:dashboard
# Docker: ports
MEM0_PORT=8888
DASHBOARD_PORT=3000
POSTGRES_PORT=8432
# Docker: mem0
OPENAI_API_KEY=sk-...
JWT_SECRET=change-me
AUTH_DISABLED=false
MEM0_TELEMETRY=false
MEM0_DEFAULT_LLM_MODEL=gpt-5-mini
MEM0_DEFAULT_EMBEDDER_MODEL=text-embedding-3-small
# Docker: dashboard
DASHBOARD_URL=http://localhost:3000
DASHBOARD_API_URL=http://localhost:8888
DASHBOARD_INSTANCE_NAME=Memzero
# Docker: postgres
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=change-me
POSTGRES_COLLECTION_NAME=memories
APP_DB_NAME=mem0_app
Important
`OPENAI_API_KEY`, `JWT_SECRET` and `POSTGRES_PASSWORD` are required. The API refuses to boot without a key for the default LLM / embedder provider.
docker-compose.yml file.Copy docker-compose.ymlā and postgres/init-db.shā files.
docker compose up
http://localhost:3000 in your browser and finish the setup wizard.It creates the first admin account and the first API key.
curl -X POST http://localhost:8888/memories \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"I love hiking"}],"user_id":"alice"}'
OpenAPI docs are on http://localhost:8888/docs.
| Service | Image | Port | Description |
|---|---|---|---|
mem0 | dockette/memzero:server | 8888 | REST API, runs migrations on start |
dashboard | dockette/memzero:dashboard | 3000 | Web UI (memories, entities, API keys) |
postgres | pgvector/pgvector:pg17 | 8432 | Vector storage + app database |
Data is persisted in .docker/postgres (Postgres) and .docker/history (SQLite history db).
Server
| Variable | Default | Description |
|---|---|---|
OPENAI_API_KEY | LLM + embedder key (ANTHROPIC_API_KEY, GOOGLE_API_KEY are bundled too) | |
MEM0_DEFAULT_LLM_MODEL | gpt-5-mini | Default LLM model |
MEM0_DEFAULT_EMBEDDER_MODEL | text-embedding-3-small | Default embedder model |
JWT_SECRET | Secret for dashboard sessions, required | |
ADMIN_API_KEY | Optional master key for X-API-Key | |
AUTH_DISABLED | false | Local development only, never in production |
MEM0_TELEMETRY | false | Upstream anonymous telemetry (on by default upstream) |
WORKERS | 1 | Uvicorn workers |
HISTORY_DB_PATH | /app/history/history.db | SQLite memory history db |
SKIP_MIGRATIONS | Set to skip alembic upgrade head on start |
Postgres
| Variable | Default | Description |
|---|---|---|
POSTGRES_HOST | postgres | Host |
POSTGRES_PORT | 5432 | Port |
POSTGRES_DB | postgres | Database used by pgvector for memories |
POSTGRES_USER | postgres | User |
POSTGRES_PASSWORD | Password, required | |
POSTGRES_COLLECTION_NAME | memories | Vector collection |
APP_DB_NAME | mem0_app | Database for users / api keys / config |
Tip
For more detailed configuration options, please refer to the [Mem0 official documentation](https://docs.mem0.ai/).
make build # build both images
make push # push both images
make up # start the stack
make health # check the stack
make clean # stop the stack and drop data
Bump MEM0_VERSION in .env.dist to build a newer upstream release.
See how to contributeā to this package.
This package is currently maintaining by these authors.
Consider to supportā f3l1x. Also thank you for using this package.
Content type
Image
Digest
sha256:c178f5005ā¦
Size
73.3 MB
Last updated
about 3 hours ago
docker pull dockette/memzero:dashboard