Self HostingDocker
Version: v3

Docker

Deploy the application container to your infrastructure. You can use managed services like AWS ECS, Azure Container Instances, or GCP Cloud Run, or host it yourself.

During the container startup, all database migrations will be applied automatically. This can be optionally disabled via environment variables.

Before running Langfuse, please familiarize yourself with the architecture.

Please follow one of the deployment guides to run Langfuse locally, on a VM (docker-compose), or in Kubernetes (helm).

Run Langfuse Web

docker run --name langfuse-web \
  -e DATABASE_URL=postgresql://hello \
  -e NEXTAUTH_URL=http://localhost:3000 \
  -e NEXTAUTH_SECRET=mysecret \
  -e SALT=mysalt \
  -e ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000 \ # generate via: openssl rand -hex 32
  -e CLICKHOUSE_URL=http://clickhouse:8123 \
  -e CLICKHOUSE_USER=clickhouse \
  -e CLICKHOUSE_PASSWORD=clickhouse \
  -e CLICKHOUSE_MIGRATION_URL=clickhouse://clickhouse:9000 \
  -e REDIS_HOST=localhost \
  -e REDIS_PORT=6379 \
  -e REDIS_AUTH=redis \
  -e LANGFUSE_S3_EVENT_UPLOAD_BUCKET=my-bucket \
  -e LANGFUSE_S3_EVENT_UPLOAD_REGION=us-east-1 \
  -e LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE \
  -e LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY=bPxRfiCYEXAMPLEKEY \
  -p 3000:3000 \
  -a STDOUT \
langfuse/langfuse:3

Run Langfuse Worker

docker run --name langfuse-worker \
  -e DATABASE_URL=postgresql://hello \
  -e SALT=mysalt \
  -e ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000 \ # generate via: openssl rand -hex 32
  -e CLICKHOUSE_URL=http://clickhouse:8123 \
  -e CLICKHOUSE_USER=clickhouse \
  -e CLICKHOUSE_PASSWORD=clickhouse \
  -e REDIS_HOST=localhost \
  -e REDIS_PORT=6379 \
  -e REDIS_AUTH=redis \
  -e LANGFUSE_S3_EVENT_UPLOAD_BUCKET=my-bucket \
  -e LANGFUSE_S3_EVENT_UPLOAD_REGION=us-east-1 \
  -e LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE \
  -e LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY=bPxRfiCYEXAMPLEKEY \
  -p 3030:3030 \
  -a STDOUT \
langfuse/langfuse-worker:3

Features

Langfuse supports many configuration options and self-hosted features. For more details, please refer to the configuration guide.

Was this page useful?

Questions? We're here to help

Subscribe to updates