Self-hosted Langfuse for GDPR storage limitation and erasure

Self-hosted Langfuse can delete traces, sessions and projects and, with an Enterprise license, enforce retention. It does not decide your lawful basis, retention periods or backup handling, which remain your obligations.

On this page

Self-hosted Langfuse for GDPR storage limitation and erasure: what it helps with

A controller whose LLM traces contain personal data must limit how long those traces are kept (Article 5(1)(e)), build that limit in by default (Article 25(2)) and erase data when a valid request arrives (Article 17(1)). Self-hosted Langfuse helps with the first and third of these through trace, session, project and user deletion and, on Enterprise licenses, data retention policies that delete data older than a configured number of days each night. It supports the by-default duty only partly: the platform stores traces indefinitely unless a retention policy is set, so the controller must decide the period per purpose and configure it. Langfuse does not decide what is necessary for a purpose, does not decide lawful basis, and does not reach personal data held outside Langfuse, such as copies in application logs, exports or backups you take yourself.

The GDPR requires no certificate, audit report or attestation, and certification under Article 42 is voluntary and does not reduce the controller's responsibility. DeployOpen therefore does not certify a deployment as GDPR compliant. What it can prepare is the configuration and the evidence: retention settings, documented deletion procedures, test records showing that a deleted trace and its scores and observations are gone, and a record of what was excluded from deletion. Ask whether your retention period, deletion method and backup handling have been reviewed by your data protection officer or counsel before the platform goes live, because those decisions belong to you.

Two points need confirmation in your own environment before you rely on deletion. First, confirm which Langfuse version and license tier you run, since the session-level API deletion is documented for Langfuse v4 or later when self-hosted, and retention policies require an Enterprise license key. Second, confirm how long deleted data remains in ClickHouse, PostgreSQL and blob storage backups, because the EDPB's 2025 coordinated enforcement action on erasure, announced 18 February 2026, flagged deletion of personal data in backups as a recurring problem. Langfuse data deletion documentation sets out what each deletion path removes.

Mapping GDPR erasure and storage requirements to Langfuse features

This table maps each GDPR storage limitation and erasure requirement to the Langfuse deletion or retention feature that addresses it, along with the configuration each one needs. Read it as a checklist: a row is only covered once the named feature is configured, licensed and tested in your own instance. Retention policies need an Enterprise license key, and session deletion through the API needs Langfuse v4 or later when self-hosted.

Requirement or featureWhat it coversConfiguration and licensing to confirm
Article 5(1)(e), storage limitationPersonal data kept no longer than necessary for the processing purposeSet a retention policy in days per project. Retention policies require an Enterprise license key. Without one, traces, observations, scores and media are kept indefinitely.
Article 25(2), storage period by defaultOnly the data needed for each purpose is stored, including for how longDocument a default retention period per project and apply it before tracing starts. Confirm with your DPO what period each use case justifies.
Article 17(1), data no longer necessaryErasure when the purpose has endedDelete a single trace, a batch of traces or all traces in a session through the API. Session deletion through the API needs Langfuse v4 or later when self-hosted.
Article 17(1), consent withdrawn or successful objectionErasure of traces tied to one data subjectFilter traces by user or metadata and delete the matching set. Confirm that your tagging captures the user identifier at ingestion.
Article 17(1), unlawful processing or legal obligationErasure of a whole dataset or projectDelete by project or, for user accounts, by user. Confirm the effect on related observations, scores and media, since trace deletion runs asynchronously.
Article 17 handling, backups and exportsCopies of erased data held in backups or downstream exportsDefine backup retention for PostgreSQL, ClickHouse and blob storage so deleted data ages out. Confirm how long backups hold erased records with your backup configuration.
Masking at ingestion (Article 25 by design)Personal data not stored in the clear in the first placeServer-side data masking requires an Enterprise license key. Alternatively, mask in the application before the OpenTelemetry or SDK call. Test with sample traces.

