Prerequisites
- Docker Engine 24+ with Docker Compose v2
- 2 GB RAM minimum (4 GB recommended)
Quick start
Services
| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:3000 | Web interface |
| API | http://localhost:8000 | REST API + OpenAPI docs at /docs |
| MCP | http://localhost:8001 | MCP server for AI assistants |
| Database | Internal (port 5432) | PostgreSQL 16 + pgvector |
Configuration
Required
| Variable | Description |
|---|---|
DB_PASSWORD | PostgreSQL password |
JWT_SECRET | JWT signing secret |
Optional: AI features
| Variable | Description |
|---|---|
OPENAI_API_KEY | OpenAI API key for semantic search and embeddings |
Optional: MCP auth
| Variable | Description |
|---|---|
MCP_AUTH_TOKEN | Bearer token for MCP clients |
MCP_ISSUER_URL | OAuth issuer URL (default: http://localhost:8001) |
Custom ports
| Variable | Default | Description |
|---|---|---|
API_PORT | 8000 | API external port |
MCP_PORT | 8001 | MCP external port |
FRONTEND_PORT | 3000 | Frontend external port |
Database role separation (optional)
For defense-in-depth, split into two roles:- Owner role (
engram): runs DDL migrations, owns tables - App role (
engram_app): DML-only runtime, constrained by RLS policies
DB_APP_PASSWORD and DATABASE_APP_URL in your .env, then restart.
TLS
For non-localhost database connections:DB_REQUIRE_TLS=true to enforce TLS at startup.
Updating
Reverse proxy
If running behind nginx or Caddy, update these variables to match your proxy config:NEXT_PUBLIC_API_URL: API URL as seen by browsersCORS_ALLOWED_ORIGINS: your frontend domainMCP_ISSUER_URL: MCP URL as seen by OAuth clients