Running Langfuse on a single VM with Docker Compose

A single VM with Docker Compose suits evaluation and low-stakes use of self-hosted Langfuse. This page covers what it does not provide, the setup and secrets to change, and the signals that call for Kubernetes.

On this page

When a single VM running Langfuse with Docker Compose is enough

Langfuse documents Docker Compose on a single VM for testing, and that deployment has no high availability. If you need self-hosted Langfuse inside your own infrastructure for a proof of concept, a internal evaluation or a small team's trace history, one VM can be a reasonable starting point. If the traces feed production applications or you need recovery targets that a single host cannot meet, plan for a production platform from the start. A single VM is fast to build but carries every component's failure risk in one place.

A self-hosted Langfuse deployment runs two application containers, Langfuse Web (the UI and APIs) and Langfuse Worker (asynchronous event processing). Alongside them sit PostgreSQL for transactional data, ClickHouse for analytical data, Redis or Valkey for caching and queuing, and S3-compatible blob storage for events, media and exports. On a VM, all six run on one host, so a disk, memory or kernel problem affects ingestion and the UI at the same time. Confirm that your VM is sized against the minimums in Langfuse's scaling guide, which lists 2 CPU and 4 GiB for web, worker and PostgreSQL, and 2 CPU and 8 GiB for ClickHouse, before you count on it for any sustained load.

The core Langfuse codebase is MIT Expat licensed, and Langfuse states that all core features and APIs are available in the open source version without limits. Some features, including project-level RBAC roles, audit logs, data retention policies and server-side data masking, require an Enterprise license key, so check those requirements against your governance needs before you choose the single-VM path. Review the Langfuse self-hosting documentation for the current component list, and confirm with your security team which of those features you must have in place from day one.

Deployment options and when each fits

This table compares a single VM running Docker Compose, Kubernetes with the Helm chart, and the cloud Terraform modules on AWS, Azure and GCP. Read each row against your own availability needs and the team that will operate the stack. The main takeaway is that Langfuse documents Docker Compose on one VM for testing only, so production availability and scaling point to Kubernetes or a cloud module.

FactorSingle VM with Docker ComposeKubernetes with Helm chartCloud Terraform modules (AWS, Azure, GCP)
Documented useTesting, with no high availabilityProductionProduction
High availabilityNot provided by this setupPossible with replicated components you configurePossible with replicated components you configure
ScalingLimited to the one host; worker scaling is a host capacity questionScale worker and web deployments, with splitting web into ingestion and UI deployments documentedSame Kubernetes scaling model, on managed cloud infrastructure
Data storesPostgreSQL, ClickHouse, Redis or Valkey and blob storage run on the same VM unless you change the fileBundled or external data stores, chosen in the chart valuesProvisioned as managed cloud services by the module, or reused from existing accounts
Operations ownershipYour team owns the host, containers, backups and upgradesYour team owns the cluster, chart values and data storesYour team owns the cloud account, the module version and day-two changes to the stack
Minimum resources for componentsDocumented minimums for web, worker, PostgreSQL, Redis or Valkey and ClickHouse must fit on one hostDocumented minimums apply per componentDocumented minimums apply per component, sized through the module
Upgrade pathMajor upgrades follow dedicated migration guides; confirm the Compose file version you runHelm users with bundled data stores must upgrade the chart from v1 to v2 before Langfuse v4Follow the module's upgrade notes alongside the Langfuse migration guides
Typical signal to moveProduction traffic, uptime targets or a need for failoverNeed for cloud-managed data stores or landing zone alignmentNeed for Kubernetes control on the same cloud account

Setting up Langfuse on one VM step by step

