Migrate from Langfuse Cloud to self-hosted Langfuse: what the move involves
Moving from Langfuse Cloud to a self-hosted Langfuse is a data move plus a platform build, and the effort depends on three things you settle first: the Langfuse version you will run, how long you keep traces, and which Enterprise features your teams already use. The self-hosted product runs the same codebase as Langfuse Cloud, so your traces, prompts, datasets and the API calls your applications make should carry over without redesign. The documented cookbook includes Python scripts that transfer traces, prompts and datasets from Cloud to a self-hosted instance, so the work is mainly planning the target, running the scripts and checking the results. Your own team or a partner can do that work, and the cost depends on how much of the history you need and how much verification you require.
Start with the version gap. Langfuse Cloud deploys continuously and can run ahead of the latest self-hosted release, so a feature your team uses on Cloud may not yet ship self-hosted. Compare the Cloud features in use against the versioning and compatibility notes and confirm with Langfuse which self-hosted release matches your SDK versions. If the gap is large, the target may need a major upgrade, which changes the infrastructure and data model and is a separate project. Also confirm the ClickHouse, PostgreSQL and Redis or Valkey requirements of the version you pick, because those drive the infrastructure you must build before any data arrives.
Next, settle retention and Enterprise features. Retention settings decide how much history is worth copying, and copying years of traces is much heavier work than copying the last few months. Make a list of the Enterprise features you use today, such as project-level RBAC, protected prompt labels, data retention policies, audit logs, data masking and SCIM provisioning, and confirm which need an Enterprise license key on your self-hosted instance. Plan your SSO and access model before cutover, because users and API keys must map to the new projects. Ask Langfuse to confirm what the cookbook does not move automatically, and verify each item in a test instance before you cut over production traffic.
Which Cloud capabilities map cleanly to self-hosted Langfuse
This table compares the main Langfuse Cloud objects and settings with their self-hosted equivalents and shows what the cookbook moves, what you recreate by hand, and which Enterprise features must be enabled first. Read the third column as the work list for your cutover, and treat every entry marked as a point to confirm as an open question to resolve with Langfuse before you start.
| Cloud capability | Self-hosted equivalent | Migration treatment |
|---|---|---|
| Traces and observations | Stored in your ClickHouse, with the same data model when versions match | Moved by the cookbook scripts; confirm version alignment and volume with Langfuse first |
| Scores | Stored alongside traces in ClickHouse | Expected to move with traces; confirm the script covers every score type you use |
| Prompts and prompt versions | Prompt management in your self-hosted project | Moved by the cookbook scripts; labels such as production should be checked after the copy |
| Datasets and dataset items | Datasets in the target project | Moved by the cookbook scripts; confirm item linkage to historic traces |
| Projects and API keys | Projects created on the target, with new keys issued | Recreate projects and keys by hand and update every SDK and OTEL exporter that sends traces |
| Users, roles and organizations | Local users or SSO users on your instance; project RBAC needs an Enterprise license key | Recreate manually; confirm whether any role data moves with the cookbook |
| SSO configuration | Auth.js providers configured with your own identity provider settings | Recreate manually against your identity provider; confirm redirect URLs and domain enforcement |
| Webhooks and integrations | Configured again on the target instance | Recreate manually; confirm that no integration settings are carried over by the scripts |
| Data retention and masking settings | Retention policies and server-side masking require an Enterprise license key | Enable the license key on the target before configuring; confirm current feature availability with Langfuse |
| Cloud features shipped ahead of self-hosted | Some Cloud features may not exist in your self-hosted release yet | Check the target version against Cloud features in use; confirm with Langfuse before cutover |
Documented import and migration paths
Langfuse documents a data migration cookbook for moving traces, prompts and datasets between Cloud and self-hosted instances, plus OpenTelemetry and API paths for the work around it. Each path moves a different slice of your history, so map them to your data before choosing one. Confirm each gap with the vendor before cutover.
Data migration cookbook scripts
Langfuse publishes Python scripts in its data migration cookbook that transfer traces, prompts and datasets from Langfuse Cloud to a self-hosted instance. Run them against a staging target first and compare record counts per project. Check what is not in the scripts before you assume a full copy, including scores, annotation queues and any configuration that lives only in the UI. Ask the vendor which object types the current script version covers.
Cookbook FAQPrompts and datasets as separate transfers
Prompts and datasets are copied as their own objects, so version history, labels and dataset items need to be verified after the transfer rather than assumed. Compare the prompt labels your production code requests with the labels on the target. Datasets referenced by experiments should be checked for item IDs, because experiment results on the source do not follow the dataset automatically.
OpenTelemetry endpoint for live tracing
Applications instrumented with OpenTelemetry can send traces to the self-hosted /api/public/otel endpoint, which lets you redirect live traffic without moving history. Run the old and new endpoints in parallel for a short window and compare trace counts. This path moves new traces only, so the historic data still needs the cookbook scripts or a decision to leave it in Cloud.
Recreating projects and API keys
Projects, members and API keys are not copied as secrets by the transfer scripts, so you create them on the self-hosted instance and issue new key pairs. Map each Cloud project to a self-hosted project name, update the LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY values in each application, and rotate any key that was shared. Plan this change with the owners of each service, since a wrong key silently drops traces.
Keeping SDK and API versions aligned
The SDKs and API calls must match the self-hosted server version before any path works reliably. Check the Langfuse versioning page for the compatibility between your self-hosted release and the SDKs your teams use, and pin SDK versions in your build files. Cloud can run ahead of the latest self-hosted release, so a feature used in Cloud may not exist on your instance yet.
Versioning docsGaps to confirm before cutover
Settle what is not covered before you schedule cutover: Enterprise-only settings such as retention policies, RBAC roles and protected prompt labels, which need a license key on your instance, and any custom dashboards or integrations configured in Cloud. Ask the vendor for a written list of data that the cookbook does not transfer, and decide how each item will be recreated or accepted as lost.
How a parallel run and cutover are sequenced
The sequence moves trace, prompt and dataset history from Langfuse Cloud into your own deployment while applications keep tracing without a gap. Each step closes with a check that tells the team whether the next step is safe to start.
Inventory projects, prompts, datasets and retention
The platform owner and the application teams list every Cloud organization and project, the prompts with their labels and versions, the datasets and evaluators in use, and the retention settings that apply to each. They also note which Enterprise features the Cloud account relies on, such as protected labels, data masking or SCIM provisioning, because those need a license key on the self-hosted side. Done when the team has a written inventory that maps each Cloud project to a planned target project and names an owner for each one. Confirm the Cloud plan and retention terms with Langfuse before you rely on them.
Build and verify the target deployment
Your infrastructure team deploys the self-hosted Langfuse stack in your cloud account or data center, with PostgreSQL, ClickHouse, Redis or Valkey and S3-compatible blob storage sized for the expected volume. Check the version you deploy against the Langfuse versioning and upgrade guides, and confirm that the ClickHouse, PostgreSQL and Redis versions meet the requirements for that release. Done when the web and worker containers are healthy, SSO sign-in works for a test user, and a test trace sent with a test key appears in a test project.
Run a pilot data copy and verify it
Using the data migration cookbook scripts, the team copies one non-production project from Cloud into the target instance. The scripts need API keys with matching access to both the Cloud and self-hosted instances, so confirm those keys and their project scopes before the run. Afterward, compare trace and observation counts, spot-check sampled traces, prompt versions and dataset items against the source. Done when the counts match or every difference is explained, and sampled records show the same inputs, outputs and metadata.
Copy the full history and reconcile
The team runs the copy for the remaining projects, prompts and datasets in the order set in the inventory, keeping a log of each batch with its source and target identifiers. Because new traces keep arriving in Cloud during the copy, the team agrees on a cutoff time and reruns the copy for the gap at the end. Done when every project has a reconciliation record showing counts before and after, and the cutoff gap has been copied and checked.
Dual trace applications to Cloud and self-hosted
Application teams add a second Langfuse client or exporter so each service sends traces to both Cloud and the self-hosted instance, with separate key pairs for each. This period lets the team compare live data in both systems and catch differences in masking, metadata or prompt resolution before any traffic depends on the new deployment. Done when a sample of requests from each service shows matching traces in both places, and the team has agreed on which fields differ, if any.
Cut over SDK keys and endpoints
Application owners switch their configuration to the self-hosted host and its keys, and remove the Cloud exporter once their service is confirmed. Change one service or environment at a time, starting with the lowest-risk one, and keep rollback instructions in the change record. Prompt fetches should be switched in the same window as trace sends so applications do not read prompts from the wrong system. Done when each service reports traces only to the self-hosted instance and no Cloud keys remain in its configuration.
Decommission Cloud access after the retention window
Once the agreed retention window has passed and the team no longer needs to consult Cloud, the owner revokes Cloud API keys, removes remaining users and documents the final state of the source data. Keep records of the migration, the reconciliation logs and the access changes for your audit trail. Done when Cloud keys are revoked, the inventory shows every project as migrated or retired, and the decommissioning record is signed off by the platform owner and the data protection contact.
How traffic and data flow during the parallel run
Applications keep sending traces to Langfuse Cloud while a copy of the same traces, prompts and datasets is staged in the self-hosted instance. The cookbook scripts read from Cloud and write into your deployment, which sits inside your own trust boundary with its PostgreSQL, ClickHouse, Redis or Valkey and blob storage. Check that both sides receive the same traffic, that API keys and project mappings line up, and that the self-hosted version matches what the cookbook expects before cutover.
Live traffic and historic data copy into the self-hosted instance during the parallel run.
What drives the effort and duration of the migration
This table lists the factors that raise or lower the effort of moving Langfuse Cloud data and configuration into your own deployment, and what to ask a partner to quote for each. Read it before requesting a fixed-scope quote, because most of the cost sits in volume, version alignment and rebuilt identity rather than in the copy scripts themselves.
| Driver | Why it changes effort | What to ask for in a quote |
|---|---|---|
| Volume of historic traces | More traces and observations mean longer copy runs, more ClickHouse storage and a larger verification sample. | Trace counts per project and date range, copy method, and the verification approach for each batch. |
| ClickHouse disk headroom | The v3 to v4 upgrade guide advises about 3x ClickHouse disk headroom when backfilling historic data, so undersized disks can stop a migration midway. | Disk sizing against the exported volume, and a plan for expansion or cleanup if headroom runs short. |
| Number of projects and workspaces | Each project needs its own mapping of API keys, settings and data, and mistakes in mapping are slow to find. | Project inventory, the mapping sheet, and who signs off on each project before cutover. |
| Number of prompts and prompt versions | Prompts, labels and version history must be exported and checked, and applications that fetch prompts by label need testing. | Prompt count, label usage, and whether protected labels and their roles must be recreated. |
| Dataset complexity | Datasets with many items, linked runs or custom schemas take more time to transfer and to validate than flat datasets. | Dataset count, item counts, and whether experiment runs must move or only the datasets. |
| Enterprise features in use | RBAC roles, protected labels, retention policies, audit logs, masking and SCIM need an Enterprise license key on self-hosted instances, and each one needs configuration and testing. | A list of Enterprise features currently in use on Cloud and the license key the partner expects to configure. |
| SSO and user provisioning rebuild | Identity providers, allowed email domains, SCIM and user roles must be recreated against your own identity system. | Identity provider choice, SSO test plan, and whether provisioning is in scope. |
| Applications that change SDK endpoint | Each service that sends traces must point to the new host and keys, and SDK versions must match the target release. | Count of applications and services, owners for each, and the cutover order and rollback approach. |
| Version alignment with Cloud | Langfuse Cloud can run ahead of the latest self-hosted release, so features used on Cloud may not exist yet on your version, which can force a pinned feature set or a wait. | The Cloud release your data comes from, the self-hosted version you will run, and a list of features that differ between them. |
What usually goes wrong and how to prevent it
Most failed moves from Langfuse Cloud come from decisions made late or not at all: which version the target runs, how much storage it has, and who owns which traffic on which day. The cards below cover the risks we see most often and the checks that catch each one before cutover.
Version mismatch between Cloud and target
Langfuse Cloud deploys continuously and can run ahead of the latest self-hosted release, so a feature you rely on may not exist on your target yet. Before you export anything, compare the Cloud features in use with the release you plan to run, and record the exact version. Pin the target to a version that supports every feature and SDK your applications depend on, and re-check after each Cloud change during the migration window.
Versions and compatibilityMissing ClickHouse headroom
Historic data loads into ClickHouse, and the v3 to v4 guide advises about 3x ClickHouse disk headroom when backfilling. Teams that size the target for steady-state ingestion alone run out of disk during the copy. Confirm the free disk you need for your exported trace volume before the first import, and keep the ClickHouse memory and CPU sizing from the scaling guide in view while the backfill runs.
v3 to v4 upgrade guideIncomplete API key and project mapping
Applications send traces with public and secret keys tied to a Cloud project. If the target has no matching project, or keys are created with different IDs, traces land in the wrong place or are rejected after cutover. Build a table that maps each Cloud project and key to its target project, then create the target keys before changing any application configuration. Test one key per project against the target before switching traffic.
Prompt labels and protected labels lost
Prompt versions and their labels such as production or staging drive which prompt your applications fetch. A copy that moves versions without labels breaks prompt retrieval on day one. Protected prompt labels are an Enterprise license feature on self-hosted Langfuse, so confirm whether your Cloud project uses them and whether your target license covers them. Compare label assignments on both sides after the import and verify a sample of fetches by label.
Retention settings not reproduced
Retention on Cloud is set per project and governs how long traces are kept. Data retention policies on self-hosted Langfuse require an Enterprise license key, and a target without the same policy keeps data longer than your rules allow. Record the retention configured for each project before migration, reproduce it on the target, and confirm with your privacy team which historic data should be imported at all.
Traces split with no cutover date
When some applications send traces to Cloud and others to the new instance for weeks, dashboards, scores and evaluations are split across two systems and no one can answer where a given trace lives. Set a named cutover date for each application, stop new writes to the old project once it passes, and keep the Cloud project available read-only until the historic import is verified.
SDK versions below the required minimum
Python SDK v5 and JS/TS SDK v6 need Langfuse v4.59.0 or later. An application on an older SDK may fail silently or send data the target cannot accept once the server moves. Inventory SDK versions across services, upgrade them in a staging environment against the target, and only then point production traffic at the self-hosted instance.
Langfuse upgrade guideQuestions buyers ask before moving from Langfuse Cloud
What does moving from Langfuse Cloud to self-hosted cost, and what drives it?
The software itself is not the main cost. Langfuse's core features and APIs are available in the MIT-licensed open source version without limits, so the spend is infrastructure, labor and any license you choose to add. Infrastructure is recurring: PostgreSQL, ClickHouse, Redis or Valkey, blob storage, and the Langfuse Web and Worker containers, sized to your trace volume and retention. One-time costs include planning, deployment, the data transfer itself and verification. The biggest cost drivers are how much history you move, how many projects and prompts are involved, whether you need Enterprise features, and how much of the work your own team absorbs. Ask any partner for a quote built from a written scope that lists each of these items separately, and ask who pays for cloud resources during parallel running.
How long does a move from Langfuse Cloud take?
The duration depends on the scope, not on a fixed template. The main variables are the volume of trace history you want to carry over, the number of projects, API keys and prompts, the size of your ClickHouse capacity, and how many Enterprise features you must reproduce in the new deployment. A common pattern is to stand up the self-hosted instance, run it alongside Cloud, move prompts and datasets, then migrate historic traces and cut over applications. Each stage has its own checks. Ask for a timeline in the written scope with milestones and a clear statement of what happens if the historic data copy is larger than planned.
What does our team need to provide for the migration?
Your team needs to make decisions and provide access. That means a named owner for the target environment, access to the cloud account or data center where Langfuse will run, decisions on retention and data residency, a list of projects, API keys and users, and someone who can change application configuration to point SDKs at the new endpoint. Security or compliance reviewers should confirm how personal data in traces is handled before historic data is copied. Ask the partner to list these inputs in the scope so the dependencies are visible before work starts.
Can our team run the migration alone using the documented cookbook?
Often yes, if you have engineers who can operate PostgreSQL, ClickHouse and Kubernetes or Docker, and who can run Python scripts against two APIs. Langfuse's data migration cookbook includes Python scripts for transferring traces, prompts and datasets between Langfuse Cloud and a self-hosted instance. The cookbook covers transfer, but it does not replace planning for sizing, backups, SSO, retention settings or verification. Check the current cookbook for what it moves and what it leaves behind, such as Enterprise settings, users and roles, and API key mapping. A partner can run the work as a fixed-scope engagement or support your own team on specific steps.
Do we need an Enterprise license before migrating from Cloud?
Only if you use the Enterprise features in Cloud today or plan to. Self-hosted features that need an Enterprise license key include project-level RBAC roles, protected prompt labels, data retention policies, audit logs, server-side data masking, UI customization, organization creators, the org management API with SCIM, and the instance management API. Inventory which of these your Cloud organization relies on before you move, because the target instance must have the matching configuration in place when users arrive. The Enterprise plan on Langfuse's self-hosted pricing page is custom-priced and adds a named support engineer, solutions architect access and a support SLA. Confirm current terms with Langfuse directly.
How does Cloud's faster release cadence affect which version we deploy?
Langfuse Cloud deploys continuously and can run ahead of the latest self-hosted release, so some features may be available on Cloud before they ship self-hosted. Choose the target version against the features your teams depend on, not the newest Cloud behavior. Check the versioning documentation for compatibility between SDKs and server versions. For example, Python SDK v5 and JS/TS SDK v6 need Langfuse v4.59.0 or later, so an older target can block SDK upgrades. The GitHub releases page lists v4.63.0, published October 16, 2026, as the latest release at the time of writing, so confirm the current release before you pin a version.
Does moving to self-hosted change who is responsible for uptime and security?
Yes. On Cloud, Langfuse operates the service. Self-hosted, your organization operates the infrastructure, the backups, the upgrades, the network controls and the identity integration. Langfuse's self-hosting documentation describes Docker Compose on a single VM for testing without high availability, and Kubernetes with Helm or Terraform-based deployments on AWS, Azure and GCP for production. Decide before cutover who receives alerts, who runs upgrades and who restores data if the platform fails. Ask any implementation partner to define these responsibilities in writing, including what remains with your internal team after handover.
How DeployOpen scopes and delivers a Langfuse Cloud migration
A written scope comes before any migration work starts. For a Langfuse Cloud move, that scope names the data to be copied (traces, prompts and datasets), the Langfuse version the self-hosted instance will run, the target infrastructure in your cloud account, data center or air-gapped network, and the Enterprise features you need in production. Most engagements are fixed-scope, so deliverables and timelines are agreed in writing before work begins, and a quote follows from that scope. Ask for the scope to list which Langfuse Cloud projects, API keys and users are in and out, because those mappings decide how much verification effort the work needs.
Deployment happens inside your own infrastructure. DeployOpen builds the self-hosted stack with its PostgreSQL, ClickHouse, Redis or Valkey and S3-compatible blob storage, then runs the copy using the cookbook scripts from the Langfuse data migration documentation. The verification step is where the scope earns its cost: counts of traces, observations, prompt versions and dataset items are compared between source and target, and sample records are checked field by field. Agree in advance which checks you will sign off on, and where the evidence will be stored for your change record.
Parallel run support is included as a defined phase in the scope, not as an open-ended favor. During that phase, applications can send traces to both Langfuse Cloud and the self-hosted instance, so you can confirm that new data lands correctly before you cut over. The end date for that phase, and the criteria for ending it, should be written into the scope. Optional retainers cover ongoing upgrades and continuous testing after cutover, and they are priced separately from the migration. Confirm with DeployOpen which costs are one-time and which recur, and ask for the quote to show both.

