llm-integration.eu

Langfuse for Claude: Self-Hosted in the EU

Self-host Langfuse in the EU and trace Claude on Bedrock and Vertex: Docker Compose vs Helm, Cloud EU pricing, OpenTelemetry code and GDPR rules for prompt traces.

Updated 11 min readFacts verified on 1 October 2026

TL;DR

Langfuse is an open-source tracing, evaluation and prompt management platform. For Claude in the EU, either self-host it (MIT licence, Postgres plus ClickHouse plus Redis plus S3) or use Langfuse Cloud EU in Ireland. Instrument AnthropicBedrock or AnthropicVertex with OpenTelemetry. Traces contain prompts, so treat them as personal data from day one.

What does Langfuse do for a Claude application?

Langfuse records every Claude call as a trace: prompt, completion, latency, tokens and cost, nested inside the application step that made it. On top of that it adds prompt versioning, evaluations and datasets. For an EU team the useful part is that the whole platform can run inside your own network.

The Langfuse docs list six product areas: observability, prompt management, evaluation (LLM-as-a-judge, code evaluators, user feedback, manual labelling), datasets, metrics dashboards for quality, cost and latency, and a playground. All of this sits in the open-source edition. The self-hosted pricing page says the free edition includes all core platform features and APIs with unlimited usage, under the MIT licence.

Ownership changed this year. On 16 January 2026 Langfuse announced it had joined ClickHouse, stating there are no planned changes to licensing and that Langfuse Cloud keeps the same endpoints and contracts. The LICENSE now reads copyright 2023-2026 ClickHouse, Inc. Everything outside ee/, web/src/ee/ and worker/src/ee/ is MIT. The code in those folders needs a commercial key.

That split matters for compliance. The licence key page puts data retention policies, audit logs, server-side data masking and project-level RBAC in the Enterprise Edition. We come back to what that means for GDPR below. If you route Claude through a gateway first, our LiteLLM EU gateway guide shows the proxy that can feed Langfuse with one callback.

How do you self-host Langfuse in the EU?

Self-hosted Langfuse is six components: a web container, a worker container, Postgres, ClickHouse, Redis or Valkey, and S3-compatible blob storage. Docker Compose starts all of them on one VM in minutes. Langfuse itself says that setup has no high availability, scaling or backups, so production belongs on Kubernetes with Helm or on managed data stores.

The architecture overview defines what each component holds:

Component What it stores or does Compose default
Langfuse Web UI and APIs langfuse/langfuse:4, port 3000
Langfuse Worker Processes events asynchronously langfuse/langfuse-worker:4
Postgres Transactional data: users, organisations, projects, API keys Postgres 17
ClickHouse Traces, observations, scores ClickHouse 25.12
Redis / Valkey Queue and cache Redis 7
S3 / blob storage All incoming events, multi-modal inputs, large exports MinIO

The prompts you care about end up in two places: ClickHouse and the blob store. Both need to sit in the EU region you chose, and both need backups.

For a first instance, the Docker Compose guide recommends at least 4 cores and 16 GiB of memory, for example a t3.xlarge, and around 100 GiB of storage:

  1. Clone the repo: git clone https://github.com/langfuse/langfuse.git && cd langfuse.
  2. Replace every value marked # CHANGEME in docker-compose.yml. Generate ENCRYPTION_KEY with openssl rand -hex 32. Defaults such as postgres:postgres and miniosecret are placeholders, not passwords.
  3. Run docker compose up.
  4. Open http://localhost:3000, create an organisation and a project, and copy the public and secret key from the project settings.
  5. Before exposing the VM, check ports. In the compose file the web UI (3000) and MinIO (9090) listen on all interfaces. Postgres, ClickHouse and Redis are bound to 127.0.0.1.

