Local Deployment (v2, docker compose)
This guide covers Langfuse v2. For Langfuse v3, see the v3 documentation. Langfuse v2 receives security updates until end of Q1 2025. If you have any questions while upgrading, please refer to the v3 upgrade guide or open a thread on GitHub Discussions.
This setup is not suitable for production use as the database is not persistent and environment variables are not kept secret. For a production-ready setup, follow the deployment guide or consider using Langfuse Cloud maintained by the Langfuse team.
You can run Langfuse on your local machine using docker compose. This method is ideal for testing Langfuse and troubleshooting integration issues.
Requirements: docker
and docker compose
, both are included in Docker Desktop
for Mac or Windows users.
Getting Started
Start the Langfuse Server
# Clone the Langfuse repository
git clone https://github.com/langfuse/langfuse.git
cd langfuse
# Checkout V2 branch
git checkout v2
# Start the database and langfuse server
docker compose up
Langfuse is now running on your local machine:
- The server is accessible at:
http://localhost:3000
- Integrations: set the
HOST
/BASEURL
of the SDKs tohttp://localhost:3000
Langfuse is very configurable, see deployment guide for more details on configuration options. Checkout the docker-compose.yml file for more details.
Create an Account
Create a new account at http://localhost:3000/auth/sign-up
.
Follow the Quickstart Guide
Follow the quickstart guide to get up and running with Langfuse Tracing or explore the rest of the documentation.
Updating Langfuse
Docker has robust caching functionalities. To fetch the latest Langfuse container, you need to run docker compose pull langfuse-server
. Otherwise, Docker will use the cached version of the Langfuse container.
# Navigate to the Langfuse directory
cd langfuse
# Stop the server and database
docker compose down
# Pull the latest changes to the docker compose file
git pull
# Pull the latest Langfuse container
docker compose pull langfuse-server
# Restart the server and database
docker compose up
Setting Up a Development Environment
Refer to CONTRIBUTING.md for detailed instructions on how to set up a development environment.
Troubleshooting
The deployment guide is more extensive and includes troubleshooting steps which are also applicable to local deployments using docker compose.