Deploying a Zep App
Introduction
Zep is an open-source memory service for LLM applications, combining vector search and structured metadata. This guide shows how to containerize Zep with a Dockerfile, wire it to PostgreSQL with pgvector, and deploy it to Klutch.sh over HTTP.
Prerequisites
- GitHub repository containing your Dockerfile.
- PostgreSQL with the pgvector extension enabled.
- Klutch.sh project ready in klutch.sh/app.
- Optional: OpenAI or other provider keys if you generate embeddings server-side.
Project structure
.└── DockerfileSample Dockerfile
FROM getzep/zep:latest
# Default Zep API portENV ZEP_SERVER_ADDRESS=0.0.0.0:8000EXPOSE 8000Required environment variables
ZEP_STORE=postgresZEP_STORE_POSTGRES_DSN– e.g.,postgres://USER:PASSWORD@HOST:5432/zep?sslmode=requireZEP_SERVER_ADDRESS=0.0.0.0:8000
Optional environment variables
ZEP_TELEMETRY_ENABLED=falseZEP_LOG_LEVEL=infoZEP_OPENAI_API_KEYor other embedding provider keysZEP_ENABLE_AUTOMIGRATION=trueto auto-migrate schemas
Persistence
All data is stored in PostgreSQL. No local volume is required unless you extend Zep to write local logs or caches.
Networking
- Protocol: HTTP
- Internal port:
8000 - Clients reach
https://example-app.klutch.shwhile Klutch.sh routes to port8000inside the container.
Health check (recommended)
curl -I http://localhost:8000/healthzDeployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and choose GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Select HTTP traffic and set the internal port to
8000. - Add environment variables for the PostgreSQL DSN (
ZEP_STORE_POSTGRES_DSN), store type (ZEP_STORE), server address, and any embedding provider keys. Mark secrets as sensitive. - Deploy. Once live, test the API and start creating collections and documents.
Verification
-
Health:
Terminal window curl https://example-app.klutch.sh/healthz -
Create a collection:
Terminal window curl -X POST https://example-app.klutch.sh/api/v1/collections \-H "Content-Type: application/json" \-d '{"name":"demo","description":"LLM memory demo"}'
Next steps
- Enable TLS to your database and rotate provider keys regularly.
- Tune PostgreSQL and pgvector for your embedding dimensions and workload.
- Add backups for your Postgres instance to protect vector and metadata storage.