For production, the Helm chart installs with helm repo add langfuse https://langfuse.github.io/langfuse-k8s and helm install langfuse langfuse/langfuse -n langfuse. It needs Kubernetes 1.28 or newer, cert-manager and the ClickHouse operator. It bundles Postgres, ClickHouse, Valkey and SeaweedFS. Langfuse recommends replacing SeaweedFS with S3, Google Cloud Storage or Azure Blob Storage in production. We would go further and use a managed Postgres as well, which is what the backup guide recommends.

How do you trace Claude on Bedrock and Vertex?

Use the Langfuse Python SDK plus the OpenTelemetry Anthropic instrumentor. The instrumentor wraps messages.create in the Anthropic SDK, and both AnthropicBedrock and AnthropicVertex use that same Messages resource. One instrument() call therefore traces Claude on Bedrock, on Vertex and on the first-party API without touching the call sites.

The Langfuse Anthropic integration recommends opentelemetry-instrumentation-anthropic. Its source also wraps the Bedrock beta Messages client. The Langfuse SDK is built on OpenTelemetry, so the Claude span lands inside the @observe span of your own function. Point LANGFUSE_BASE_URL at your instance, or at https://cloud.langfuse.com for Langfuse Cloud EU.

# pip install -U "anthropic[bedrock,vertex]" langfuse opentelemetry-instrumentation-anthropic
# env: LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_BASE_URL=https://langfuse.internal.example.eu
from anthropic import AnthropicBedrock, AnthropicVertex
from langfuse import get_client, observe
from opentelemetry.instrumentation.anthropic import AnthropicInstrumentor

langfuse = get_client()
AnthropicInstrumentor().instrument()

bedrock = AnthropicBedrock(aws_region="eu-central-1")
vertex = AnthropicVertex(project_id="my-project", region="eu")

@observe()
def summarise(ticket: str, route: str = "bedrock") -> str:
    if route == "bedrock":
        msg = bedrock.messages.create(
            model="eu.anthropic.claude-sonnet-5",
            max_tokens=512,
            messages=[{"role": "user", "content": ticket}],
        )
    else:
        msg = vertex.messages.create(
            model="claude-sonnet-5",
            max_tokens=512,
            messages=[{"role": "user", "content": ticket}],
        )
    return msg.content[0].text

print(summarise("Customer asks why invoice 4711 was charged twice."))
langfuse.flush()  # short-lived scripts must flush before exit

Two model details keep the Claude call itself in Europe. On Bedrock, the Sonnet 5 model card says eu.anthropic.claude-sonnet-5 keeps data within EU regions, while global. routes worldwide. On Google Cloud, Anthropic documents region="eu" as the EU multi-region endpoint. Specific regional endpoints there serve Sonnet 4.6 and earlier only. Both EU options cost 10% more than global. Our Claude on Vertex AI Europe guide covers the Google side in detail.

If your apps already go through LiteLLM, you do not need the SDK in every service. The Langfuse LiteLLM page sets callbacks: ["langfuse_otel"] under litellm_settings, plus LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY and LANGFUSE_OTEL_HOST. Its example host is https://us.cloud.langfuse.com. Replace it with your own endpoint or https://cloud.langfuse.com, or your EU gateway will ship traces to Oregon.

Langfuse Cloud EU or self-hosted: what does it cost?

Self-hosted Langfuse costs nothing in licences and has no usage cap, but you pay for the VM or cluster and the people who run it. Langfuse Cloud EU starts free and charges per unit above the included volume. For most teams under a few million units a month, Cloud is cheaper in money. Self-hosting wins on control, not price.

A unit, per the pricing page, is any tracing data point: a trace, an observation (span, event, generation) or a score.

Plan Price per month Included units Data access Notes
Hobby 0 USD 50k 30 days 2 users, no extra units
Core 29 USD 100k 90 days unlimited users
Pro 199 USD 100k 3 years SOC 2 Type II and ISO 27001 reports
Enterprise 2,499 USD 100k 3 years adds HIPAA region option
Self-hosted OSS 0 USD unlimited until you delete MIT, community support
Self-hosted Enterprise custom unlimited your policy retention, audit logs, SLA