Evidence to keep for a supervisory authority or auditor

A supervisory authority will ask how you decided how long traces are kept and how you erased them when asked. The records below are produced by your own processes and configuration, so they need to be captured as they happen. None of them is an audit report or certification.

Retention policy settings and history

Record the retention period configured for each project, the date it was set, and who approved it, tied to the purpose that justifies the period. Under Article 5(1)(e), storage must not exceed what is necessary for that purpose. Keep a dated copy of each change, because a supervisor may ask what the setting was on a given date. Note that retention policies are an Enterprise Edition feature, so confirm the license status for the period you are evidencing.

Langfuse retention docs

Deletion requests and API responses

For each erasure request, keep the request, the scope you deleted (single trace, batch, session, filter, project or user), the API call and its response, and the completion time. Trace deletion runs asynchronously, so record when you confirmed removal, not only when you sent the call. Article 17(1) requires erasure without undue delay, and this log is how you show the timeline.

Langfuse deletion docs

Audit log entries

Export audit log entries covering who changed retention settings, ran deletions, changed project roles or altered masking. Audit logs are also listed among the Enterprise license features, so confirm that your deployment has them before you rely on them. Store exports outside the instance so that they survive a rebuild or a database restore.

Masking configuration and change record

Keep the server-side masking rules in force, the version of each rule, and the dates they were deployed. Pair this with a sample of test traces showing that personal data was masked before storage. Masking is also an Enterprise feature, so the record should show which license governed each period.

Backup retention settings

Record how long backups of PostgreSQL, ClickHouse and blob storage are kept and how often they are taken. Erasure duties extend to backups, and the EDPB's 2025 coordinated enforcement action identified deletion of personal data in backups as a recurring challenge. Document how an erased trace is handled when it exists in a backup and when that backup expires.

EDPB erasure challenges

Choosing between retention policies, scheduled cleanup and on-demand deletion

A retention policy is the right tool for steady-state storage limitation. It is an Enterprise license feature that deletes data older than a configured number of days each night, so personal data in routine traces ages out without anyone working a ticket. Without a policy, self-hosted Langfuse keeps traces, observations, scores and media indefinitely, so the policy is the control that turns a retention period from a document into behavior. The period itself is a legal and business decision you must document, and it should be set per purpose rather than once for the whole instance.

  • Coverage: the policy applies to the data types the feature covers, so confirm which objects it reaches before relying on it for media or scores.
  • Timing: deletion runs nightly, so data is removed on the next run after it crosses the threshold, not at the exact moment.
  • Blind spots: it does not act on individual requests, so an erasure request received today still needs an on-demand deletion.
  • Backups: deleted rows do not leave existing backups on their own, so check how your backup retention interacts with the policy.
  • Licensing: the feature needs an Enterprise license key, which is a cost to include in any quote.

Before enabling a policy, confirm with your DPO which retention period applies to each use case and how the Enterprise license is provisioned in your environment.

Configuring Langfuse for storage limitation and erasure

