Configuration
MemMesh is configured through environment variables on the engine and API
services. This page lists the ones you’ll most often set; the exact, complete
list lives in the engine source and docker-compose.yml.
Database
| Variable | Service | Purpose |
|---|---|---|
MEMORY_DATABASE_URL | memory-retrieve | Postgres connection string for the retrieval engine. |
AP_POSTGRES_HOST / AP_POSTGRES_PORT / AP_POSTGRES_USERNAME / AP_POSTGRES_PASSWORD / AP_POSTGRES_DATABASE | api | Postgres connection for the API service. |
Postgres must have the pgvector extension available (the compose stack uses
the pgvector/pgvector:pg16 image). The api service also needs Redis —
AP_REDIS_HOST / AP_REDIS_PORT (the compose stack runs redis:7-alpine).
These are for the self-hosted HTTP server. The single-binary local
engine uses SQLite instead: it stores its DB at ~/.thinkfleet-memory/memory.db
by default, overridable with the THINKFLEET_MEMORY_DB environment variable (or
the --db flag). Its settings live in ~/.thinkfleet-memory/config.toml — see
Installer & doctor.
Engine ↔ API wiring
| Variable | Service | Purpose |
|---|---|---|
MEMORY_GRPC_ADDR | memory-retrieve | Address the retrieval service binds (e.g. 0.0.0.0:50051). |
MEMORY_GRPC_ENABLED | api | Turn on the gRPC client to the retrieval service. |
MEMORY_GRPC_URL | api | Where the API reaches the retrieval service (e.g. memory-retrieve:50051). |
MEMORY_GRPC_TLS | api | Whether the gRPC channel uses TLS. |
RUST_LOG | memory-retrieve | Log level (e.g. info). |
Licensing
| Variable | Purpose |
|---|---|
MEMORY_LICENSE_MODE | License enforcement mode (e.g. single for a single-license desktop/dev engine). |
MEMORY_LICENSE_TOKEN | The license JWT the engine validates against. |
See Licensing & Caps for how licensing maps to plan limits.
Billing (optional)
If you connect usage metering to Lago:
| Variable | Purpose |
|---|---|
AP_LAGO_ENABLED | Enable Lago metering/entitlements. |
AP_LAGO_API_URL | Lago API base URL. |
AP_LAGO_API_KEY | Lago API key. |
AP_LAGO_WEBHOOK_SECRET | Shared secret for the Lago webhook receiver. |