π³ 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 prebuilt images. This repository
builds multiarch (amd64, arm64) images from upstream mem0 releases.
| Tag | Description |
|---|---|
dockette/memzero:server |
Mem0 REST API (FastAPI), latest build |
dockette/memzero:server-<version> |
Mem0 REST API pinned to mem0 <version> |
dockette/memzero:dashboard |
Mem0 dashboard (Next.js), latest build |
dockette/memzero:dashboard-<version> |
Mem0 dashboard pinned to mem0 <version> |
Use the versioned tags (e.g. server-2.2.1) in production. The unversioned tags
move with every rebuild.
-
Download
docker-compose.yml,postgres/init-db.shand.env.dist. -
Copy
.env.distto.env, then setOPENAI_API_KEYand changeJWT_SECRETandPOSTGRES_PASSWORD. -
Start the stack.
docker compose up
-
Open
http://localhost:3000and finish the setup wizard. It creates the first admin account and API key. -
Use the API (OpenAPI docs on
http://localhost:8888/docs).
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"}'
| Service | Port | Description |
|---|---|---|
mem0 |
8888 |
REST API, runs migrations on start |
dashboard |
3000 |
Web UI (memories, entities, API keys) |
postgres |
8432 |
pgvector storage + app database |
Data is persisted in .docker/postgres and .docker/history.
All variables are listed in .env.dist. The most important ones:
| Variable | Description |
|---|---|
OPENAI_API_KEY |
LLM + embedder key, required (ANTHROPIC_API_KEY, GOOGLE_API_KEY also supported) |
JWT_SECRET |
Secret for dashboard sessions, required |
POSTGRES_PASSWORD |
Postgres password, required |
ADMIN_API_KEY |
Optional master key for X-API-Key |
MEM0_DEFAULT_LLM_MODEL |
Default LLM model (gpt-5-mini) |
MEM0_DEFAULT_EMBEDDER_MODEL |
Default embedder model (text-embedding-3-small) |
MEM0_TELEMETRY |
Upstream anonymous telemetry, false by default here |
AUTH_DISABLED |
Local development only, never in production |
SKIP_MIGRATIONS |
Set to skip alembic upgrade head on start |
See the Mem0 documentation for more.
make build # build both images
make test # smoke test 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
To upgrade mem0, bump MEM0_VERSION in .env.dist, Dockerfile and dashboard/Dockerfile. CI fails if they differ.
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.