This sequence turns storage limitation and erasure duties into configured settings in your self-hosted Langfuse, so retention, deletion and masking can be shown to a reviewer with evidence rather than described from memory.

  1. Define retention periods for each processing purpose

    Your privacy or legal team, with the product owner of each LLM feature, records why each trace dataset exists, which personal data it can contain and how long it is needed for that purpose. Article 5(1)(e) ties storage to what is necessary, so the output is a short retention register that names each project or feature, its purpose, its data categories and its agreed period. Done when every project that receives traces has a recorded owner and an approved period, and no project is left on an open-ended default.

  2. Decide whether an Enterprise license key is needed

    The platform owner checks the retention register against the feature list in the Langfuse license key documentation. Data retention policies, server-side data masking and audit logs need an Enterprise license key on self-hosted deployments, while the core trace, session and deletion APIs are part of the MIT-licensed version. If automated nightly deletion or masking at ingestion is required, the decision and the quote request for the license go into the project record. Done when the license decision is written down with the features it covers.

  3. Configure retention policies per project

    The platform engineer sets a retention policy for each project in the Langfuse settings, using the periods from the register. Without a policy, self-hosted Langfuse keeps traces, observations, scores and media indefinitely, so this step removes the default that most often conflicts with storage limitation. Run a test project with known dummy traces, confirm the older records are removed by the nightly job, and keep the test output as evidence. Done when each production project has a policy that matches the register and the test run is documented.

  4. Enable masking at ingestion for data you should not store

    Where a prompt or output field is not needed for the purpose, the engineering team applies server-side masking so personal data is removed before it is written to storage, following Article 25(2) on data protection by default. Choose which fields and patterns to mask with the application owner, then send sample traces that contain test identifiers through the staging instance and inspect the stored records. Masking is a control you verify, not a guarantee, so the check should cover every trace source, including OpenTelemetry senders. Done when the test records show the masked fields absent and the results are filed with the retention register.

  5. Build the erasure request procedure

    The privacy team and platform owner write a runbook for data subject requests that identifies affected traces. The runbook uses the Langfuse trace, session, filter and project deletion methods, and it records which identifiers the team searches on, who approves each deletion and how the result is checked. Trace deletion runs asynchronously and removes related observations and scores, so the runbook should include a follow-up query after completion. Done when the runbook has been walked through with a sample request in staging and the log template captures the request, scope, actions and confirmation.

  6. Test erasure against a sample request

    The operations team runs a rehearsal in a non-production instance using seeded traces that include a known identifier, then carries out the procedure from the runbook exactly as written. They confirm that the target traces, sessions and related scores no longer appear in the UI or API, and they note any copies held elsewhere, such as exports, logs or downstream analytics. Confirm with your Langfuse version which deletion scopes your release supports, since session-level deletion through the API depends on the Langfuse v4 or later release. Done when the rehearsal result, including any gaps found, is signed off by the privacy lead.

  7. Document the backup retention approach

    The platform team writes down how PostgreSQL, ClickHouse and blob storage backups are retained, how long copies persist and how deleted personal data is handled in them. The EDPB's 2025 coordinated enforcement action on erasure identified the deletion of personal data in backups as a recurring challenge, so the document should state the rule your organization applies, such as restore procedures that re-apply pending deletions, and the controls that limit who can restore. Confirm the backup schedule and restore tests with your infrastructure team and your legal advisers. Done when the backup section is linked from the retention register and approved by the data protection contact.

  8. Review the configuration on a fixed cycle

    The data protection contact and platform owner check the retention register, policy settings, masking rules and runbook after each Langfuse upgrade and whenever a new project or data source is added. Upgrades can change deletion or retention behavior, so a major version change should trigger a repeat of the policy and erasure tests. Keep the test output and the signed register together so they can be produced for an internal audit or a supervisory authority request. Done when the review record names the reviewer, the date, the version tested and any changes made.

What Langfuse does not cover for GDPR erasure

Langfuse can delete traces, sessions and projects and can apply retention, but it does not decide how long your data may live or erase copies it never held. The cards below mark the gaps that remain with your legal, platform and engineering teams, so each one has an owner before go-live.

Lawful basis and retention periods

Langfuse does not set retention periods. Article 5(1)(e) and Article 25(2) put the duty on the controller to justify how long personal data in traces is kept, and to set that period by purpose. Record the basis and the period per use case, then configure retention to match. Confirm that the period you pick is written into your processing records and reviewed when prompts or use cases change.

Article 5 text

Backups and replicas

Deleting a trace in Langfuse does not reach your PostgreSQL backups, ClickHouse replicas, object storage snapshots or disaster recovery copies. The EDPB's 2025 coordinated enforcement action identified deletion of personal data in backups as a recurring challenge. Write a separate procedure that states how erased data is removed from or excluded on restore, and test a restore to confirm erased records do not return.

