Networking
Langfuse can be deployed in a VPC or on-premises in high-security environments. This guide covers the networking requirements and considerations.
Architecture diagram (from architecture overview):
The optional AI gateway relays model requests from your apps and coding agents to your LLM providers and records them in Langfuse. LLM providers can also run in the same VPC or a peered VPC.
Network Exposure & Service Configuration
Only the langfuse/langfuse (web) container needs to be accessible by users, via API, and SDKs.
Optionally, this can be behind a firewall, proxy, or VPN.
By default PORT=3000 is used for the Langfuse Web container. This can be configured using the PORT environment variable (docs). Usually a network load balancer is used to expose the service and handle ssl termination (docs).
Langfuse is designed to be exposed publicly as a web service. This is penetration tested and secure by design as the Langfuse Team runs the same container for the managed Langfuse Cloud Offering. See security documentation of Langfuse Cloud for more details.
Internet Access
Langfuse does not require internet access.
Some optional features, such as the LLM Playground, LLM-as-a-Judge evaluations, prompt experiments, and Topics, require access to an LLM API or gateway. This can be deployed in the same VPC or peered with the VPC.
Both the web and worker containers need network access to configured LLM provider endpoints (web validates connections and serves Playground requests, and worker executes background evaluation and Topics jobs). If you use outbound URL allowlists, allow the provider endpoints on both services. Both services also need the same ENCRYPTION_KEY to decrypt stored credentials.
Langfuse pings a cached version of the GitHub API to check for updates to the Langfuse Server. If internet access is not available, this check will fail gracefully.
See Hostnames contacted by Langfuse for the full list of external hosts, for example to configure an egress firewall or proxy.
If you experience any issues when self-hosting Langfuse, please:
- Check out Troubleshooting & FAQ page.
- Use Ask AI to get instant answers to your questions.
- Ask the maintainers on GitHub Discussions.
- Create a bug report or feature request on GitHub.
Enterprise-grade support is available when self-hosting Langfuse. Learn more on our pricing page.
Last updated on