This sequence takes a single Linux VM from bare host to a running self-hosted Langfuse instance with changed secrets, a correct public URL and a verified first admin login. It is a test or small-team deployment path, so treat the result as a starting point rather than a high availability setup.

  1. Provision and size the VM

    Your infrastructure or platform team creates a Linux VM in a network segment you control and sizes it against the documented minimums. Langfuse Web and Worker and PostgreSQL each need at least 2 CPU and 4 GiB, Redis or Valkey needs 1 CPU and 1.5 GiB, and ClickHouse needs 2 CPU and 8 GiB, with at least 16 GiB of ClickHouse memory for larger deployments. Add disk for ClickHouse and PostgreSQL data, since trace volume drives growth. Confirm the sum of these minimums fits the VM, then check that Docker and Docker Compose are installed and that the host clock is synchronized. Done means the host reports the expected CPU, memory and free disk, and the Docker engine runs a test container.

  2. Obtain the Compose file from official docs

    Copy the Docker Compose file from the official Langfuse self-hosting documentation rather than writing one from memory or a community gist. Record the Langfuse version it targets, and note the release you intend to pin. The current release listed on the Langfuse GitHub releases page is v4.63.0, but confirm the tag you deploy against before pulling images. Store the file in a version-controlled directory on the VM. Done means the file is saved with a pinned image tag, and a diff against the documented version shows no unexplained changes.

  3. Replace every default secret and salt

    Open the Compose environment settings and replace each default secret, salt and encryption key with a value generated for your environment. These include the NextAuth secret, the salt used for API key hashing, the encryption key, and the database and storage passwords for PostgreSQL, ClickHouse, Redis or Valkey and blob storage. Generate values with a cryptographically secure random source, store them in your secrets manager or a restricted file with root-only permissions, and never commit them to the repository. Done means no default placeholder value remains, and a search of the file for known example strings returns nothing.

  4. Set the public URL and network exposure

    Set the public URL that users and SDKs will use to reach Langfuse, including the scheme and host. This value is used for login redirects and generated links, so a wrong value breaks sign-in even when containers are healthy. Limit exposure to the Langfuse web port behind a reverse proxy or firewall rule you manage, and keep database, Redis and ClickHouse ports off the network. Plan TLS termination at the proxy or load balancer before users rely on the instance. Done means the URL in the configuration matches the address you will open in a browser, and the database ports do not answer from outside the host.

  5. Start the stack and wait for migrations

    Run the Compose stack in detached mode from the directory holding the file and environment settings. The Web and Worker containers, PostgreSQL, ClickHouse, Redis or Valkey and the blob storage service start together, and database migrations run automatically at application startup. Follow the logs of the Web and Worker containers until they report that migrations have completed and the server is listening. Done means the logs show no repeated restart loops or connection errors to PostgreSQL, ClickHouse or Redis.

  6. Check container health and service connectivity

    List the running containers and confirm every service reports a running or healthy state, with no container cycling through restarts. Check that the Web container can reach the health endpoint the official documentation describes, and that the Worker can reach the same data stores. If a container fails, read its logs before changing settings, since most first-run failures come from a mismatched password, an unreachable host name or insufficient memory. Done means all containers are healthy and the health check returns a successful response from the VM.

  7. Log in as the first admin

    Open the public URL in a browser, create the first admin account, and sign in. Confirm the account can open the project list and that the generated project keys are available in project settings. Then sign out and sign back in to confirm the session works through your public URL and TLS setup. If you plan to use SSO, enable it only after this login path is verified, and keep a break-glass admin account. Done means the first admin signs in through the public address, sees the default organization and project, and can create an API key for a test trace.

Secrets, network exposure and access on a single host

A single VM running Langfuse concentrates the web app, worker, PostgreSQL, ClickHouse, Redis or Valkey and blob storage on one machine, so a misconfigured secret or open port exposes all of them at once. The cards below cover what to change before real traces arrive, how traffic reaches the web container, which ports must stay internal, and how access is controlled.

Replace every default secret

Before any real data arrives, change the database passwords, the ClickHouse and Redis or Valkey credentials, the encryption key and the NextAuth secret in your Compose environment file. Store the file with restricted read permissions and keep it out of version control. Check that no sample value from the example configuration remains, because those values are public. Record where each secret lives so that rotation later does not require guesswork. Confirm the exact variable names against the self-hosting configuration for your release, since names change between major versions.

Self-hosting docs

Terminate TLS in front of the web container

The Langfuse web container should not face the internet directly. Put a reverse proxy such as Caddy, nginx or Traefik on the host to handle certificates, redirect plain HTTP and set the public URL that Langfuse uses for SSO callbacks and invitation links. Confirm that the URL configured in the application matches the external address users type, or sign-in redirects will fail. Decide who issues and renews certificates, and test renewal before it is due.

Keep data stores off public interfaces

Publish only the reverse proxy's HTTPS port. PostgreSQL, ClickHouse, Redis or Valkey and any MinIO or S3-compatible storage should bind to the internal Compose network or to loopback, not to 0.0.0.0 on the host. Compose port mappings are a common accident, so review the published ports list after every change. Verify from outside the host that only the intended ports answer, and confirm the same from a second network segment if you have one.

Harden and patch the host