EDPB erasure challenges

Data outside Langfuse

Traces that your application sends to other systems, such as log pipelines, APM tools, data warehouses, or prompt caches in your own code, stay there after Langfuse deletes its copy. SDK-side logs and exception reporting can also capture prompts and outputs. Map every destination that receives the same payload, and apply erasure or retention rules to each one.

Article 17 exceptions

Article 17(3) allows a controller to refuse erasure in certain cases, such as a legal obligation to keep data or defence of legal claims. Whether a given exception applies to traces containing personal data is a legal judgment, not a platform setting. Ask counsel or your data protection officer to review each exception before you rely on it, and record the outcome against the erasure request.

Asynchronous deletion timing

Trace deletion runs asynchronously in the background, so a deleted trace may remain visible or in the database for a short period after the request. Your response to a data subject must account for that window, and you should confirm how long your instance takes to complete deletion under your load. Keep the request ID or timestamp so you can show when the deletion was requested and completed.

Session deletion API
v4 or later

Enterprise features to confirm

Data retention policies and server-side data masking are listed as Enterprise license key features for self-hosted Langfuse, not as core open source features. Do not plan a compliance control around them until the current license key documentation confirms them for your version and plan. Ask your Langfuse account contact to confirm in writing which features your license includes.

Langfuse license key docs

Where the data sits and why transfers still matter

Self-hosting keeps the trace store in your own infrastructure, but it does not remove Chapter V of the GDPR from the picture. A transfer under the GDPR is not limited to sending a database to another country. The EDPB's Guidelines 05/2021 (version 2.0) state that remote access from a third country, even only displaying data on a screen for support or administration, is a transfer, and so is storage in a cloud outside the EEA. For a self-hosted Langfuse, the practical question is therefore not where the software runs but who can reach the PostgreSQL, ClickHouse and S3-compatible blob stores from outside the EEA, and under which circumstances. Map every account, support session, vendor console and backup copy that touches those stores, and record the location of each one before the first trace containing personal data is ingested.

The Court of Justice's judgment in Case C-311/18 (Schrems II) invalidated the Privacy Shield adequacy decision while holding that standard contractual clauses remained valid, provided the transfer tool is supported by an assessment of the destination. Commission Implementing Decision (EU) 2023/1795 covers only US organizations on the Data Privacy Framework List, and its validity is under appeal as Case C-703/25 P, so do not treat it as settled. Where a cloud provider must access data in the clear and the destination's public authority powers go beyond what is necessary and proportionate, the EDPB's Recommendations 01/2020 say no effective technical supplementary measure can be envisioned. Confirm with each engaged provider where support staff sit and where backups are stored.

The US CLOUD Act provision at 18 U.S.C. 2713 and Article 48 of the GDPR matter when you assess the providers you engage, such as a hosting company, a managed database operator or a support partner, not because the Langfuse software itself makes disclosures. Article 48 allows a third-country disclosure order to be recognized only where it rests on an international agreement in force with the Union or a Member State. Ask each provider how it would respond to such a request, whether it can notify you, and what contractual commitments it accepts. Record the answers as part of your transfer assessment, since the erasure work described below only holds if the copies you cannot reach are also in scope.

Questions buyers ask about GDPR erasure with self-hosted Langfuse

Do we need an Enterprise license to set retention for GDPR storage limitation?

Yes, if you want Langfuse to delete data automatically. Without a retention policy, self-hosted Langfuse stores traces, observations, scores and media indefinitely. Data retention policies are an Enterprise Edition feature that needs a license key, and they delete data older than a configured number of days each night. Trace, session, project and user deletion through the API and interface are part of the core open source feature set, so you can still erase specific personal data on request without the Enterprise license. Confirm the current feature split on the license key page before you commit to a design, because the list of gated features can change between releases.

