Local Deployment
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 self-hosting guide or consider using Langfuse Cloud (opens in a new tab) 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 (opens in a new tab)
for Mac or Windows users.
Getting Started
# Clone the Langfuse repository
git clone https://github.com/langfuse/langfuse.git
cd langfuse
# Start the server and database
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
Updating Langfuse
Docker has robust caching functionalities. To fetch the latest Langfuse container, you need to run docker-compose pull
. 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
# Fetch the latest changes
git pull
docker-compose pull
# Restart the server and database
docker compose up
Setting Up a Development Environment
Refer to CONTRIBUTING.md (opens in a new tab) for detailed instructions on how to set up a development environment.
Troubleshooting
The self-hosting guide is more extensive and includes troubleshooting steps which are also applicable to local deployments using docker compose.