The host runs the container runtime, the Compose stack and the proxy, so its own configuration matters as much as the application. Limit administrative access to named accounts with key-based SSH, enable a host firewall that allows only the proxy port and your administration path, and apply operating system security updates on a defined schedule. Plan Docker Engine updates separately and check them against the Langfuse release notes before applying them. Confirm who owns patch approval and how a failed update is rolled back.

Encrypt backups and control their access

Database dumps and blob copies contain the same trace content as the live system, so they need the same protection. Encrypt backup archives before they leave the host, store the keys apart from the archives, and restrict who can restore them. Test a restore into a separate host at least once, because an encrypted backup that cannot be decrypted is not a backup. Ask your team which backup encryption and key custody standard applies to this data and whether your auditors will need evidence of it.

Enable SSO and disable password sign-in

Langfuse supports SSO through several identity providers, and it can disable password sign-in or enforce SSO for specific email domains. Connect the instance to your identity provider before inviting users, then turn off password sign-in once you have confirmed that at least one administrator can still sign in. Keep a documented break-glass path for when the identity provider is unavailable. Confirm which of these options your license tier allows, because some access controls need an Enterprise license key.

Authentication and SSO docs

What a single VM does not give you: high availability, scaling and backups

The single-VM Docker Compose setup gives you no high availability. Langfuse documents this layout for testing, and the reason is structural: the Langfuse Web and Langfuse Worker containers, PostgreSQL, ClickHouse, Redis or Valkey and the blob storage integration all depend on one host. If that VM fails, is rebooted for patching or loses its disk, ingestion stops and the UI and APIs go down with it. Traces sent by applications are not lost by design, but they cannot be written until the host is back, and your teams lose access to prompts and evaluations in the meantime. Before you accept that outage profile, confirm with your stakeholders how long a stopped trace pipeline can be tolerated and whether any application would drop telemetry during that window.

Scaling is the second limit. The Langfuse scaling guide recommends adding worker containers when CPU load rises, and under heavy ingestion it recommends splitting langfuse-web into separate ingestion and user interface deployments. Both moves assume you can place containers on more than one node and route traffic between them. On one VM you can raise container counts only until the host's CPU, memory or disk is exhausted, and the documented minimums (2 CPU and 4 GiB for web, worker and PostgreSQL, and 2 CPU and 8 GiB for ClickHouse) already set a floor for the host. Measure ingestion load on the host before you size it, and treat sustained saturation as the signal to plan a Kubernetes move.

Backups are your responsibility in every layout, and the single VM makes them easy to neglect. You need a scheduled, off-host backup for PostgreSQL, a backup method for ClickHouse that matches your ClickHouse version and volume layout, and a copy or versioning policy for the blob storage bucket holding events, media and exports. Back up the .env file or secret store that holds the encryption key and database credentials as well, because a data restore without the matching secrets is not usable. Restores must be tested on a separate host at least as often as backups are taken. Ask the team that owns the VM to confirm, in writing, who runs restores, how long a restore takes in your environment and which recovery point you accept.

Limits to confirm before you rely on a single VM

A single VM with Docker Compose is a test-grade setup with no high availability, so the choices that matter are the ones you confirm before go-live. The cards below cover the release and version requirements, the Compose file, the disk and memory headroom, and the license questions that decide whether this host can carry your workload.

Current release and version requirements

Confirm which Langfuse release you will run and read its upgrade guide before you pin versions. For v4, the supplied requirements are ClickHouse 25.12 or later, PostgreSQL 15 or later and Redis 7.0 or later, so any older container image in your Compose file has to be replaced before the first start. Check the release list again on the day you deploy, because newer releases may change these requirements.

v3 to v4 guide

Compose file matched to the release

The Compose file you run has to come from the same release as the Langfuse images you pull. Mixing a file from one release with images from another can break service names, environment variables or database startup order. Keep the file under version control with the release tag in its name, and diff it against the upstream file for each upgrade.

ClickHouse disk headroom for backfills

If you import historic data during or after the v4 move, plan for about three times the ClickHouse disk space that the imported data occupies. A single VM has one disk pool for ClickHouse, PostgreSQL and blob files, so a backfill that fills it can stop ingestion for every service on the host. Ask for the expected backfill size before you schedule the import, and watch free space during it.

ClickHouse disk headroom
3x

Host resources for your ingestion volume

The supplied minimums are 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, with at least 16 GiB of ClickHouse memory for larger deployments. Those minimums do not reflect your traffic. Estimate your trace volume and concurrent users, size the VM above the minimums, and load test before you rely on the host.

