I Self-Hosted Langfuse so My LLM Traces Would Stop Living On Someone Else’s Bill
Last Updated on July 27, 2026 by Editorial Team
Author(s): allglenn
Originally published on Towards AI.
I Self-Hosted Langfuse so My LLM Traces Would Stop Living On Someone Else’s Bill
We crossed 100K traces a month in March. That’s the point where Langfuse Cloud’s Pro tier stops feeling like a rounding error and starts showing up in the “why is our tooling spend up 40%” Slack thread.

After the intro, the author argues for self-hosting Langfuse to control costs, data, and avoid feature gaps—while noting the real operational tradeoffs of running the required stateful services. They break down what “docker compose up” sets in motion (web/UI/API, worker jobs, Postgres, ClickHouse, Redis/Valkey, and S3/MinIO), explain key operational behaviors like S3-to-worker decoupling during traffic spikes, and call out the most common failure mode: ensuring ClickHouse and Postgres use UTC timezone. The guide then walks through a practical rollout path: run locally, migrate to a VM with proper networking and TLS, wire your application via environment variables and flush traces in short-lived contexts, and graduate to Kubernetes when Compose no longer meets HA and scaling needs—using the official Helm chart but bringing your own HA dependencies. It also emphasizes multi-team security (SSO, encryption, port restrictions), how to monitor correctly (especially Redis queue depth, not just container health), and the production checklist that prevents painful surprises (real backups with restore drills, correct object storage for multimodal uploads, safe upgrade procedures, and ClickHouse capacity/retention planning). Finally, it covers honest cost math for break-even vs managed options and compares Langfuse to other managed observability alternatives, concluding with the long-term operational principle that self-hosting should eventually “disappear” into routine infrastructure rather than becoming an ongoing project.
Read the full blog for free on Medium.
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.
Published via Towards AI
Towards AI Academy
We Build Enterprise-Grade AI. We'll Teach You to Master It Too.
15 engineers. 100,000+ students. Towards AI Academy teaches what actually survives production.
Start free — no commitment:
→ 6-Day Agentic AI Engineering Email Guide — one practical lesson per day
→ Agents Architecture Cheatsheet — 3 years of architecture decisions in 6 pages
Our courses:
→ AI Engineering Certification — 90+ lessons from project selection to deployed product. The most comprehensive practical LLM course out there.
→ Agent Engineering Course — Hands on with production agent architectures, memory, routing, and eval frameworks — built from real enterprise engagements.
→ AI for Work — Understand, evaluate, and apply AI for complex work tasks.
Note: Article content contains the views of the contributing authors and not Towards AI.