How much effort does GDPR-ready retention and erasure configuration take?

The effort depends on how many places personal data can enter your traces and how many purposes you need to separate. The main drivers are the number of applications and SDK integrations sending traces, whether you need masking at ingestion, how many retention periods you must justify for different data sets, and how deletion requests will reach the system. Each retention period needs a documented reason and a project boundary that matches it. Ask any provider for a fixed-scope estimate that lists each application, each data category and each deletion path, rather than a single headline figure.

Can an internal team set up retention and erasure without a partner?

Often yes, if the team already runs Kubernetes or VM infrastructure, understands PostgreSQL, ClickHouse and object storage, and has a privacy lead who can make retention decisions. The harder parts are rarely the configuration screens. They are the data map, the legal basis for each retention period, the handling of backups and the evidence that deletion really happened. Internal teams often underestimate the work of testing deletion across all stores. A partner can take on the build and testing, while your legal and privacy staff keep the decisions.

What do we need to provide before erasure and retention work can start?

You need a data map that shows which applications send traces, which fields can contain personal data, where those traces are stored and who can read them. You also need written retention decisions for each data category, with the purpose and period for each, plus a process for handling erasure requests. Your legal or privacy team should review the decisions, especially where traces contain special category data or where data may be transferred outside the EEA. Provide access to your infrastructure, a test environment and sample traces that reflect real request shapes, so testing covers the data you actually handle.

How long does erasure take when Langfuse deletes data asynchronously?

Trace deletion runs asynchronously, so a deletion request is accepted before the underlying data is gone. The time until removal depends on queue load, the size of the deletion and the capacity of your worker and ClickHouse deployment. Your process should record when a request was made, when deletion was triggered and when you verified removal, and it should allow for that window in your response to the data subject. Test the lag in your own environment under realistic load, and confirm the expected behavior with the Langfuse documentation for your version.

Can DeployOpen certify that our Langfuse deployment is GDPR compliant?

No. DeployOpen does not issue audit reports, attestations or certifications. The GDPR does not require an audit or certificate, and Article 42 certification is voluntary and issued by accredited bodies or supervisory authorities. It also does not reduce your responsibility for compliance. DeployOpen can configure retention, test deletion, prepare the evidence your compliance and legal teams need and document the controls. Your legal counsel, data protection officer or an independent assessor makes the compliance determination.

How DeployOpen configures and documents Langfuse retention and erasure

DeployOpen treats storage limitation and erasure as design decisions made before the first trace is ingested. We scope retention periods, deletion paths and masking rules against your processing purposes, then build, test and document them inside infrastructure you control.

How we scope

  • Map which trace fields, sessions and projects may carry personal data, and which processing purposes they serve.
  • Agree retention periods per project in writing, with the reasons each period is needed and who approves it.
  • Define the erasure requests in scope, such as single traces, sessions, users or whole projects, and who triggers them.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • Deploy self-hosted Langfuse with PostgreSQL, ClickHouse, Redis or Valkey and blob storage in your own environment.
  • Configure retention policies and confirm they run nightly, using a test project with known data before production use.
  • Set up masking at ingestion for identified fields, then test that known personal data never reaches stored traces.
  • Check that deletion removes linked observations and scores, and document how deletion reaches backups and blob storage.

How we hand over

  • Deliver a retention schedule, erasure runbook and masking rule set that your privacy and security teams can review.
  • Document which features need an Enterprise license key, such as retention policies and server-side masking, so the decision is recorded.
  • Record test evidence for deletion and masking so your compliance team can show how the controls were checked.
  • Walk your operators through erasure requests and backup restore behavior so the runbook is used as written.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Plan retention and erasure checks again during major Langfuse upgrades, since those change data models and infrastructure.
  • Confirm with your legal and privacy advisers how GDPR applies to your processing, since DeployOpen does not issue compliance attestations.

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.