Local Machine
This setup is the easiest to get started with. It will start a local database and the Langfuse server. The server is exposed on port 3000
by default.
It is not recommended to use this setup in production as the database is not persisted and environment variables are not secret. Checkout Langfuse Cloud for a production-ready setup maintained by the Langfuse team or alternatively self-host.
Requirements: docker
and docker compose
, both included in Docker Desktop (opens in a new tab)
Start
# Clone repository
git clone https://github.com/langfuse/langfuse.git
cd langfuse
# Run server and db
docker compose up -d
-> Visit http://localhost:3000 (opens in a new tab)
Upgrade
# navigate to the Langfuse directory
cd langfuse
# Stop server and db
docker compose down
# Pull latest changes
git pull
docker-compose pull
# Run server and db
docker compose up -d
Development setup
It will start a local database via Docker and the Langfuse server via NPM. The development server will watch for changes and restart automatically.
# Clone repository
git clone https://github.com/langfuse/langfuse.git
cd langfuse
# Install dependencies
npm install
# Run the db in the background
docker-compose -f docker-compose.dev.yml up -d
# create an env file
cp .env.dev.example .env
# Apply database migrations
npm run db:migrate
# Optional: seed the database
# npm run db:seed
# npm run db:seed:examples
# Start the development server
npm run dev