Units beyond the included volume cost 8 USD per 100k up to 1M, 7 USD up to 10M, 6.50 USD up to 50M and 6 USD above. A data processing agreement is available on every Cloud tier.

Our worked example, with our own assumptions: 20,000 Claude calls a day, each producing one trace and two observations, gives about 1.8M units a month. On Core that is 29 USD plus 72 USD for the units up to 1M plus 56 USD for the next 800k, about 157 USD a month. Token spend for the same traffic is far larger. Our Claude API pricing EU comparison has the numbers.

Where Cloud EU lives: Langfuse data regions place cloud.langfuse.com in Ireland on AWS eu-west-1. Regions are fully separated, and backup replicas stay inside the same jurisdiction. The subprocessor list, now hosted by ClickHouse, names AWS for hosting, AWS Bedrock for the in-product AI features, and several US support tools such as Salesforce, Pylon and Google Workspace. Read that list with your DPO before you send production prompts.

What does GDPR mean for prompt traces?

A trace stores the full prompt and the full answer. If a user types a name, a customer number or a complaint, the trace contains personal data in the sense of Article 4(1) GDPR. Whoever hosts Langfuse becomes a processor of that data. Plan masking, retention and deletion before the first production trace.

Four mechanisms, and their limits:

  1. Do not capture content. The OpenLLMetry Anthropic instrumentor logs prompts and completions by default. TRACELOOP_TRACE_CONTENT=false turns that off. For your own functions, @observe(capture_input=False, capture_output=False) or LANGFUSE_OBSERVE_DECORATOR_IO_CAPTURE_ENABLED does the same.
  2. Mask in the client. The masking docs describe mask for data set through Langfuse SDK APIs and the newer mask_otel_spans hook, which patches span attributes from third-party instrumentations before export. Masking in the client means the raw value never leaves your process. Server-side masking is an Enterprise feature.
  3. Retention. Data retention is set per project, minimum 3 days, and deletes old traces, observations, scores and media nightly. On Cloud it needs Pro or Enterprise. On self-hosted it needs the Enterprise Edition. Without it, self-hosted Langfuse keeps data indefinitely.
  4. Deletion on request. Set a userId on every trace. DELETE /api/public/traces removes traces with their observations and scores, usually within 15 minutes, without confirmation. Langfuse lists it for self-hosted v4 and later.

The uncomfortable consequence: OSS self-hosting gives you data location but not automatic retention. You either buy the Enterprise key, or you write and operate your own nightly deletion job against the API. We recommend the second option only when someone owns that job in writing. For the provider side of the same question, see our Claude GDPR comparison.

Run it yourself or outsource?

Running Langfuse yourself means running ClickHouse and Postgres in production, which is the real cost. The application containers are easy. Disk growth, upgrades across major versions, backups of two databases and a retention job are not. If nobody on your team has operated ClickHouse, a managed provider or Langfuse Cloud EU is the safer default.

The recurring tasks on a self-hosted instance:

Task Why it matters
Upgrades Minor versions migrate automatically on start. Major versions (v2 to v3, v3 to v4) have migration guides. With bundled stores, the Helm chart must go from v1 to v2 first.
Backups ClickHouse holds the traces: volume snapshots or native backups to S3. Postgres holds users and API keys: managed service or pg_dump.
Disk Traces accumulate. Compose has no alert. Size and monitor ClickHouse and blob storage.
Retention and deletion Enterprise key or your own deletion job. Someone must own it.
Secrets and access Rotate # CHANGEME values, restrict who can read traces, since traces are prompts.

Our own estimate, not a Langfuse figure: a single-VM pilot takes a few hours a month from one engineer. An HA setup on Kubernetes with managed Postgres and S3 needs a platform engineer who knows ClickHouse, plus a named backup owner. That is a real share of one role, not a side task.

