Langfuse¶
Langfuse is an open source LLM engineering platform. It helps teams collaboratively develop, monitor, evaluate, and debug AI applications.
Install Langfuse¶
- Follow the Langfuse installation guide to set up the self-hosted Langfuse requirements including the
.envfile. - Create
ls-netnetwork with following command:
docker network inspect ls-net >/dev/null 2>&1 || docker network create ls-net
ls-net external network to the Langfuse project's docker-compose.yml file: ```yaml
services:
langfuse-worker:
image: docker.langfuse.com/langfuse/langfuse-worker:4
restart: always
depends_on: &langfuse-depends-on
postgres:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
clickhouse:
condition: service_healthy
ports:
- 127.0.0.1:3030:3030
environment: &langfuse-worker-env
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
... SKIP ...
networks:
default:
name: ls-net
external: true
```
Set up OpenLiteSpeed proxy with AutoSSL¶
The easiest way to install OpenLiteSpeed, configure it as a reverse proxy, and enable AutoSSL is to use the ols1clk script.
Before continuing, ensure that your domain points to the server.
Replace www.example.com with your domain name, and run the following command:
bash <(curl -fsSL https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh) --proxy-c --proxy-port 3000 --autocert --sitedomain www.example.com
This command automatically:
- Installs OpenLiteSpeed.
- Configures the Example virtual host as a reverse proxy.
- Applies your domain to the listener virtual host mapping.
- Requests and installs SSL certificates using ACME.
-
Download the ols-proxy-docker-env repository:
git clone https://github.com/litespeedtech/ols-proxy-docker-env cd ols-proxy-docker-env -
Copy the example environment file:
cp .env.example .env -
Edit
.envwith your configuration values:OLS_IMAGE=litespeedtech/openlitespeed:latest BACKEND_IP=langfuse-web BACKEND_PORT=3000 DOMAIN=www.example.com PROXY_METHOD=context PROXY_SOCKET=false ACME_EMAIL=admin@example.com -
Start the proxy:
docker compose up -d
Verify the proxy configuration¶
Open https://www.example.com in a browser. The application interface should load through OpenLiteSpeed over HTTPS.
Optional settings¶
You can further enhance your site's security by enabling additional security features in the .env file, such as:
These other security features can be configured through the WebAdmin Console:
See the OpenLiteSpeed Security Guide for more information.
Warning
Some security features may interfere with application services or block legitimate requests. Test these settings thoroughly before applying them in a production environment.