Installing Langfuse Locally
Prerequisites
- Docker Compose v2 (or later)
- Git
- OpenSSL – for generating a 32-byte encryption key
1. Clone the repository
2. Configure environment variables
- Copy or create an
.env
file (base it on.env.example
if supplied). - Generate a 32-byte hex key and insert it:
3. Pick a free host port for PostgreSQL
If port 5432 is already in use, edit docker-compose.yml and change the first number in the mapping—e.g.:
4. Launch the stack
When the containers are healthy you can open http://localhost:3000.
5. First-time setup in the UI
- Sign up with an email and password.
- Create an organisation and then a project inside it.
organisations vs projects
Organisations group accounts and billing; projects isolate traces and API keys.
6. Issue API keys
- Go to Settings → API Keys.
- Click Create API Key.
- Copy the full credential string and add it to your SerenityGPT (or other client)
.env
, for example:
Format: <secret-key>;<public-key>;<Langfuse-URL>
.
7. View traces
Open Tracing → Traces in the Langfuse UI to stream request/response logs, generations, and metadata in real time.