Outsourcing makes sense when you have no Kubernetes or ClickHouse experience, when traces contain sensitive data and you need audited operations, or when the observability stack is not your product. It does not make sense when you already run ClickHouse or managed Postgres for other workloads, or when Langfuse Cloud EU’s subprocessor list already passes your DPO.

What to demand from a provider that runs Langfuse for you:

  • DPA under Article 28 GDPR. The provider processes prompts on your behalf. Article 28 requires a contract and your prior written authorisation before it engages any further processor.
  • Subprocessor list with locations, including where ClickHouse, the blob store and support tooling sit.
  • Access model. Who on their side can open a trace, how that access is logged, and whether audit logs (an Enterprise feature) are enabled.
  • SLA and upgrade window, including how they handle Langfuse major versions.
  • Retention and deletion configured per project, with evidence that the nightly job runs.
  • Exit. A documented export of ClickHouse and Postgres data and a deletion certificate at the end.

FAQ

Is Langfuse free to self-host?

Yes. The core platform is MIT licensed, with unlimited usage and all core features, including tracing, evaluations, prompt management and datasets. Data retention policies, audit logs, server-side masking and project-level RBAC need a paid Enterprise licence key. You still pay for infrastructure.

How much does Langfuse Cloud cost for a Claude app?

Core is 29 USD a month with 100k units included, then 8 USD per extra 100k up to 1M and 7 USD per 100k above that. In our example of 20,000 calls a day with three units each, that is roughly 157 USD a month.

Where is Langfuse Cloud EU hosted?

At cloud.langfuse.com in Ireland, on AWS eu-west-1. Langfuse states that regions are fully separated and that backup replicas stay in the same jurisdiction. The subprocessor list includes US support tools, which your DPO should review.

Langfuse Cloud EU vs self-hosted: which should we pick?

Pick Cloud EU when its DPA and subprocessor list are acceptable and you lack ClickHouse experience. Pick self-hosting when traces must stay in your own network, or when you already operate ClickHouse and Postgres. Self-hosted OSS has no automatic retention.

Does Langfuse trace AnthropicBedrock and AnthropicVertex clients?

Yes, through opentelemetry-instrumentation-anthropic. It wraps the Anthropic SDK’s messages.create, which both clients use. Call AnthropicInstrumentor().instrument() after get_client(), and call flush() before a short-lived script exits.

Can we keep prompts out of Langfuse entirely?

Yes. Set TRACELOOP_TRACE_CONTENT=false for the Anthropic instrumentor and disable input and output capture on @observe. You still get the trace tree and timings, without the text that makes traces personal data.

Sources

  1. Langfuse: Self-hosting overview (1 October 2026)
  2. Langfuse: Docker Compose deployment (1 October 2026)
  3. Langfuse: Kubernetes (Helm) deployment (1 October 2026)
  4. Langfuse: Upgrading self-hosted deployments (1 October 2026)
  5. Langfuse: Backups (1 October 2026)
  6. Langfuse: License key and Enterprise features (1 October 2026)
  7. Langfuse: Cloud pricing (1 October 2026)
  8. Langfuse: Self-hosted pricing (1 October 2026)
  9. Langfuse: Data regions (1 October 2026)
  10. Langfuse Cloud subprocessors (1 October 2026)
  11. Langfuse: Data retention (1 October 2026)
  12. Langfuse: Data deletion (1 October 2026)
  13. Langfuse: Masking (1 October 2026)
  14. Langfuse: Anthropic integration (1 October 2026)
  15. Langfuse: LiteLLM integration (1 October 2026)
  16. Langfuse: Joining ClickHouse (1 October 2026)
  17. langfuse/langfuse LICENSE (1 October 2026)
  18. OpenLLMetry: Anthropic instrumentation (1 October 2026)
  19. AWS: Claude Sonnet 5 model card (1 October 2026)
  20. Anthropic: Claude on Google Cloud (1 October 2026)
  21. Regulation (EU) 2016/679 (GDPR) (1 October 2026)

Related guides