Created
February 14, 2026 19:47
-
-
Save BexTuychiev/2597529900335a66265dff5955f1cebf to your computer and use it in GitHub Desktop.
Mem0 self-hosted Docker Compose stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: mem0-selfhost | |
| services: | |
| mem0: | |
| build: . | |
| image: mem0-selfhost:latest | |
| ports: | |
| - "8888:8000" | |
| env_file: | |
| - .env | |
| networks: | |
| - mem0_network | |
| volumes: | |
| - ./history:/app/history | |
| depends_on: | |
| postgres: | |
| condition: service_healthy | |
| neo4j: | |
| condition: service_healthy | |
| environment: | |
| - PYTHONDONTWRITEBYTECODE=1 | |
| - PYTHONUNBUFFERED=1 | |
| - POSTGRES_HOST=postgres | |
| - POSTGRES_PORT=5432 | |
| - POSTGRES_DB=postgres | |
| - POSTGRES_USER=postgres | |
| - POSTGRES_PASSWORD=postgres | |
| - NEO4J_URI=bolt://neo4j:7687 | |
| - NEO4J_USERNAME=neo4j | |
| - NEO4J_PASSWORD=mem0graph | |
| postgres: | |
| image: ankane/pgvector:v0.5.1 | |
| restart: on-failure | |
| shm_size: "128mb" | |
| networks: | |
| - mem0_network | |
| environment: | |
| - POSTGRES_USER=postgres | |
| - POSTGRES_PASSWORD=postgres | |
| healthcheck: | |
| test: ["CMD", "pg_isready", "-q", "-d", "postgres", "-U", "postgres"] | |
| interval: 5s | |
| timeout: 5s | |
| retries: 5 | |
| volumes: | |
| - postgres_db:/var/lib/postgresql/data | |
| ports: | |
| - "8432:5432" | |
| neo4j: | |
| image: neo4j:5.26.4 | |
| networks: | |
| - mem0_network | |
| healthcheck: | |
| test: wget http://localhost:7687 || exit 1 | |
| interval: 1s | |
| timeout: 10s | |
| retries: 20 | |
| start_period: 90s | |
| ports: | |
| - "8474:7474" | |
| - "8687:7687" | |
| volumes: | |
| - neo4j_data:/data | |
| environment: | |
| - NEO4J_AUTH=neo4j/mem0graph | |
| - NEO4J_PLUGINS=["apoc"] | |
| - NEO4J_apoc_export_file_enabled=true | |
| - NEO4J_apoc_import_file_enabled=true | |
| - NEO4J_apoc_import_file_use__neo4j__config=true | |
| volumes: | |
| neo4j_data: | |
| postgres_db: | |
| networks: | |
| mem0_network: | |
| driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment