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. -
Add the following
ls-netexternal network to the Langfuse project'sdocker-compose.ymlfile: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 features such as:
- OWASP protection
- reCAPTCHA
- Per-client throttling
- Realm protection
- IP Allow/Deny
See the OpenLiteSpeed Security Guide for more information.