Langflow and Langfuse integration

Langflow has a native Langfuse integration from v1.0.17, so tracing flows into your own Langfuse host is a configuration task with clear prerequisites and checks. This page shows the setup sequence, data mapping, security controls and failure points.

On this page

Langflow and Langfuse integration: what it connects and how

A team that runs Langflow flows and wants every run traced in a self-hosted Langfuse should use Langflow's native Langfuse integration. It has been available since Langflow v1.0.17 and works with Langfuse Cloud as well as a local or self-hosted Langfuse, so the trace destination can stay inside your infrastructure. The integration sends flow runs to Langfuse as traces, and it captures component-level activity within each run, such as model calls and the inputs and outputs passed between components. That gives platform owners and flow builders one place to see what a flow did, how long each step took and where a run failed, without adding tracing code to every flow.

The integration does not replace the rest of your Langfuse setup. It only sends data that Langflow produces, so applications that call the model APIs directly, services outside Langflow and the Langflow instance's own logs need their own instrumentation or monitoring. It also does not decide what data is acceptable to send. Prompts, user messages and retrieved documents often contain personal or confidential data, so before rollout confirm with your security and privacy teams which flow inputs and outputs may reach Langfuse, and check whether your Enterprise license covers the server-side data masking you may need. The Langfuse configuration itself, including its PostgreSQL, ClickHouse and blob storage, is covered in the self-hosted deployment guidance and is a prerequisite for this work.

Plan the connection in three decisions: which Langflow environments send traces (for example, development only, or development and production with separate Langfuse projects), which Langfuse project and API key pair each environment uses, and which host address Langflow must reach over your network. Confirm the Langflow version you run against the native integration requirement and the release notes for your version, because the configuration keys and component behavior can change between releases. Test the setup with a single non-sensitive flow first, then check that its run appears in Langfuse with the expected component spans before enabling tracing across the wider Langflow estate.

What you need before connecting Langflow to Langfuse

Langflow sends traces to Langfuse only when both services are running, reachable and configured for production use. The cards below cover the Langflow install, its admin login, the Langfuse host and keys, the database choice and the HTTPS layer that joins them.

Choose the Langflow install method

Langflow installs as a Python package (Python 3.10 to 3.14, with uv recommended), as a Docker image or as Langflow Desktop for Windows and macOS. For a shared, self-hosted Langflow that reports traces to your Langfuse, the Python package or Docker image is the practical choice, since Desktop runs on a single user's machine. Pin one Langflow release and record it, because the traces your team sees depend on that version's integration code.

Langflow README

Set the superuser password

Official Langflow release packages and Docker images disable automatic login by default and require a superuser password set through LANGFLOW_SUPERUSER_PASSWORD. Store this value in your secrets manager and inject it at startup rather than writing it into compose files or images. Without it, the instance will not start for an unattended deployment, so confirm the variable is set in every environment before the first run.

A reachable self-hosted Langfuse host

Langflow needs the base URL of a Langfuse instance it can reach over the network, either Langfuse Cloud or a local or self-hosted deployment. Confirm that the Langflow host, including any container or Kubernetes pod, can resolve and connect to that URL, and that the Langfuse web service answers there. Check that the network path allows outbound calls from Langflow, since a blocked route fails silently from the user's point of view.

Langfuse Langflow docs

Project API keys for each Langflow environment

Create a project in Langfuse and generate a public and secret API key pair for it, then give each Langflow environment (development, staging, production) its own pair. Separate projects or keys keep traces from different environments apart and make it possible to revoke one environment without affecting the others. Keep the secret key out of flow exports and version control, because flow JSON is often shared between teams.

PostgreSQL instead of the SQLite default

Langflow uses SQLite by default, and its documentation says PostgreSQL is better suited for production because of concurrent users, data integrity and scalability. Plan a PostgreSQL database for Langflow's own state before go-live, and confirm the connection settings with the Langflow custom database documentation for the release you pin. This database is separate from the PostgreSQL instance that Langfuse itself uses, so size and back up each one on its own terms.

Langflow database docs

HTTPS in front of both services

Langflow's deployment guidance covers remote servers behind Caddy or Nginx with HTTPS, and the same reverse proxy pattern applies to a self-hosted Langfuse. Terminate TLS for both services with certificates your organization manages, so API keys and prompt content do not cross the network in clear text. Confirm the proxy forwards the headers and request sizes both applications expect, and test the Langflow to Langfuse call over the final hostnames.

Langflow deployment overview

Confirm versions before pinning

Check the exact Langfuse version you run against the Langflow release you pin, using the Langfuse and Langflow release pages and the Langfuse integration documentation. Langflow releases are frequent, so a version that worked in testing may behave differently after an update. Record both versions in your change log and retest a sample flow after any upgrade of either product.

Langflow releases

How to configure Langflow to send traces to self-hosted Langfuse

This sequence connects a Langflow instance to a self-hosted Langfuse project so that a test flow run appears as a trace with its component spans. Each step ends with a check you can run before moving on.

  1. Create a Langfuse project and API keys

    A Langfuse administrator creates a dedicated project for the Langflow workload in your self-hosted Langfuse UI, then generates a public and secret API key pair for that project. Store the secret key in your secrets manager before you leave the page, because it is the credential Langflow will use. Done when the project appears in the project list under the name you chose and the key pair is recorded against that project, not a shared or unrelated one.

  2. Confirm the Langfuse host is reachable from Langflow

    The engineer running Langflow checks that the Langfuse host URL resolves and responds from the machine or container where Langflow will run, not only from a browser on a laptop. If Langflow runs in Docker or Kubernetes, test from inside that network, because a host reachable from your desktop may be blocked from the workload. Done when the Langfuse sign-in page loads from the Langflow host over HTTPS and the connection is not blocked by a proxy or firewall rule.

  3. Confirm the Langflow version supports the integration

    The engineer checks the installed Langflow version, whether installed as a Python package, Docker image or Langflow Desktop, and upgrades if it is older than v1.0.17. Langflow has a native Langfuse integration from that version, so earlier builds need a manual setup that this sequence does not cover. Done when the version reported by the running instance is v1.0.17 or later, recorded alongside the Langfuse version in your change record.

  4. Set the host and keys in the Langflow environment

    The engineer sets three values in the environment of the Langflow process: the Langfuse host URL of your self-hosted instance, the public key and the secret key from step one. Copy the exact variable names from the Langfuse Langflow documentation for your version, and keep the secret key out of source control and shared configuration files. Done when the variables are visible in the runtime environment of the Langflow process, for example through your container or service configuration, and nowhere else.

  5. Restart Langflow to load the new configuration

    The engineer restarts Langflow so it reads the new environment values at startup. In Docker or Kubernetes, recreate the container or pod so the variables take effect rather than only restarting the process inside it. Done when Langflow starts cleanly and its startup logs show no errors about the Langfuse connection. If your version logs a specific confirmation line, record its exact text so you can search for it later.

  6. Run a test flow in the playground

    The engineer builds a minimal test flow with an input, a language model component connected to a model you are authorized to use, and an output, then runs it in the Langflow playground. Keep the flow small so the trace is easy to read. Done when the run completes and returns an answer in the playground. A failed model call still produces a trace in many setups, so confirm the run result itself before moving on.

  7. Confirm the trace and component spans in Langfuse

    The engineer opens the Traces view in the Langfuse project that owns the keys and finds the trace from the test run. They expand it to check that each Langflow component appears as its own span, with inputs, outputs and the model call, and that the trace is not in a different project or environment. If the trace is missing, check the project, the host and the key pair against step one before rerunning the flow. Done when the trace is visible in the correct project with component-level spans, and the team has saved the trace link for the runbook.

How a Langflow run reaches your Langfuse host

The run starts when a user or API caller sends a request to Langflow, which executes the flow's components on the Langflow host. The integration exports each run's trace across the trust boundary to your Langfuse network, and that export is HTTPS, terminated at the reverse proxy before it reaches Langfuse Web. Web hands asynchronous work to Langfuse Worker, which writes trace data to ClickHouse and stores payloads in blob storage, while PostgreSQL holds application records. Check that the proxy certificate is valid, that the export endpoint is reachable from the Langflow host, and that workers can reach every data store.

Trace export crosses the trust boundary over HTTPS at the proxy.

How Langflow flows, components and runs map to Langfuse traces

This table maps Langflow concepts such as flows, runs, components, inputs, outputs and errors to Langfuse trace, observation, generation, metadata and session objects. Use it to predict what you will see in the Langfuse UI, then confirm each row with a test flow in your own environment before you rely on it.

