Docker Compose is the quickest way to try LangWatch locally. It runs the full stack in containers on your machine.
Prerequisites
- Docker with Docker Compose v2
- 4 CPU cores, 8 GB RAM, 20 GB disk
Quick Start
# Clone the repositorygit clone https://github.com/langwatch/langwatch.gitcd langwatch# Copy the example environment file, then replace its placeholder secrets (see Configuration)cp .env.example .env# Start all servicesdocker compose -f infra/compose.yml --project-directory . upThe compose file lives at infra/compose.yml and reads .env at the repository root, so run every docker compose command from the repository root with -f infra/compose.yml --project-directory .. The commands below use that form.
LangWatch is available at http://localhost:5560.
Services
Docker Compose starts the following services:
| Service | Image | Host port | Description |
|---|---|---|---|
app | langwatch/langwatch:latest | 5560 | Main application |
workers | langwatch/langwatch:latest | - | Background job processing |
langwatch_nlp | langwatch/langwatch_nlp:latest | - | NLP processing, workflows |
langevals | langwatch/langevals:latest | 5562 | Evaluators, guardrails |
postgres | postgres:16 | 5432 | Control plane database |
redis | redis:alpine | - | Job queue, caching |
clickhouse | langwatch/clickhouse-serverless:0.4.0 | 8123 | Trace and analytics storage |
Services with no host port bind no port on the host's interfaces, so they do not answer on localhost and are not reachable from another machine. langwatch_nlp listens on 5561 inside the Docker network, which is what LANGWATCH_NLP_SERVICE points the app and the workers at. A process on the Docker host itself can still reach a container directly on its own network address, so treat this as removing an exposed entry point, not as a network boundary.
Configuration
Edit .env to customize your deployment. Key variables:
# Required: replace the placeholders that .env.example ships# Signs sessions. Generate with: openssl rand -base64 32NEXTAUTH_SECRET=your-session-secret# Encrypts stored credentials and peppers API key hashes.# Must be exactly 64 hex characters. Generate with: openssl rand -hex 32CREDENTIALS_SECRET=your-64-hex-character-key# Password of ClickHouse's default user. Keep it URL-safe. Generate with:# openssl rand -hex 24. Unset, compose falls back to the published `langwatch`# (deprecated, warned at every boot, removed in the next major release).CLICKHOUSE_PASSWORD=your-clickhouse-password# Optional: shared credential the app authenticates to the NLP service with.# Every container in the stack reads this file, so one value covers both sides.# Generate with: openssl rand -hex 32LANGWATCH_NLP_INTERNAL_SECRET=# Optional: an Enterprise license, either an activation code# (LW-XXXX-XXXX-XXXX-XXXX, needs outbound HTTPS to connect.langwatch.ai)# or a signed license key (works offline)LANGWATCH_LICENSE_KEY=See Editions and licensing for how each form is applied at startup. Keep CREDENTIALS_SECRET stable once LangWatch holds data: changing it makes stored credentials unreadable, and also invalidates API keys unless API_KEY_PEPPER is set. To replace it, see Rotating the credentials secret.
Dashboards, the SQL workbench and Instant Evals read through a restricted ClickHouse user and a PostgreSQL reader role. The upgrade creates both. Their passwords are derived from CREDENTIALS_SECRET (or API_KEY_PEPPER when you set it), so you don't set anything for them. To pick your own, set both LWQL_CLICKHOUSE_PASSWORD and LWQL_POSTGRES_READER_PASSWORD.
Creating them needs a ClickHouse user that can create users, roles and named collections, custom_ in the server's custom_settings_prefixes, and a PostgreSQL user with CREATEROLE. The bundled ClickHouse has all of it. If yours doesn't, as on some managed ClickHouse services, the upgrade logs a warning naming what is missing and carries on, and those three features stay off until you add it. With your own passwords set, a missing grant fails the upgrade instead.
See Environment Variables for the full reference.
Common Operations
Start in the background
docker compose -f infra/compose.yml --project-directory . up -dView logs
# All servicesdocker compose -f infra/compose.yml --project-directory . logs -f# Specific servicedocker compose -f infra/compose.yml --project-directory . logs -f appStop services
docker compose -f infra/compose.yml --project-directory . downUpdate to latest version
docker compose -f infra/compose.yml --project-directory . pulldocker compose -f infra/compose.yml --project-directory . up -dThe workers run pnpm task upgrade on the new image when they start, and the app does not report ready until it completes. On a current installation it applies no step. If it fails, read docker compose logs workers; the exit code is explained in the Upgrade Guide.
Reset data
docker compose -f infra/compose.yml --project-directory . down -v # Removes volumes (all data)docker compose -f infra/compose.yml --project-directory . upCustomization
Disable optional services
If you don't need NLP or evaluators, comment them out in infra/compose.yml:
services: # langwatch_nlp: # ... # langevals: # ...Remove the corresponding upstream URLs from the app environment to avoid connection errors.
Connect to external databases
Replace the postgres and redis services with connection strings to your existing instances:
services: app: environment: DATABASE_URL: postgresql://user:password@your-postgres:5432/langwatch REDIS_URL: redis://:password@your-redis:6379 depends_on: [] # Remove postgres and redis dependenciesConnect to external ClickHouse
Replace the clickhouse service with a connection string to your existing instance:
services: app: environment: CLICKHOUSE_URL: http://user:password@your-clickhouse:8123/langwatch depends_on: postgres: condition: service_healthy redis: condition: service_healthy # Remove clickhouse from depends_onLimitations
Docker Compose is suitable for evaluation and small teams but lacks:
- High availability: single instance of each service
- Horizontal scaling: cannot scale workers independently
- Automated backups: no built-in backup scheduling
- TLS: no built-in HTTPS (use a reverse proxy like nginx or Caddy)
For production, migrate to the Kubernetes Helm chart.
Next Steps
- First run: Create the first account, add the license and connect your identity provider
- Docker Images: Learn about each container image
- Kubernetes (Helm): Production deployment
- Environment Variables: Full configuration reference