Skip to content

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

.
└── Dockerfile

Sample Dockerfile

FROM getzep/zep:latest
# Default Zep API port
ENV ZEP_SERVER_ADDRESS=0.0.0.0:8000
EXPOSE 8000

Required environment variables

  • ZEP_STORE=postgres
  • ZEP_STORE_POSTGRES_DSN – e.g., postgres://USER:PASSWORD@HOST:5432/zep?sslmode=require
  • ZEP_SERVER_ADDRESS=0.0.0.0:8000

Optional environment variables

  • ZEP_TELEMETRY_ENABLED=false
  • ZEP_LOG_LEVEL=info
  • ZEP_OPENAI_API_KEY or other embedding provider keys
  • ZEP_ENABLE_AUTOMIGRATION=true to 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.sh while Klutch.sh routes to port 8000 inside the container.
Terminal window
curl -I http://localhost:8000/healthz

Deployment on Klutch.sh

  1. Push your Dockerfile to GitHub.
  2. In klutch.sh/app, create a new app and choose GitHub as the source.
  3. Klutch.sh automatically detects the Dockerfile in the repository root.
  4. Select HTTP traffic and set the internal port to 8000.
  5. 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.
  6. 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.