Langflow conceptLangfuse conceptWhat to check in your environment
Flow run (one execution of a flow)TraceRun one test flow and confirm a single trace appears per execution, with the flow name visible in the trace.
Component execution inside a runObservation or spanConfirm each component that ran appears as a nested observation, and that the nesting matches the flow's connection order.
Language model component callGenerationCheck that model name, input messages and output appear, and that token usage is recorded if the provider returns it.
Chat input and chat outputTrace input and outputVerify the text you sent and the final response match what the trace shows at the top level.
Flow or session identifierSessionSend two messages in one chat session and confirm both traces group under the same session in Langfuse.
Component settings and run metadataMetadataConfirm which settings and identifiers appear as metadata, and whether any sensitive values are exposed before you enable tracing broadly.
Component or flow errorObservation with error statusForce a failure in a test component and confirm the error message and failing step are visible, not hidden by a later step.

Setup differences for a laptop test, a single server and a production cluster

A laptop setup is the fastest way to confirm that Langflow sends traces to Langfuse and that component-level spans look right. Langflow runs as a local Docker container or Python process, and Langfuse runs alongside it on the same machine. Nothing here is designed to survive a restart of the host or to serve other users, so the goal is to validate the integration before you spend effort on the shared environment.

  • Keys: Create a project in your local Langfuse, generate a key pair, and pass them as environment variables for the Langflow process. Keep them out of exported flows and shared notebooks.
  • Host URL: Use the address the Langflow container can reach, which is often not localhost from inside a container. Confirm the path with a test trace before assuming it works.
  • Restart behavior: Containers started without persistent volumes lose local Langfuse data when removed. Treat test traces as disposable.
  • Superuser password: Set LANGFLOW_SUPERUSER_PASSWORD even on a laptop, because official images disable automatic login by default.
  • Database: Langflow defaults to SQLite here, which is acceptable for a single user but not for the shared setups in the other tabs.

Before moving on, run one flow end to end and confirm that each component appears as a span in Langfuse with inputs and outputs.

Securing the Langflow to Langfuse connection

Langflow sends trace data to Langfuse using credentials stored in the flow environment, so the connection is only as safe as the keys, hosts and project boundaries behind it. The cards below cover what to lock down on each side and where personal data can end up in traces.

Keep Langfuse keys out of flow exports

The Langfuse public and secret keys authorize writes to a project, so they belong in a secrets store and in the Langflow runtime environment, not in flow JSON. Flow exports are often shared between teams, committed to version control or attached to tickets. Before exporting a flow, check that no key values are embedded in component fields, and rotate any key that has appeared outside the secrets store. Confirm with your secrets platform how Langflow instances receive the values at startup.

Langfuse Langflow docs

Set the superuser password and keep login enforced

Official Langflow release packages and Docker images disable automatic login by default and require a superuser password set through LANGFLOW_SUPERUSER_PASSWORD. Keep that default in place, store the password in your secrets store and do not re-enable automatic login on hosts that hold Langfuse credentials. Anyone who can open the Langflow UI can usually view and edit the flows that reference the Langfuse keys, so the Langflow login is part of the Langfuse trust boundary.

Langflow README

Serve both hosts over HTTPS

Langflow and self-hosted Langfuse both need HTTPS endpoints when they run on remote servers. Langflow's deployment docs describe placing a remote server behind Caddy or Nginx with HTTPS, which is the pattern to follow for the Langflow host. On the Langfuse side, terminate TLS at your load balancer or ingress and confirm that the host value configured in Langflow matches a certificate your hosts trust. Traces and keys sent over plain HTTP between hosts are exposed to anyone on that network path.

Langflow deployment overview

Scope traces to one Langfuse project

Each Langfuse API key pair is tied to one project, so the key a flow uses decides where its traces land. Create a dedicated project for Langflow traces, issue keys only for that project, and avoid reusing keys from a production application project. Separate projects also keep retention and access decisions simple. Check which project receives traces after a test run in a non-production flow before you connect real workloads.

Langfuse Langflow docs

Treat prompts and inputs as personal data

Component inputs, prompts, retrieved documents and model outputs in a Langflow flow can contain names, contact details or customer records, and Langfuse stores them as trace content. Decide which flows may send full inputs, define retention for the Langfuse project, and tell users what is recorded. Review sample traces with the teams that own the flows, since a flow that handles support tickets carries more personal data than one that summarizes public documents.

Confirm which Enterprise controls you have

Project-level RBAC and server-side data masking are Enterprise features in self-hosted Langfuse, along with data retention policies and audit logs. Without RBAC, a user with access to one project may have broader visibility than your access model allows. Without server-side masking, personal data in traces is stored as sent. Ask whether your instance runs with an Enterprise license key and confirm each control in the admin settings before you rely on it for regulated data.

Langfuse license key docs

Why Langflow traces are missing or incomplete in Langfuse