Enterprise features that need a license key

Project-level RBAC roles, protected prompt labels, data retention policies, audit logs, server-side data masking, UI customization, and SCIM provisioning all require an Enterprise license key on a self-hosted instance. List the governance features your security or compliance team expects, then confirm which ones need a key before you design the rollout. Core tracing, prompts and evaluations do not depend on this list.

License key docs

How the containers on one VM connect

The diagram starts with SDK clients and browsers reaching Langfuse Web on the host, which serves the UI and APIs and accepts OpenTelemetry traces. Web hands processing to Langfuse Worker through Redis or Valkey, and the worker writes events to ClickHouse and blob storage while PostgreSQL holds transactional data. Everything sits inside one trust boundary around the VM, so the host is a single point of failure: if it stops, ingestion and the UI stop together. Check that each data store has its own persistent volume and that backups cover all of them.

Requests enter at Langfuse Web, and all data stores run on the same host.

Questions teams ask before running Langfuse on one VM

What does a single-VM Langfuse setup cost in effort, and who pays for what?

The main cost is people time, not licenses. The open source version is MIT licensed and its core features and APIs have no limits, so software fees are zero for the open source edition. You pay for the VM and its storage, the time of your engineers or a partner to install, configure and test the stack, and the ongoing work of patching, monitoring and backups. Setup effort is one-time; operations recur every month. Costs rise with the number of environments, the amount of trace data retained and any requirement for SSO, backups tested to a schedule or an Enterprise license key for features such as audit logs. Ask any partner for a quote built from a written scope that lists each of these items separately.

How long does a single-VM Langfuse setup take?

Duration depends mainly on how much of the environment already exists and who does the work. A team with a VM, a container runtime, a secrets process and an S3-compatible bucket ready will move much faster than one that must provision all of them first. The Docker Compose path is documented for testing rather than high availability, so most teams treat it as a pilot. Ask for a timeline that separates environment preparation, configuration and secrets, verification of login, tracing and backups, and handover. Do not accept a single duration without knowing which of those items it covers.

What skills does the team need to run Langfuse on one VM?

Your team needs working knowledge of Docker and Docker Compose, Linux administration, and the network controls around the VM. The stack includes Langfuse Web, Langfuse Worker, PostgreSQL, ClickHouse, Redis or Valkey and S3-compatible blob storage, so someone must understand how these services depend on each other. You also need a secrets process to replace default values, a tested backup routine for PostgreSQL, ClickHouse and blob storage, and a way to apply updates. Confirm these skills in-house before committing. If they are missing, the work can be scoped to include training or a managed handover.

Can our team install Langfuse on a VM using only the official documentation?

Often yes for a test environment, if your engineers are comfortable with Docker Compose and Linux. The official self-hosting documentation covers the components, the configuration and the upgrade path. What the documentation cannot decide for you is the trade-off between a convenient single host and the production requirements in your own policies, such as encryption, network segmentation, access control and recovery objectives. Those choices need an owner. A partner is most useful when the environment is regulated, when the team lacks time, or when the deployment must be reviewed by security or compliance staff before it holds real data.

Which secrets must we change before using a Compose deployment?

Replace every default credential and generated key before the instance stores real traces. The list includes the database passwords for PostgreSQL and ClickHouse, the application encryption and session secrets, the credentials for the blob storage bucket and any Redis or Valkey password. Store these in a secrets manager or a restricted file with tight permissions, not in a shared compose file committed to a repository. Record who can read them and how they rotate. Confirm the exact variable names against the self-hosting configuration for your release, because they change between versions.

When should a Langfuse deployment move from one VM to Kubernetes?

Move when the single host can no longer meet your availability, capacity or recovery requirements. Typical signals include a requirement for high availability that a single VM cannot provide, ingestion that needs more than one worker or a split of langfuse-web into separate ingestion and user interface deployments, ClickHouse outgrowing the memory and disk of one machine, or a recovery objective that needs tested failover. Langfuse documents Kubernetes with Helm or Terraform for production, so a move is a planned migration rather than a rebuild. Scaling guidance recommends adding workers based on CPU load, which is a useful metric to watch before the change.

What happens to our data if we later need to upgrade or migrate?

