Self-host Langfuse when trace data must stay in your network and a named engineer will own ClickHouse. The software is the same codebase as Langfuse Cloud, free under the MIT license with no usage limit. You pay for the infrastructure, which runs ClickHouse beside PostgreSQL, Redis and S3, for version upgrades, and for any Enterprise features you need. Plan the v3 to v4 upgrade before v3 security patches end in January 2027.
When you need this
- Security or a client contract requires trace data to stay in your own network.
- You run self-hosted v3 and need a plan before its security patches end in January 2027.
- Developers want Langfuse on laptops or a small server and it keeps running out of memory or disk.
Evaluation criteria
Architecture
What will you run?
Look forRun web and worker containers. PostgreSQL stores transactional data, and ClickHouse stores traces, observations and scores. Redis or Valkey handles queues and cache. S3-compatible storage holds raw events and media. Playground and evaluator LLM connections are optional. Langfuse supports VPC and air-gapped deployment.
Sizing
Is the target machine or cluster large enough?
Look forDocker Compose needs at least 4 cores, 16 GiB of memory and about 100 GiB of storage. It gives you no high availability, no scaling and no backups. A 2025 report describes ClickHouse spiking CPU while idle. One developer measured four v4 containers at 1,848 MiB, with a worker using about four times v3's memory. Another could not fit v4 on a small shared server because ClickHouse alone needed 8 GiB.
Production layout
Where does ClickHouse run?
Look forUse the Helm chart or Terraform modules for AWS, Azure, and GCP. Configure managed S3-compatible storage. For high availability, use at least 3 ClickHouse replicas and 3 Keeper nodes. Langfuse recommends ClickHouse Cloud or BYOC (bring your own cloud) for larger deployments. Cresta runs one instance per Kubernetes cluster and one organization per customer, so traces never leave the cluster that produced them.
Licensing
Which features need an Enterprise key?
Look forOSS includes all core features and enterprise SSO with enforcement. An Enterprise key adds project RBAC and protected prompt labels, retention policies, audit logs, server-side masking, SCIM, the organization API, and the instance management API. Self-hosted Enterprise has custom pricing and comes bundled with ClickHouse Cloud, BYOC, or ClickHouse Private.
Retention and disk
What stops the data from growing forever?
Look forSelf-hosted data stays forever unless a retention policy deletes it, and policies require an Enterprise key. One laptop instance grew to terabytes in a few months. Without a key, plan for disk growth and export old data to blob storage.
Availability
What happens to traces when your Langfuse is down?
Look forThe SDKs send asynchronously, so the application keeps running when the server is down. Run health and readiness checks, and back up PostgreSQL and ClickHouse.
Upgrades and v4
How will you move to v4?
Look forv4 requires ClickHouse 25.12 or later and stores data in an observations-first table. The upgrade runs in three stages: infrastructure first, then the server in legacy or dual-write mode, then SDKs, APIs, evaluators, and exports. Choose between a backfill, which needs about 3x disk headroom, and a rollover that lets old data age out under retention. Self-hosters have no forced date, and v3 security patches continue through January 2027.
Questions to ask vendors
- Who owns ClickHouse: capacity, upgrades, backups, and disk?
- Which Enterprise features does the security review require, and is a ClickHouse commercial plan acceptable for them?
- Which version do we run, and when do we move to v4?
- Do we need a retention policy, and therefore a license key, to meet our data obligations?
- Would Langfuse Cloud in our region meet the same review with less to run?
Red flags
- Docker Compose on one VM serving production traffic.
- ClickHouse sharing a small host with the application and its databases.
- No retention policy and no disk alerting on the ClickHouse volume.
- A v3 deployment with no upgrade plan before January 2027.
Products in this piece
Sources
- Official documentation
- 10
- Public source
- 5
- Langfuse docs: Self-host Langfuse
- Langfuse docs: Docker Compose deployment
- Langfuse docs: Kubernetes (Helm) deployment
- Langfuse docs: ClickHouse (self-hosted)
- Langfuse self-hosted pricing
- Langfuse docs: Enterprise license key (self-hosted)
- Langfuse docs: Data retention
- Langfuse docs: Migrate Langfuse v3 to v4 (self-hosted)
- Langfuse changelog: Langfuse v4 is live (Aug 17, 2026)
- Langfuse docs: Authentication and SSO (self-hosted)
- langfuse issue #6572: v3 ClickHouse CPU consumption (Apr 23, 2025)
- jordimo/infra pull request #15: standardise on Phoenix, keep Langfuse v4 as fallback (Aug 6, 2026)
- hive issue #1480: the demo box cannot host self-hosted Langfuse (Aug 29, 2026)
- James Idzik, Cresta engineering blog: Tracing multi-service LLM pipelines with Langfuse (Mar 26, 2026)
- langfuse issue #5577: ClickHouse migration failure after v3.28.2 (Feb 16, 2025)