This table lists the failures teams hit most often when tracing Langflow flows into a self-hosted Langfuse, with the likely cause and the fix for each. Work through the rows in order, since host and key problems hide every other symptom. If traces appear but lack component detail, check the last row before changing configuration.

FailureLikely causeFix
Nothing arrives in LangfuseHost URL is missing its scheme, has a trailing path, or points at the wrong port for your Langfuse Web endpointSet the full base URL including https:// to your Langfuse host, then confirm the Langfuse Web container is reachable from the Langflow host
Traces go to the wrong project or fail authenticationPublic and secret keys were copied from a different Langfuse project or organization than the one you are checkingRegenerate keys in the target project settings, update both values together, and restart Langflow so it reads the new values
Some flows are traced and others are not, or tracing never startsLangflow process started before the Langfuse environment variables were exported, so the values were never loadedExport the variables in the same shell or service definition that starts Langflow, then restart the process or container
Connection errors or certificate failures in Langflow logsEgress from the Langflow host to Langfuse is blocked by a firewall or proxy, or the internal CA certificate is not trusted by the Langflow runtimeOpen outbound access to the Langfuse host, add the internal CA to the trust store used by Langflow, and test with a simple request from that host
Traces are slow to appear or some runs are dropped under loadLangflow is using its default SQLite database, which handles concurrent users and writes poorly compared with PostgreSQLPoint Langflow at a PostgreSQL database for production, as the Langflow custom database docs describe, and load test before rollout
Trace shows the flow but no component stepsTrace is created at flow level, while component spans depend on the Langflow version and the components used in the flowConfirm the Langflow version supports the native integration (v1.0.17 or later), check the run from the Langflow playground, and compare against a minimal test flow
Component spans have empty inputs, outputs or model detailsSensitive values are masked, or a component does not expose the fields you expect to LangfuseCheck masking settings in Langfuse, review the component's output in Langflow, and confirm which fields your team is allowed to store

Reading component-level traces to debug a flow

Use the trace tree in Langfuse to find the component that is slow or failing before you change anything in the flow. Each Langflow run appears as a trace, and each component that executes in that run should appear beneath it as a span or observation. Open the trace, walk the tree from the top level flow down, and compare the start and end times of each node. The node with the longest duration or an error status is the first place to look. Confirm in your own environment that the component types you rely on produce their own spans in your Langflow version, because a component that does not emit a span will show up as a gap in the tree rather than as a failure. Test this with a short flow that uses the same components before you build any analysis on top of it.

Once you have found the suspect component, compare its inputs and outputs across several runs. Select the same component in two or three traces, one that behaved well and one that did not, and check the prompt or template text, the variables substituted into it, the model parameters, and the returned value. Most debugging of this kind comes down to one input that changed, such as a retrieved document that was empty or a variable that arrived in an unexpected format. Record what you find in a short note, because the same comparison is what you will repeat when a fix is deployed. If the flow handles personal data, review what the inputs and outputs contain before you share a trace with a wider audience, since these fields are stored in your self-hosted Langfuse.

To follow a conversation rather than a single run, link the traces to a Langfuse session. Pass a consistent session identifier from your Langflow deployment or client into the tracing configuration so that all turns of one user conversation group together in the session view. Then check that the identifier is the same across turns before you rely on session-level reviews. Ask your platform team to confirm which environment variables and Langflow version are used on each host, because tracing settings are read from the environment of the running Langflow service. Keep the same settings across development and production so that a trace you debug in one place looks the same as the trace you see in the other.

Langflow and Langfuse integration questions buyers ask

How much effort does connecting Langflow to Langfuse take for an in-house team?

For a single flow on a host that already runs Langflow and a reachable Langfuse instance, the core change is configuration: setting the Langfuse host and project keys in the Langflow environment and confirming that a run produces a trace. The effort grows with the number of environments and flows, the amount of secret handling, and how much of the Langfuse side your team has to stand up first. Your team needs someone comfortable with Docker or Python deployments, environment variables and basic Langfuse administration. The main work is repeatable: documenting the configuration, deciding which projects receive which traces, and checking that component-level spans show the inputs and outputs your reviewers need. Ask any partner to show how they would repeat the setup across your environments.

What drives the cost of outside help for a Langflow and Langfuse integration?

Cost follows the scope you agree in writing, because most engagements are fixed-scope. The main drivers are:

  • The number of flows and environments that must send traces, and whether flows are built in the UI, exported as JSON or served through the API or MCP server.
  • Identity: whether Langflow and Langfuse users sign in through your existing provider, and how access is mapped to roles.
  • Hosting: where Langflow runs (Docker, a remote server behind Caddy or Nginx, or Kubernetes), and where Langfuse and its data stores run.
  • Testing: how many flows must be verified, whether traces are checked for sensitive data, and whether a retest is required.