Updates within a major version are documented as non-disruptive, and database migrations run automatically at startup. Major upgrades, such as v3 to v4, change infrastructure requirements and the data model, so they follow dedicated migration guides. The v4 guide requires ClickHouse 25.12 or later, PostgreSQL 15 or later and Redis 7.0 or later, and advises planning about 3x ClickHouse disk headroom when backfilling history. Take a verified backup before any upgrade, and confirm that your VM has the disk and memory for those steps. Ask any partner to include the upgrade and rollback plan in the written scope.

Signs it is time to move from Docker Compose to Kubernetes

The clearest sign that a single VM has outgrown its role is that Langfuse has become a production service with availability targets. Docker Compose on one host, which Langfuse documents for testing without high availability, has no failover for the Langfuse Web and Langfuse Worker containers, and no redundancy for PostgreSQL, Redis or Valkey, or ClickHouse on that machine. Once teams depend on traces for incident response or on prompts served through the API, decide early whether a single host still meets the outage tolerance you have written down. Other signals follow from load: sustained CPU pressure on the worker container suggests scaling workers, and the Langfuse scaling guide describes splitting langfuse-web into separate ingestion and user interface deployments under heavy ingestion. Compose can run more replicas, but it does not give you the scheduling and rollout controls that split deployments need.

Data store ownership is the next signal. If you want managed PostgreSQL, a managed Redis or Valkey service, or externally operated ClickHouse and object storage, you will be building around network paths and credentials that Compose was never designed to manage well. Upgrade discipline is the third. Langfuse applies database migrations automatically at startup within a major version, but major upgrades follow dedicated guides, and the v3 to v4 guide requires ClickHouse 25.12 or later, PostgreSQL 15 or later and Redis 7.0 or later. If your Helm users run bundled data stores, the Helm chart must move from v1 to v2 before Langfuse moves to v4. Confirm which path applies to your deployment before you pick a platform, because it changes the amount of work the move involves.

Planning the move early reduces risk because migration reuses the same PostgreSQL, ClickHouse, Redis or Valkey and blob storage data, and the same secrets such as ENCRYPTION_KEY, NEXTAUTH_SECRET and SALT. Keep those values in your secret store with a record of which instance uses them, and test a restore of the data stores into a staging cluster before cutover. Decide whether the Kubernetes target is the official Helm chart or infrastructure as code, and confirm which data stores stay external. Most of the effort sits in network access, secret injection and verification of the restored data, not in the Langfuse containers themselves.

How DeployOpen scopes and delivers a single-VM or production Langfuse deployment

DeployOpen works from a written, fixed scope agreed before any build starts, so the decision between a single VM and a production layout is made on paper before hosts are provisioned. The cards below cover the parts of that scope that most often decide whether a Langfuse instance is safe to rely on after handover.

Written scope before any build

The engagement starts with a written scope that names the target (one VM for testing or a production layout), the components in your infrastructure, the users and identity sources, and the acceptance checks. Scope also states what is out of scope, such as ClickHouse sizing beyond the single host or a move to Kubernetes later. Ask for this document to list every component by name, including PostgreSQL, Redis or Valkey, ClickHouse and blob storage, so you can see what your team will run after handover.

Langfuse self-hosting docs

Host and secrets hardening

Before Langfuse starts, the host is configured with restricted network exposure, a reverse proxy with TLS in front of Langfuse Web, and secrets moved out of the Compose file defaults. Every credential the stack uses, including database passwords, encryption keys and the NextAuth secret, is replaced with values generated for your environment and stored in your secrets manager. Confirm with DeployOpen which keys are rotated, who holds them and how they are recovered.

Backup and restore verification

A backup is only useful if a restore has been tested. The work covers scheduled backups of PostgreSQL, ClickHouse data and blob storage, with a documented restore into a separate host and a check that traces and prompts are readable afterward. Agree in the scope how long backups are kept and who runs the restore drill, because a single VM has no built-in failover and the restore path is the recovery plan.

SSO and transactional email setup

Where your organization requires it, the scope includes connecting Langfuse to your identity provider through its Auth.js-based SSO options, with decisions on whether password sign-in is disabled and whether SSO is enforced for specific email domains. Email for invitations and password resets is configured in the same pass. Confirm the identity provider, redirect URLs and the sender address with your administrators before the work begins.

Authentication and SSO docs

Handover and retainer options

Handover includes a runbook covering startup, upgrades, backup schedules, restore steps, the secrets inventory and the signals that indicate the VM should move to a larger or Kubernetes layout. Ongoing upgrades, support and testing can be covered by an optional retainer defined in writing. Ask for the handover document format and the support hours and response terms as part of the quote, since these are set per engagement and are not published as a price list.

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.