Engrammic
Reference

Self-Hosting

Run Engrammic on your own infrastructure

Quick Start

The fastest way to get Engrammic running locally:

curl -fsSL https://get.engrammic.ai | sh
engrammic selfhost

The wizard will:

  1. Check Docker is running
  2. Validate your license key
  3. Configure ports and storage
  4. Set up LLM integration (optional)
  5. Start the services
  6. Configure your code editor

Requirements

  • Docker 20.10+ with Compose v2
  • 5GB RAM minimum (8GB recommended)
  • 20GB disk space
  • License key from engrammic.ai/self-hosted

Two model types you may need to configure

The self-hosted image uses two separate models with different roles:

  • Embedding model (required). Used by remember, learn, and recall. Without it, those tools fail outright. Configure via EMBEDDING_MODEL and the matching provider credentials.
  • Generation LLM (optional). Used only by SAGE synthesis (deduplication, belief formation). Without it, the service runs in passive mode: storage and recall work, synthesis is disabled.

See Running Models Locally if you want to run either model on your own hardware with no cloud API keys. See Configuration for the full variable reference.

Fully-local turnkey images (standalone and standalone-lite, with models bundled) are also available. Documentation for those is coming separately.

CLI Reference

Installation Commands

CommandDescription
engrammic selfhostInteractive setup wizard
engrammic installConfigure MCP for detected editors
engrammic uninstallRemove Engrammic from editor configs

Management Commands

CommandDescription
engrammic statusShow current installation state
engrammic upgradePull latest images and restart
engrammic doctorRun diagnostic health checks
engrammic scaleShow container resource usage
engrammic logsView service logs
engrammic licenseView or update license key

Log Viewing

# Interactive service selection
engrammic logs

# Specific service
engrammic logs --service app

# Follow logs
engrammic logs --service app --follow

# Show more lines
engrammic logs --service dagster --lines 500

Available services: app, reaction-worker, dagster, dagster-daemon, memgraph, qdrant, redis, postgres

Configuration

After running engrammic selfhost, your configuration is stored in ~/.engrammic/:

~/.engrammic/
  docker-compose.yml   # Service definitions
  .env                 # Configuration
  README.md            # Quick reference

Environment Variables

Edit ~/.engrammic/.env to configure:

# License (required)
ENGRAMMIC_LICENSE_KEY=ENGR_...

# Database
POSTGRES_PASSWORD=your-secure-password

# Embedding model (required, otherwise remember/learn/recall fail)
EMBEDDING_MODEL=openai/text-embedding-3-small
OPENAI_API_KEY=sk-...

# Telemetry (opt out with false)
TELEMETRY__ENABLED=true

The embedding model is the required piece, and you set it here with EMBEDDING_MODEL plus its provider key. The generation LLM is optional and is configured differently (see below). See Configuration for the full variable reference and Running Models Locally to run either without cloud keys.

Choosing the generation LLM

The SAGE generation LLM provider and model live in config/models.yaml, not in .env. The default tier uses Google Vertex (Gemini). To use a different provider:

  1. Override models.yaml through the host config directory (see Config Files).
  2. Set the active tier's reasoning, fast, and query_expander entries to your provider and model.
  3. Supply that provider's credentials in .env:
Provider in models.yamlCredentials in .env
openaiOPENAI_API_KEY=sk-...
anthropicANTHROPIC_API_KEY=sk-ant-...
geminiGEMINI_API_KEY=...
vertex (default)VERTEX_PROJECT=..., VERTEX_LOCATION=... (uses the mounted gcloud credentials)
ollamaOLLAMA_BASE_URL=http://host.docker.internal:11434

Without usable LLM credentials, Engrammic runs in passive mode: storage and recall work, but SAGE synthesis (automatic deduplication, insight generation) is disabled.

Custom Ports

During engrammic selfhost, you can configure custom ports:

  • MCP server: Default 8000 (your editor connects here)
  • Dagster UI: Default 3000 (SAGE pipeline dashboard)

After setup, edit docker-compose.yml to change internal service ports.

Upgrading

Pull the latest images and restart:

engrammic upgrade

This will:

  1. Pull new images
  2. Restart services
  3. Clean up old images

Version deprecation warnings appear in logs when running outdated versions.

Backup and Restore

Manual Backup

cd ~/.engrammic

# Stop services
docker compose down

# Backup volumes
docker run --rm -v engrammic_postgres-data:/data -v $(pwd):/backup alpine \
  tar czf /backup/postgres-backup.tar.gz -C /data .

docker run --rm -v engrammic_qdrant-data:/data -v $(pwd):/backup alpine \
  tar czf /backup/qdrant-backup.tar.gz -C /data .

docker run --rm -v engrammic_memgraph-data:/data -v $(pwd):/backup alpine \
  tar czf /backup/memgraph-backup.tar.gz -C /data .

# Restart
docker compose up -d

Restore

cd ~/.engrammic
docker compose down

# Restore volumes (example for postgres)
docker run --rm -v engrammic_postgres-data:/data -v $(pwd):/backup alpine \
  sh -c "rm -rf /data/* && tar xzf /backup/postgres-backup.tar.gz -C /data"

docker compose up -d

Troubleshooting

Health Check

curl http://localhost:8000/health

Expected response:

{
  "status": "healthy",
  "services": {
    "memgraph": "connected",
    "redis": "connected",
    "qdrant": "connected",
    "postgres": "connected"
  }
}

Diagnostics

engrammic doctor

Checks:

  • Docker daemon status
  • Container health
  • Service connectivity
  • License validity

Common Issues

Services not starting:

docker compose logs app

Port already in use: Run engrammic selfhost again and choose a different port.

License expired:

engrammic license

Out of memory:

engrammic scale

Manual Setup

If you prefer manual configuration over the CLI wizard:

Create directory

mkdir -p ~/.engrammic && cd ~/.engrammic

Download compose file

curl -fsSL https://raw.githubusercontent.com/engrammic-ai/mcp/main/docker-compose.yml -o docker-compose.yml

Create .env

cat > .env << 'EOF'
ENGRAMMIC_LICENSE_KEY=ENGR_your_key_here
POSTGRES_PASSWORD=your-secure-password

# Embedding model (required)
EMBEDDING_MODEL=openai/text-embedding-3-small
OPENAI_API_KEY=sk-...

TELEMETRY__ENABLED=true

# Optional: LLM for SAGE synthesis (provider/model set in models.yaml; supply its key)
# OPENAI_API_KEY=sk-...
EOF

Start services

docker compose up -d

Configure your editor

Add to your MCP config (e.g., ~/.claude.json):

{
  "mcpServers": {
    "engrammic": {
      "type": "http",
      "url": "http://localhost:8000/mcp"
    }
  }
}

Architecture

The self-hosted stack includes:

ServicePurposeDefault Port
appMCP server + REST API8000
reaction-workerAsync task processing-
dagsterSAGE pipeline UI3000
dagster-daemonSAGE scheduler-
memgraphGraph database7687
qdrantVector database6333
redisCache + queues6379
postgresMetadata store5432

Total memory: ~5GB (8GB recommended for production workloads)

Get Access

Self-hosting requires a license key. Request one at engrammic.ai/self-hosted or email founders@engrammic.ai.

On this page