Any quote should list each of these as a separate line item so you can see what is one-time work and what recurs, such as ongoing support or upgrades.

Can our team set up Langflow tracing to Langfuse without a partner?

Yes, a team with Langflow and Langfuse operating experience can usually do the basic integration alone, because the native integration is available in Langflow since v1.0.17 and works with a self-hosted Langfuse. Plan for the parts that are easy to underestimate: keeping official Langflow images configured with a superuser password through LANGFLOW_SUPERUSER_PASSWORD, moving Langflow from its default SQLite database to PostgreSQL for production, and putting the deployment behind HTTPS. Outside help is most useful for production hardening, repeatable deployment across many environments, and a documented review of what traces contain. Confirm your own capacity for those tasks before deciding.

How long does a Langflow and Langfuse integration take depending on scope?

Duration depends on scope, not on a fixed template. A narrow scope covers one Langflow environment, one Langfuse project, the configuration and a trace check for a small set of flows. A wider scope adds production hosting, PostgreSQL for Langflow, HTTPS, identity, several environments and a test pass across many flows, and it takes longer. Because no supplied duration applies to this integration, ask any provider for a written timeline tied to the scope list, the environments in each phase and the dependencies on your access approvals. Timelines that do not name what is included should be treated with caution.

What must our organization provide before the integration work starts?

Prepare the inputs before work begins, because missing access is the most common cause of delay. You will typically need:

  • Hosts for Langflow and, if self-hosted, for Langfuse, with network paths between them.
  • A Langfuse project and its public and secret keys, stored in your secret management system rather than in flow files.
  • Administrative access to the Langflow host, including the ability to set environment variables and restart the service.
  • Sample flows that represent real components, including at least one flow with a retriever or agent step, so traces can be checked.
  • A named owner who can approve which data may appear in traces.

Confirm with the vendor the exact environment variable names for your Langflow version before writing the runbook.

Does the Langfuse license change how we set up Langflow tracing?

The core tracing path does not depend on an Enterprise license. Langfuse states that all core features and APIs are available in the MIT-licensed open source version without limits, and self-hosted deployments use the same codebase as Langfuse Cloud. The repository is MIT Expat licensed except the ee/, web/src/ee/ and worker/src/ee/ directories, which fall under a separate enterprise license. Features such as project-level RBAC roles, data retention policies, audit logs, server-side data masking and SCIM provisioning need an Enterprise license key. If your review requires masking trace content or audit trails of who viewed traces, check those features against the license key documentation before you finalize the design.

What should engineers check after the Langflow traces reach Langfuse?

Check that traces appear in the correct Langfuse project, that each component in a flow appears as its own observation, and that inputs and outputs match what the flow actually produced. Then verify the data your organization cares about: whether prompts or user content are captured, whether any secrets from component settings leak into traces, and whether the environment label separates development from production. Repeat the check after each Langflow upgrade, because the Langflow release cadence is frequent and patch releases can change configuration handling. Record the results so an auditor or reviewer can see what was tested.

How DeployOpen scopes and delivers the Langflow and Langfuse integration

DeployOpen plans and implements the Langflow and Langfuse integration inside your own infrastructure, from the Langfuse host and environment configuration to the trace checks your teams use. Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we scope

  • Confirm which Langflow version and install method (Python package, Docker image or Desktop) your flows run on
  • Record whether Langfuse runs as a self-hosted instance or Langfuse Cloud, and the host each Langflow server will reach
  • Agree in writing which flows, environments and component traces are in scope, with the fixed deliverables and timeline

How we build

  • Configure the Langfuse keys and host on each Langflow server, keeping secrets out of flow definitions and shared files
  • Check that the Langflow database uses PostgreSQL rather than the default SQLite for production, and that the superuser password is set
  • Test representative flows end to end and review component-level traces for inputs, outputs, model calls and tool steps

How we hand over

  • Deliver the written configuration record, including the host, environment variables and the locations of each setting
  • Document how to read component-level traces in Langfuse and which fields your teams should check when a flow misbehaves
  • Walk your platform and AI teams through the setup and the retest results before the engagement closes

How we support

  • Plan Langflow version upgrades with a test flow run and trace check against each new release before rollout
  • Offer ongoing support and continuous testing as a retainer, covering configuration changes and new flows
  • Ask us to confirm support terms, response expectations and upgrade handling in the written scope before you sign

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.