Sign inSign up

dockette/memzero

Sponsored OSS

By dockette

•Updated about 3 hours ago

Image
0

251

dockette/memzero repository overview

⁠Dockette / Memzero

🐳 Mem0⁠ self-hosted memory layer (API + dashboard + pgvector) in a single stack.

šŸ•¹ f3l1x.io⁠ | šŸ’» f3l1x⁠ | 🐦 @xf3l1x⁠


⁠Motivation

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).

⁠Usage

  1. Create .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.
  1. Create docker-compose.yml file.

Copy docker-compose.yml⁠ and postgres/init-db.sh⁠ files.

  1. Start Docker services.
docker compose up
  1. Open http://localhost:3000 in your browser and finish the setup wizard.

It creates the first admin account and the first API key.

  1. Use the API.
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.

⁠Services

ServiceImagePortDescription
mem0dockette/memzero:server8888REST API, runs migrations on start
dashboarddockette/memzero:dashboard3000Web UI (memories, entities, API keys)
postgrespgvector/pgvector:pg178432Vector storage + app database

Data is persisted in .docker/postgres (Postgres) and .docker/history (SQLite history db).

⁠Configuration

Server

VariableDefaultDescription
OPENAI_API_KEYLLM + embedder key (ANTHROPIC_API_KEY, GOOGLE_API_KEY are bundled too)
MEM0_DEFAULT_LLM_MODELgpt-5-miniDefault LLM model
MEM0_DEFAULT_EMBEDDER_MODELtext-embedding-3-smallDefault embedder model
JWT_SECRETSecret for dashboard sessions, required
ADMIN_API_KEYOptional master key for X-API-Key
AUTH_DISABLEDfalseLocal development only, never in production
MEM0_TELEMETRYfalseUpstream anonymous telemetry (on by default upstream)
WORKERS1Uvicorn workers
HISTORY_DB_PATH/app/history/history.dbSQLite memory history db
SKIP_MIGRATIONSSet to skip alembic upgrade head on start

Postgres

VariableDefaultDescription
POSTGRES_HOSTpostgresHost
POSTGRES_PORT5432Port
POSTGRES_DBpostgresDatabase used by pgvector for memories
POSTGRES_USERpostgresUser
POSTGRES_PASSWORDPassword, required
POSTGRES_COLLECTION_NAMEmemoriesVector collection
APP_DB_NAMEmem0_appDatabase for users / api keys / config

Tip

For more detailed configuration options, please refer to the [Mem0 official documentation](https://docs.mem0.ai/).

⁠Build

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.

⁠Development

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.

Tag summary

Content type

Image

Digest

sha256:c178f5005…

Size

73.3 MB

Last updated

about 3 hours ago

docker pull dockette/memzero:dashboard