Self HostingLocal/VM (Docker Compose)
Version: v3

Docker Compose

This guide will walk you through deploying Langfuse locally or on a VM using Docker Compose. We will use the docker-compose.yml file. This is the simplest way to run Langfuse to give it a try.

If you use a cloud provider like AWS, GCP, or Azure, you will need permissions to deploy virtual machines.

For high-availability and high-throughput, we recommend using Kubernetes (deployment guide). The docker compose setup lacks high-availability, scaling capabilities, and backup functionality.

Coming from docker-compose v2? See our upgrade guide for docker compose.

Walkthrough

Watch this 2:15 minute walkthrough for a step-by-step guide on running Langfuse locally with Docker Compose.

Get Started

Requirements

Clone Langfuse Repository

Get a copy of the latest Langfuse repository:

git clone https://github.com/langfuse/langfuse.git
cd langfuse

Start the application

Update the secrets in the docker-compose.yml and then run the langfuse docker compose using:

docker compose up

Watch the containers being started and the logs flowing in. After about 2-3 minutes, the langfuse-web-1 container should log “Ready”. At this point you can proceed to the next step.

Done

And you are ready to go! Open http://localhost:3000 in your browser to access the Langfuse UI.

Features

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

Scaling

Docker compose does not support horizontal scaling without an additional Load Balancer component. We recommend to use one of the other deployment options if your load exceeds single-instance scale or requires high availability. To add more throughput on a docker compose setup, you can usually use a larger virtual machine, i.e. scale vertically.

Shutdown

You can stop the containers by hitting Ctrl+C in the terminal. If you started docker-compose in the background (-d flag), you can stop all instance using:

docker compose down

Adding the -v flag will also remove the volumes.

Ensure to stop the VM instance in your cloud provider interface to avoid unnecessary costs.

Troubleshooting

  • Multimodal tracing is not working: This docker compose setup by default uses MinIO for blob storage which is not accessible from outside the Docker network for direct uploads. Please refer to the blob storage guide for more details on how to configure MinIO for media uploads.

How to Upgrade

To upgrade Langfuse, you can stop the containers and run docker compose up --pull always.

For more details on upgrading, please refer to the upgrade guide.

Was this page useful?

Questions? We're here to help

Subscribe to updates