Why a Langfuse v3 to v4 upgrade needs a written plan
If you run a self-hosted Langfuse v3 instance in production, the move to v4 is a major upgrade with an observations-first ClickHouse data model, so it needs a written, sequenced plan rather than a routine update. Within a major version, Langfuse applies database migrations automatically at startup and describes those updates as non-disruptive. A v3 to v4 change is different: it reshapes the ClickHouse data model, and the supported path starts by moving to the latest v3 release and confirming that all background migrations have finished before v4 is installed. The reason is that v4 schema migrations drop tables that v3 superseded, so skipping that step can remove data your v3 instance still depends on.
Before you schedule anything, confirm the prerequisites in the Langfuse v3 to v4 upgrade guide. The guide requires ClickHouse 25.12 or later (26.4 recommended), PostgreSQL 15 or later and Redis 7.0 or later. If you deploy with the Helm chart and use bundled data stores, the chart must first move from v1 to v2, so that step belongs in the plan as its own milestone. Your SDKs are part of the same plan: Python SDK v5 and JS/TS SDK v6 need Langfuse v4.59.0 or later, so every service that sends traces must be inventoried before the server changes. Confirm the exact versions against the current release notes at the time you run the upgrade, since the most recent release listed for the project may move forward.
A written plan should name an owner for each of these decisions: the v3 background migration check, the ClickHouse disk headroom for backfilling history (the guide advises about 3x headroom), the write mode you will start in, the SDK rollout order, and the cutover and rollback point. Each decision changes the others, so agreeing them in writing before any change window is the practical control. Ask your team to document the current ClickHouse disk usage and backup state first, because both determine whether the backfill can run safely.
What changes in v4 and what each change asks of your team
This table lists each change in the Langfuse v3 to v4 migration, what it affects in a self-hosted deployment, and the action your team needs to take before cutover. Read it as a pre-flight checklist: rows that touch data stores and integrations usually need the most lead time.
| Change | Impact | Action needed |
|---|---|---|
| ClickHouse 25.12 or later (26.4 recommended) | Older ClickHouse versions cannot run the v4 data model | Check your current ClickHouse version and plan a upgrade before the Langfuse upgrade |
| PostgreSQL 15 or later | Older PostgreSQL versions are not supported by v4 | Confirm your PostgreSQL major version and schedule an upgrade if needed |
| Redis 7.0 or later | Older Redis or Valkey builds may fail the v4 startup checks | Verify the Redis or Valkey version in every environment, including staging |
| Observations-first ClickHouse data model | Queries, dashboards and exports that read the v3 trace-centric tables may return different results | Review every internal consumer of ClickHouse data and retest them in staging |
| Superseded v3 tables dropped by v4 migrations | Data in those tables is gone once v4 schema migrations run | Confirm all v3 background migrations have finished and take a verified backup first |
| About 3x ClickHouse disk headroom for historic backfill | Backfilling history temporarily needs much more disk than steady state | Ask your storage team to confirm headroom before starting the backfill |
| Legacy batch ingestion returns 400 after cutover | Any SDK or script still posting to /api/public/ingestion for most event types will fail | Inventory all senders and move them to current SDKs or OpenTelemetry before cutover |
| Trace-level and legacy-dataset LLM-as-a-Judge evaluators stop | Scheduled evaluations silently stop producing scores | Recreate these evaluators on the supported model or confirm they are no longer needed |
| Legacy traces and observations export stops producing data | Downstream reports or pipelines reading that export receive nothing | Identify export consumers and move them to supported export paths before cutover |
| Helm chart v1 to v2 for bundled data stores | Helm installs with bundled stores cannot move to v4 without the chart upgrade | Complete the chart upgrade first, as a separate change with its own rollback plan |
| Python SDK v5 and JS/TS SDK v6 need v4.59.0 or later | Applications on the new SDKs fail against an older server | Sequence the server upgrade ahead of SDK rollouts and keep older SDKs working during the switch |
Which infrastructure minimums to check before you start
Check the component versions before you touch the running system. The Langfuse v3 to v4 guide requires ClickHouse 25.12 or later, with 26.4 recommended, PostgreSQL 15 or later and Redis 7.0 or later. If any of these are older, upgrade them first as a separate change, so that a failed Langfuse upgrade does not also mean a failed database upgrade. Confirm the exact versions your Redis or Valkey service and PostgreSQL service report, because managed services sometimes run a version that differs from the one you expect. Also record the Langfuse Web and Worker image tags you run today, since the v3 release you move to first is the reference point for the rest of the plan.
Next, compare the current size of each component with the minimums in the Langfuse scaling guide: 2 CPU and 4 GiB for Web, Worker and PostgreSQL, 1 CPU and 1.5 GiB for Redis or Valkey, and 2 CPU and 8 GiB for ClickHouse. The same guide calls for at least 16 GiB of ClickHouse memory for larger deployments, so treat 16 GiB as the expected floor for any production instance that carries real trace volume. These figures are minimums, not sizing. Your event volume, retention period and concurrent query load determine the real requirement, and the facts supplied for this page do not give a volume-based sizing formula. Ask your Langfuse specialist or your own platform team to confirm current sizing against your ingestion rate and your history before you schedule the window.
Disk is the constraint most teams underestimate. Langfuse advises about 3x ClickHouse disk headroom when backfilling historic data, which means the free space must cover the data already stored plus the space the backfill writes while the old and new data coexist. Measure the current ClickHouse data size and free disk on every replica, then decide whether historic backfill is needed at all or whether a shorter window will do. If the gap is too large, expand storage or reduce the history you migrate before the cutover, not during it. Write the disk figures and the owner of each check into your change record.
Choosing legacy or dual write mode during migration
Legacy mode suits teams whose applications and evaluators still send legacy batch ingestion to /api/public/ingestion and cannot be changed before the upgrade window. In this mode the instance keeps accepting the older event format while you move workloads, so the upgrade itself does not force every SDK to change on the same day. It is a temporary bridge, not a place to stay.
- SDK rollout: Services on older SDKs keep sending batch events, so you can schedule SDK upgrades per service instead of all at once.
- Evaluator behavior: Trace-level and legacy-dataset LLM-as-a-Judge evaluators keep running, so scores on existing workflows continue during the transition.
- Export continuity: The legacy traces and observations export source keeps producing data while this mode is active.
- Planning risk: Every legacy consumer you miss will fail with a 400 response after cutover, so inventory callers before you choose this mode.
- Exit condition: Plan to leave this mode once inventory shows no remaining legacy callers and evaluators have moved.
Before you start, confirm the mode name and its supported values in the Langfuse v3 to v4 guide, and check your inventory of batch callers against the list of event types the guide says survive cutover.
Dual write mode suits teams that need to run old and new traffic side by side during the switch. Each event is written through both the legacy path and the new observations-first model, which lets you compare results and roll back without losing the traces produced during the overlap. The cost is extra write load and storage on ClickHouse for the duration of the overlap.
- SDK rollout: Teams can move services to new SDKs gradually while both formats are accepted, and verify each service against the new data model.
- Comparison window: Traces, scores and dashboards can be checked against the legacy view before any consumer depends on the new one.
- Capacity impact: Expect higher ClickHouse write load and disk use during overlap, so size headroom with the backfill guidance in mind.
- Evaluator behavior: Confirm with your team which evaluators run on which path, since behavior during dual write should be verified in your own instance rather than assumed.
- Exit condition: Set a date to leave this mode, because the overlap doubles some work and the guide treats both modes as temporary.
Before choosing this mode, ask your ClickHouse operator to confirm the write load and disk headroom your instance can absorb during overlap.
Events only is the default mode after cutover and the one your instance should run long term. It accepts the new event model and does not keep the legacy write path open, so the migration modes stop carrying traffic. Teams should treat this as the target state for every SDK, integration and evaluator.
- SDK rollout: Every application must send current SDK output, and the Python SDK v5 and JS/TS SDK v6 require Langfuse v4.59.0 or later.
- Batch ingestion: Legacy batch calls to
/api/public/ingestionreturn 400 for every event type except score-create, so any remaining batch caller will break. - Evaluator behavior: Trace-level and legacy-dataset LLM-as-a-Judge evaluators stop running, so you must move them to supported evaluator types before cutover.
- Export changes: The legacy traces and observations export source stops producing data and needs a replacement in your reporting.
- Configuration: Confirm that
LANGFUSE_MIGRATION_V4_WRITE_MODEis set to the default after cutover, and document who changed it and when.
Before cutover, check every caller and evaluator against this list and confirm the replacements in the Langfuse v3 to v4 guide.
What to prepare before the v4 cutover
Most of the risk in a Langfuse v4 cutover sits before the upgrade starts. The six items below are the preparation work that determines whether the migration is a planned change or an incident, and each one feeds the cutover decision.
Finish and confirm v3 background migrations
Move to the latest v3 release and confirm that every background migration has completed before you start. v4 schema migrations drop tables that v3 superseded, so an unfinished migration can leave data stranded or the upgrade blocked. Check the migration status in the running v3 instance and keep the output with your change record. Treat any migration still running as a blocker, not a warning.
v3 to v4 guideBack up PostgreSQL, ClickHouse and blob storage
Take restorable backups of all three stores before any v4 step, and test a restore into a separate environment rather than trusting the backup job logs. PostgreSQL holds configuration and metadata, ClickHouse holds the trace and observation data that the migration reshapes, and blob storage holds the event payloads. Record how long a restore takes, because that figure sets your rollback window.
Confirm ClickHouse and disk headroom
The v4 data model needs ClickHouse 25.12 or later, with 26.4 recommended, and the backfill of historic data needs about 3x ClickHouse disk headroom. Measure current disk usage and growth, then compare the free space against that multiple before scheduling the backfill. Confirm the PostgreSQL and Redis or Valkey versions too, since the guide requires PostgreSQL 15 or later and Redis 7.0 or later.
Inventory SDK versions and legacy ingestion callers
List every service that sends traces through the legacy batch endpoint at /api/public/ingestion, along with the SDK version it uses. After cutover, that endpoint returns 400 for every event type except score-create, so any caller you miss will fail silently in its own logs. Plan the Python SDK v5 and JS/TS SDK v6 upgrades alongside this list, noting that they need Langfuse v4.59.0 or later.
Inventory LLM-as-a-judge and trace-level evaluators
Identify every LLM-as-a-judge evaluator and every trace-level evaluator, and record which project and dataset each one scores. After cutover, trace-level evaluators and legacy dataset LLM-as-a-judge evaluators stop running, so any scoring pipeline that depends on them needs a replacement before the switch. Note who owns each evaluator so that someone can confirm the replacement scores match the earlier results.
Plan a staging run and the Helm chart step
Run the full upgrade in a staging environment loaded with production-like trace volume, because backfill time and disk use scale with data, not with the software version. If you deploy with the Helm chart and use bundled data stores, upgrade the chart from v1 to v2 before moving to v4, and rehearse that step in staging too. Record the timings and any errors so the production window is based on measured results.
How to plan the historic data backfill
Backfilling historic data is the step where your existing trace history is rebuilt into the observations-first ClickHouse model that Langfuse v4 uses. Plan it as a separate, measured job rather than a side effect of the cutover. The Langfuse v3 to v4 guide advises about 3x ClickHouse disk headroom while backfilling, so the first planning decision is whether your ClickHouse volumes can hold the existing data, the new tables and the temporary copy at the same time. Check current disk use per table, the size of the largest trace partitions and the free space on every ClickHouse node before you pick a run date. If the headroom is not there, expand storage or narrow the history you backfill before the work starts, because running out of disk mid-backfill is a far harder recovery than a delayed start.
Schedule the backfill outside peak ingestion. Ingestion from your applications continues during the run, and both compete for the same ClickHouse CPU, memory and disk I/O, as well as the Langfuse Worker that processes events. Pick a low-traffic window, confirm that the write mode you chose for the migration is set correctly before you start, and agree with application owners on a freeze or reduced load if your traffic has a known peak. Do not assume a duration. Confirm backfill duration against a staging copy restored from your own data, since history volume, trace shape and hardware all change the result, and the guide does not give a time you can apply to your deployment.
During the run, measure ClickHouse free disk on each node and the growth rate of the new tables, so you can stop the job before the 3x headroom is consumed. Watch CPU and memory on ClickHouse and the Worker, and check ingestion error rates and worker queue lag in the Langfuse UI and your platform monitoring, so that you can see whether live traffic is being delayed. Record start and end times, row counts per table and any failed batches, and compare row counts against the source before you call the backfill complete. Keep this log with your cutover record, because it is the evidence that the history you keep is the history you intended to keep.
The Langfuse v4 upgrade sequence with checks and rollback points
This sequence takes a self-hosted Langfuse v3 deployment to v4 in an order that keeps the v3 data and a clear rollback point in place until the new data model is verified.
Move to the latest v3 release
Upgrade the running self-hosted Langfuse to the latest v3 release before anything else, since the v4 guide expects you to start from there. Confirm in the Langfuse admin view or logs that every background migration has finished, not just that the web container is healthy. Your platform team owns this step. It is done when no background migration is pending or running, because v4 schema migrations drop tables that v3 superseded and an unfinished migration can leave data stranded.
Upgrade the Helm chart if bundled stores are used
If you run Langfuse on Helm with bundled PostgreSQL, ClickHouse or Redis or Valkey, upgrade the Langfuse Helm chart from v1 to v2 before you touch the application version. Work this through the separate Helm chart upgrade topic, since it changes how ClickHouse is managed. Done when the chart upgrade has completed on a non-production copy and the data stores are healthy and reachable after the chart change. Installs that use external data stores skip this step, so confirm which case applies to you first.
Check infrastructure against the v4 minimums
Compare PostgreSQL, Redis or Valkey and ClickHouse against the v4 guide: ClickHouse 25.12 or later (26.4 recommended), PostgreSQL 15 or later and Redis 7.0 or later. Also compare CPU and memory against the scaling guide minimums for web, worker, PostgreSQL, Redis or Valkey and ClickHouse. Plan ClickHouse disk for roughly 3x headroom over your historic data volume during backfill, which the guide advises. Your infrastructure team owns the sizing and the cloud or data center changes. Done when a written capacity check shows every component meets or exceeds the minimum and the disk headroom is confirmed with current usage figures.
Take verified backups before any change
Back up PostgreSQL, ClickHouse and the S3-compatible blob storage bucket, and record the Langfuse image or chart version and environment configuration. Restore at least one backup to a separate environment to prove it is usable, since an untested backup gives no rollback point. Your operations team owns this step. It is done when a restore test has succeeded and the backup set is labeled with the v3 version it represents, because this is the baseline you return to if cutover fails.
Stage the upgrade and backfill history
Deploy v4 in a staging environment that is restored from the production backups, then set LANGFUSE_MIGRATION_V4_WRITE_MODE to the legacy or dual write mode the guide describes for your case. Run the historic backfill there and watch ClickHouse disk use against the headroom you planned. Your platform team runs this, and the migration guide sets the expected behavior. It is done when the backfill finishes without errors, disk stays within the planned headroom, and a sample of traces, observations and scores reads back correctly in the UI and API.
Upgrade SDKs to v5 or v6 on v4.59.0 or later
Confirm the production Langfuse server is at v4.59.0 or later before the new SDKs are used, since the Python SDK v5 and JS/TS SDK v6 need that version. Move application services to Python SDK v5 or JS/TS SDK v6 in your normal release process, and keep older SDK services working until their code has been deployed. The separate SDK upgrade topic covers the details. It is done when each service reports traces through the new SDK and no service still depends on the legacy batch ingestion endpoint.
Cut over to events_only and verify
Switch the write mode to the default events_only mode, which applies after cutover, and restart Langfuse. Then verify ingestion from every SDK and OTLP source, confirm that LLM-as-a-Judge evaluators are running on the observation-level path you expect, and check that exports and any dashboards that depend on them still return data. Note that legacy batch ingestion at the ingestion endpoint returns 400 for every event type except score-create, and that trace-level and legacy-dataset evaluators stop running, the legacy traces and observations export stops producing data. Done when a defined test set of traces, scores and evaluator results appears as expected in production.
Set the rollback point before dropping tables
Before the superseded tables are dropped, agree with the business owners on the date and condition after which rollback to v3 is no longer practical, and record the backup set that serves as the restore point. Because v4 schema migrations drop superseded tables, a rollback after that point depends on restoring the backup, not reverting the application. Your platform lead and the service owners sign off on this decision in writing. It is done when the rollback procedure is documented, rehearsed in staging, and the sign-off names the backup that would be restored.
How the Langfuse components and migration modes fit together during cutover
The diagram starts with SDKs and OTEL senders writing to the legacy ingestion endpoint while the v3 deployment runs. Traffic then passes through Langfuse Web and Worker in the legacy or dual write mode set by LANGFUSE_MIGRATION_V4_WRITE_MODE, which writes to ClickHouse alongside PostgreSQL, Redis or Valkey, and blob storage. At cutover, the legacy endpoint closes and events_only becomes the path. Check that each sender moved to the OTEL endpoint before this switch.
Ingestion paths before and after the v4 write mode cutover.
What makes the v4 upgrade take longer
This table lists the factors that most change how long a Langfuse v3 to v4 upgrade takes and how much work it creates. Read each row as a question to answer before you estimate, because the inventory tells you which drivers apply to your deployment. The main takeaway is that effort grows with the number of SDK services, custom evaluators and historic data your team must carry across the cutover.
| Driver | Effect on effort | What to inventory |
|---|---|---|
| SDK services to migrate | Each service using the Python SDK v5 or JS/TS SDK v6 needs code changes, testing and a rollout slot, and all of them must move before legacy ingestion stops. | Every application, job and notebook that sends traces, scores or prompts to Langfuse, with its language and SDK version |
| Custom evaluators | Trace-level and legacy-dataset LLM-as-a-Judge evaluators stop running after cutover, so each one needs a replacement or a decision to retire it. | Each evaluator, whether it is trace-level or dataset-based, who owns it, and what score it writes |
| Historic data volume | Backfilling history into the new observations-first model needs extra ClickHouse disk, and larger volumes lengthen the backfill and its checks. | Trace and observation counts per project and retention period, measured on your current ClickHouse disk usage |
| Bundled versus external ClickHouse and PostgreSQL | Bundled data stores in Helm add the chart v1 to v2 step and may need operator-managed ClickHouse, while external stores need version checks and their own backup plan. | Where each data store runs, who operates it, its current versions, and whether backups are tested |
| Helm chart v1 to v2 work | Helm users with bundled data stores must complete the chart upgrade before moving to v4, which adds a separate change and test cycle. | Chart version in use, custom values files, and any bundled component that the upgrade will replace |
| Teams relying on the legacy export | The legacy traces and observations export stops producing data after cutover, so every downstream report or pipeline needs a new source. | Each consumer of the export, the team that owns it, and the date it must keep receiving data |
| Environments needing staging | Each environment that runs its own Langfuse instance needs a rehearsed upgrade, so more environments mean more rounds of testing and sign-off. | Every Langfuse instance by name, its purpose, its data volume and the environments that must match production |
Questions teams ask before upgrading Langfuse to v4
What does a Langfuse v4 upgrade cost and what drives the fee?
The fee follows from the written scope, and DeployOpen does not publish a price list. Most of the effort sits in the parts you cannot skip: confirming your v3 background migrations are finished, sizing ClickHouse for the backfill, moving SDKs and evaluators, and cutting over. The main drivers are how many environments you run, how much history you backfill, whether you use Helm with bundled data stores (which needs a chart upgrade from v1 to v2 first), how many SDK integrations and evaluators you have, and how much testing you want before cutover. Ask any partner for a quote that lists each of these as a separate line, and state which items are one-time work and which are ongoing support.
How long does a Langfuse v3 to v4 upgrade take?
No duration figure is supplied for this upgrade, so treat any number a vendor gives you as a claim to verify against your own environment. The timing depends on your data volume, the ClickHouse disk headroom you have available, how many services send traces, and how long your change process takes. The official guide advises about 3x ClickHouse disk headroom when backfilling historic data, so storage capacity is often the first constraint. Ask for a timeline that shows the prerequisite checks, a staging rehearsal, the backfill window and the cutover window as separate phases.
What does the upgrade require from our own team?
Your team needs to supply access and decisions that only you can make. That includes the cloud or data center accounts where Langfuse runs, the current versions of ClickHouse, PostgreSQL and Redis, a staging environment, the list of applications and SDK versions that send traces, the owners of prompts and evaluators, and a named approver for the cutover. Someone must also confirm the rollback plan and maintenance window with the teams that depend on tracing. Ask a partner to name which of these items they expect from you so the dependency is written into the scope.
Can an internal team complete the Langfuse v4 upgrade alone?
Yes, if the team has operational experience with Kubernetes or Docker Compose, PostgreSQL, ClickHouse and S3-compatible storage, and can read the official upgrade guide closely. The harder parts are the ones that fail quietly: an incomplete v3 background migration, a backfill that runs out of disk, and SDKs that keep sending legacy batch events after cutover. Teams without recent ClickHouse operations experience often bring in a partner for planning, staging rehearsal and evidence, while keeping production changes in-house. Decide which parts you own before you start, and write that split into the scope.
What happens to traces sent by old SDKs after cutover?
After cutover, legacy batch ingestion at the ingestion endpoint returns a 400 error for every event type except score-create. Traces sent by SDKs that still use that legacy path will be rejected, so you need to move those SDKs before cutover. Trace-level and legacy-dataset LLM-as-a-Judge evaluators also stop running, and the legacy traces and observations export source stops producing data. Python SDK v5 and JS/TS SDK v6 require Langfuse v4.59.0 or later. Inventory every service that sends traces, confirm its SDK version, and plan its update in the same window as the server change.
How does rollback work if the v4 upgrade fails?
Rollback depends on what has already changed. The v3 to v4 guide says schema migrations drop tables superseded during v3, so you cannot treat a v4 start as a simple application rollback. Plan a verified backup of PostgreSQL, ClickHouse and blob storage before the first v4 start, rehearse restoring it in staging, and keep the v3 images and chart values available. Choose the legacy or dual write mode deliberately, because it determines whether traffic still flows to the old data path during the switch. Ask any partner to show the rollback steps in writing, with the restore test evidence.
Should we choose the legacy or dual write mode for the migration?
Langfuse v4 starts in either a legacy or dual write mode, selected with the LANGFUSE_MIGRATION_V4_WRITE_MODE setting. Both are temporary migration modes, and the default events_only mode applies after cutover. The right choice depends on how many SDKs, evaluators and exports depend on the legacy data path and how long your team needs to verify the new model. Document which mode you chose, why, and the criteria for moving to events_only, because leaving a temporary mode in place without a plan creates ongoing confusion for operators.
Do we need an Enterprise license for the v4 upgrade?
The upgrade itself uses the open source codebase, and Langfuse states that core features and APIs are available in the MIT-licensed version. Some governance features need an Enterprise license key, such as project-level RBAC roles, protected prompt labels, data retention policies, audit logs, and SCIM provisioning. Check which of these you rely on today, because they must keep working through the upgrade. Confirm the current terms with Langfuse directly and in your contract, since licensing terms are not part of this upgrade's scope.
How DeployOpen scopes and delivers a Langfuse v4 upgrade
DeployOpen plans, implements, backs up, documents and supports self-hosted open-source platforms inside your own infrastructure, so a Langfuse v3 to v4 upgrade is handled in your cloud account, data center or air-gapped network. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
How we scope
- We inventory your current v3 version, ClickHouse, PostgreSQL, Redis or Valkey and blob storage against the v4 minimums.
- We confirm background migrations have finished on your v3 instance before any v4 schema change is planned.
- The written scope names the write mode, SDK and evaluator inventory, backfill range and cutover approach for your environment.
How we build
- We size ClickHouse disk for backfill with the roughly 3x headroom the upgrade guide advises, then test that estimate on a copy.
- We run the upgrade first in a non-production clone, choosing legacy or dual write mode with LANGFUSE_MIGRATION_V4_WRITE_MODE.
- We migrate SDKs and evaluators in staged order and check trace-level and score-create flows before cutover.
How we hand over
- You receive a runbook covering cutover steps, rollback points, backup verification results and the post-cutover validation checklist.
- We document which legacy ingestion callers, exports and trace-level evaluators stop working after cutover, with owners for each replacement.
- Operators receive a walkthrough of the v4 data model, health checks and the monitoring signals to watch in the first weeks.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the initial upgrade is complete.
- A retainer can cover routine minor version upgrades and retesting of SDK and evaluator changes as Langfuse releases new versions.
- Ask any provider to confirm in writing who responds to incidents, how fixes are tested and what the handover package contains.

