Self-hosted Langfuse for HIPAA safeguards

Self-hosted Langfuse can keep ePHI from prompts and outputs inside your infrastructure, but HIPAA compliance rests on your own safeguards, policies and risk analysis. This page maps the Security Rule to Langfuse capabilities, configuration and evidence, and to the gaps you must close.

On this page

Which HIPAA Security Rule safeguards self-hosted Langfuse helps with

If your LLM traces may contain electronic protected health information (ePHI), self-hosted Langfuse can support some of the technical safeguards you need, mainly access control, audit logging, encryption and retention. It does not make your organization HIPAA compliant, and HIPAA has no certification that a product or platform can hold. Compliance is an obligation of the covered entity or business associate, assessed by the HHS Office for Civil Rights (OCR) through complaints, compliance reviews and audits.

The Security Rule applies to covered entities (health plans, health care clearinghouses and covered health care providers) and to their business associates, for all ePHI they create, receive, maintain or transmit (45 CFR 164.302). Appendix A to Subpart C lists 18 standards across administrative (164.308), physical (164.310) and technical (164.312) safeguards, with 36 implementation specifications: 14 required and 22 addressable. Sections 164.314 and 164.316 add organizational and documentation requirements. Most administrative requirements, including risk analysis, workforce training, sanctions, contingency planning and business associate contracts under 164.314, sit with your organization and your vendors, not with the software. The technical standards in 164.312 are where a self-hosted Langfuse deployment has the most direct effect.

Before you map controls, confirm which Langfuse features your organization needs and whether they require an Enterprise license key, since RBAC, data retention policies, audit logs and server-side masking are Enterprise features. Treat each addressable specification as a decision you must document: assess whether it is reasonable and appropriate for your environment, and if not, record the alternative measure (45 CFR 164.306(d)). Ask your compliance advisers to review the mapping, and consult NIST SP 800-66 Rev. 2, which gives key activities and sample questions for every standard.

Mapping Security Rule technical safeguards to Langfuse configuration

This table pairs each technical standard in 45 CFR 164.312 and its implementation specifications with the Langfuse setting that supports it, the license tier it needs and whether the specification is required or addressable. Use it as a starting point for your own risk analysis, since the Security Rule leaves the choice of measures to the covered entity. The main takeaway is that several safeguards depend on the Enterprise license key, and the administrative and organizational rows remain customer-owned whatever software you deploy.

Security Rule itemLangfuse configuration and evidenceLicense and requirement
Access control, unique user identification (164.312(a)(2)(i))SSO through your identity provider, with each person signing in under their own account. Confirm that shared or service accounts are avoided for clinical trace review.Required. SSO is in the open source version; enforcing SSO by email domain is documented for self-hosted deployments.
Access control, emergency access procedure (164.312(a)(2)(ii))Documented break-glass admin account and recovery steps for when the identity provider is down. Confirm how it is stored and logged in your environment.Required. Customer-owned procedure, not a Langfuse feature.
Access control, role-based permissionsProject-level RBAC roles limit which staff can view traces that contain ePHI.Enterprise license key required. Supports access control policy, not a separate HIPAA requirement.
Audit controls (164.312(b))Audit logs record administrative actions in the instance. Confirm which user and data-access events are captured and export them to your log platform.Enterprise license key required. Trace-level access logging should be verified in your environment.
Integrity (164.312(c)(1))Database and ClickHouse storage with backups and tested restores. Trace data is not edited after ingestion through the standard API, so review change paths in your configuration.Customer-owned controls with Langfuse storage. Confirm backup integrity checks.
Person or entity authentication (164.312(d))SSO with a supported identity provider, multi-factor authentication enforced at the provider, and disabled password sign-in.Required. Password sign-in can be disabled in SSO settings.
Transmission security, integrity controls and encryption (164.312(e)(1), (e)(2)(i) and (e)(2)(ii))Langfuse does not terminate HTTPS itself. Use TLS at the load balancer or end to end, and set up encrypted connections between services in your network.Addressable. Document the reasoning if an alternative is chosen.
Encryption at rest and stored credentialsStored LLM API and integration credentials are encrypted with ENCRYPTION_KEY. Store this key in a secrets manager, and plan for storage-level encryption of PostgreSQL, ClickHouse and blob storage.Addressable for encryption specification. Key handling is customer-owned.
Automatic logoff (164.312(a)(2)(iii))Session timeout set at the identity provider and in Langfuse session settings where available. Confirm the timeout value against your policy.Addressable. Document the chosen timeout and rationale.

What evidence a self-hosted Langfuse instance produces for auditors

An OCR investigation or covered entity review asks you to show how the Security Rule safeguards operate, not just that they exist. A self-hosted Langfuse instance can generate much of that proof, but only if you collect it on a schedule and keep it with your risk analysis and policies.

SSO configuration records

Keep a dated record of the identity provider settings, the enforced SSO domains and whether password sign-in is disabled. Auditors use this to test unique user identification under 164.312 and whether individuals authenticate through your directory rather than shared or local accounts. Export the configuration after every change and store it with the change ticket. Confirm which SSO settings are available on your license tier before you promise them in a policy.

Authentication docs

Role assignments and access reviews

Record who holds which project role, when each grant was made and who approved it. Project-level RBAC roles require an Enterprise license key, so confirm that before relying on them. Run periodic reviews that compare Langfuse accounts against your workforce list and remove leavers. These reviews show that access follows the minimum necessary standard and that terminations are carried out.

Audit log exports

Audit logs are an Enterprise feature. Export them on a fixed schedule to storage you control, so they survive instance rebuilds and cannot be edited by the people whose actions they record. Auditors will test whether you can reconstruct who viewed or changed traces that contain ePHI. Check the export format and retention period with your vendor before you design your review process.

Masking configuration and test results

Document where masking happens: in the client-side SDK, at server-side ingestion or both. Server-side ingestion masking is an Enterprise feature. Keep the masking rules under change control and keep sample test traces that show identifiers such as names and record numbers were removed before storage. This is your evidence for limiting ePHI in logs and for the risk analysis entry on that data flow.

Masking docs

Retention settings and deletion records

Capture the retention policy in force at each date, including any change made to it. Data retention policies are an Enterprise feature. Keep records of deletion runs and the scope of each deletion. Retention settings tie directly to your documented retention period for ePHI and show how long traces with health data were kept.

Backup and restore test records

Store backup job logs and the results of restore tests for PostgreSQL, ClickHouse and blob storage. A backup that has never been restored does not demonstrate contingency planning under 164.308. Record the date, the restored environment, what was checked and who signed off. Note that Langfuse depends on these three stores plus Redis or Valkey, so each one needs its own evidence.

Risk analysis and documentation under 164.316

The platform cannot perform your risk analysis for you. Keep a documented analysis that covers the Langfuse data flows, the ePHI they may contain, threats and current safeguards, along with the policies, procedures and retention of those documents required by 164.316. Addressable specifications need a written decision and any equivalent alternative. NIST SP 800-66 Rev. 2 offers sample questions you can use to structure this file.

Where ePHI flows in a self-hosted Langfuse deployment

Any store that receives a trace payload can hold ePHI, so the first HIPAA task is to map the request path and treat every store on it as in scope. An application sends traces either through the Langfuse SDKs or over OpenTelemetry to the /api/public/otel endpoint. The request enters through your load balancer, where TLS is terminated, and reaches Langfuse Web, which serves the UI and APIs. Langfuse Worker then processes ingested events asynchronously. From there, data lands in PostgreSQL for transactional records such as projects, users and prompt metadata, in ClickHouse for trace and observation data, in Redis or Valkey as queue and cache infrastructure, and in S3-compatible blob storage for raw event payloads. Confirm with your deployment team which of these stores receive the full prompt and output text in your configuration, because that determines where ePHI sits at rest.

Because prompts and outputs are free text, assume that ePHI can appear in ClickHouse, blob storage, and the queue, not only in the trace table your analysts open. Redis or Valkey is the store most often overlooked. It is usually treated as a cache, but it can briefly hold event payloads while the worker is busy. Backups of PostgreSQL, ClickHouse and blob storage also copy ePHI, and so do the logs your containers write when debug output is enabled. Each of these needs the same access control, encryption and retention treatment as the primary data, and each needs a named owner in your risk analysis under 45 CFR 164.308.

The trust boundary sits around the entire set of stores and containers, not around the Langfuse application alone. Put Web, Worker, PostgreSQL, ClickHouse, Redis or Valkey and the bucket inside one network segment that only the application tier and named administrators can reach, and treat any path that leaves that segment, including SDK traffic from outside your network, as a boundary crossing to document. Decide before go-live where masking happens, since data that is redacted at ingestion never reaches any of these stores, and confirm the encryption and access settings of each managed service you choose for them.

Trust boundaries for ePHI in self-hosted Langfuse

The diagram starts in the clinical application, where SDK masking can remove identifiers before a trace leaves the application. Requests then reach the load balancer, which terminates TLS, because Langfuse does not handle HTTPS itself. Langfuse Web places work on the Redis or Valkey queue, and Langfuse Worker writes trace data to ClickHouse, metadata to PostgreSQL and media to blob storage. Sign-in goes to your SSO provider, and admin users reach the console through the same entry point. Check that every store, the queue and each network hop between them stay inside your boundary.

Trust boundary around the clinical app, Langfuse components, data stores and identity.

Configuring Langfuse for HIPAA-aligned operation

This sequence takes a self-hosted Langfuse from deployment inside the covered environment to a documented configuration that controls who can see ePHI in traces, how long it is kept and how it is protected. Each step produces evidence your compliance and security teams can review. Several controls depend on an Enterprise license key, so confirm licensing before you commit to the design.

  1. Deploy inside the covered environment

    Your infrastructure team deploys Langfuse Web, Langfuse Worker, PostgreSQL, ClickHouse, Redis or Valkey and S3-compatible blob storage in the cloud account, data center or network that already falls under your HIPAA risk analysis. Confirm that no component, backup or log sink sends trace data to a location outside that boundary. Done when your network diagram shows every data store and the systems that reach them, and each one is covered by your existing safeguards. Langfuse documents Docker Compose on a single VM for testing only, so production designs should follow its Kubernetes guidance.

  2. Terminate TLS for all client traffic

    Your platform team places a load balancer or ingress in front of Langfuse Web and enforces HTTPS for the UI, the API and the OTLP ingestion path at /api/public/otel. Langfuse does not handle HTTPS itself, so the TLS configuration, certificate management and cipher policy belong to your infrastructure. Confirm internal hops to the databases and blob storage are also encrypted where your design requires it. Done when a scan from inside your network shows plaintext HTTP is refused and every application endpoint presents a valid certificate.

  3. Set and protect the ENCRYPTION_KEY

    Your security team generates the ENCRYPTION_KEY value, stores it in your approved secrets manager and injects it into the Web and Worker containers at deployment time. Langfuse uses this key to encrypt LLM API and integration credentials it holds, so losing or changing it without a planned procedure can break those integrations. Record the key owner, the storage location and the rotation process in your key management records. Done when the key is absent from configuration files and container images, and your records show who can read it.

  4. Enforce SSO and disable password sign-in

    Your identity team connects Langfuse to your identity provider through one of the supported Auth.js providers or generic OIDC, then disables password sign-in and enforces SSO for your organization's email domains. Access then follows the joins, moves and leavers process in your identity system. Confirm which options your Langfuse version and license allow, since the SSO documentation covers provider-by-provider behavior. Done when a test account from outside the approved domains cannot sign in and a user from the enforced domain signs in only through the identity provider.

  5. Configure RBAC and protected prompt labels

    Your administrators define project-level roles so that only clinical informatics or engineering staff with a documented need can open traces that contain ePHI. Project-level RBAC roles and protected prompt labels require an Enterprise license key, so confirm entitlement before this step. Map each role to a named business need in your access matrix and keep the matrix with your HIPAA documentation. Done when test users confirm they can see only the projects their role allows and cannot change protected prompt labels.

  6. Enable client-side and server-side masking

    Your application team configures masking in the SDKs so identifiers such as names, record numbers and dates are redacted before data leaves the application. Your platform team then enables server-side data masking, which requires an Enterprise license key, as a second layer at ingestion. Test with synthetic records that resemble your ePHI and confirm the masked values never appear in stored traces, scores or exports. Treat this as a risk reduction measure, not proof that no ePHI is stored, and document the residual risk in your analysis.

  7. Set retention and enable audit logs

    Your compliance lead sets a data retention policy that matches the period your organization has chosen for traces with health data, then confirms that deletion runs as configured. Data retention policies and audit logs both require an Enterprise license key. Verify the audit log records logins, role changes, project access and deletions, and confirm where those logs are shipped and how long they are kept. Done when a test trace is deleted on schedule and the audit trail shows the deletion with the actor and time.

  8. Restrict and test backups, then document the configuration

    Your operations team applies the same encryption, access and location rules to PostgreSQL, ClickHouse and blob storage backups as to the live system, then runs a restore test into an isolated environment. The team compiles the configuration record, the access matrix, the masking test results, retention settings, backup procedures and the license entitlements into one package for the security risk analysis. Ask your business associate or legal team whether any vendor or subcontractor will touch ePHI, since business associate contract terms under 45 CFR 164.314 apply. Done when the restore test passes and the package is approved by your privacy and security officers.

What the platform does not cover for HIPAA

Running Langfuse inside your own infrastructure keeps ePHI under your control, but it does not make the deployment HIPAA compliant on its own. The cards below cover the gaps that remain after the platform is built, and the organizational work that the Security Rule expects you to own.

No HIPAA certification or attestation

The Security Rule has no certification. HHS states that no standard requires an entity to certify compliance and does not recognize private certifications, which do not stop HHS from finding a violation later. Nothing DeployOpen delivers or Langfuse ships is a HIPAA certificate or attestation. Check any vendor or partner claim of HIPAA certification against what HHS has said, and keep your own documented evidence of compliance.

HHS certification FAQ

Business associate agreements must be confirmed

If Langfuse or any service provider handles ePHI on your behalf, a business associate contract under 45 CFR 164.314 must require Security Rule compliance, flow the same terms to subcontractors, and require incident reporting. DeployOpen does not sign a business associate agreement by default, and whether Langfuse will do so for a self-hosted deployment is for the vendor to confirm in writing. Confirm this before any trace containing health data is sent.

Section 164.314 text

Masking does not guarantee ePHI removal

Client-side masking in the SDKs and server-side ingestion masking, which needs an Enterprise license key, can redact patterns you define. They cannot know every name, record number or free-text clinical detail that a clinician or patient pastes into a prompt. Treat masking as one control, test it against realistic sample traces, and define what happens to traces that slip through, including deletion.

Langfuse masking docs

Addressable specifications need documented decisions

Half of the 36 implementation specifications are addressable, including automatic logoff and both encryption specifications for technical safeguards. For each one, you must assess whether it is reasonable and appropriate, and if you decline it, document why and implement an equivalent measure where reasonable. Record these decisions for every Langfuse component, including ClickHouse, PostgreSQL and blob storage, so the file reflects your actual configuration.

Addressable specifications
22
Appendix A matrix

Risk analysis and workforce training

A documented risk analysis of where Langfuse stores, indexes and exports ePHI is organizational work that no platform can perform for you. It should cover trace payloads, prompts, scores, backups and logs. Workforce training on what may be pasted into prompts, and on who may view traces, must also be scheduled and recorded. NIST SP 800-66 Rev. 2 offers sample questions for these activities, though it is informational rather than binding.

NIST SP 800-66 Rev. 2

Pending Security Rule revision

HHS proposed a major Security Rule revision in January 2025, which would change technical requirements for areas such as encryption and audit controls. It was not final as of October 2026, and the Unified Agenda projects final action for July 2027. Build controls against the current rule, track the rulemaking, and plan a review once a final rule is published.

Proposed rule text

HITRUST is a separate assessment

HITRUST CSF is a privately run framework with its own assessment and certification tiers, and it is not required by the Security Rule. A HITRUST r2 or i1 result would require an assessor, scope decisions and evidence beyond this implementation work. If a customer or contract asks for HITRUST, scope that as its own engagement and confirm the assessor and version with the HITRUST Alliance.

HITRUST CSF release notice

Questions buyers ask about HIPAA and self-hosted Langfuse

Does self-hosting Langfuse make us HIPAA compliant?

No. Langfuse is software, and HIPAA compliance applies to the covered entity or business associate that creates, receives, maintains or transmits electronic protected health information (ePHI). Self-hosting keeps trace data inside your infrastructure, which supports the Security Rule's technical safeguards, but the Security Rule covers your administrative, physical and technical controls as a whole. The Security Rule sits in 45 CFR Part 164 Subpart C, and sections 164.308, 164.310 and 164.312 define the safeguards you must assess and document for your own environment. Your compliance program also has to cover workforce training, risk analysis, vendor agreements and incident response.

Is there a HIPAA certification for Langfuse or for our deployment?

No. HHS states that no Security Rule standard requires an entity to certify compliance, and that HHS does not endorse or recognize private certifications. Any vendor or consultant claiming a HIPAA certification should be questioned closely, because such a certification does not prevent HHS from later finding a violation. For evidence, the Office for Civil Rights reviews documented risk analysis, policies, configuration and operating records. Ask your counsel whether a business associate agreement is needed for any vendor that will handle ePHI on your behalf, since 45 CFR 164.314 sets the required contract terms.

Which Langfuse features need an Enterprise license key?

Core Langfuse features and APIs are available in the MIT-licensed open source version. Features that need an Enterprise license key include project-level RBAC roles, protected prompt labels, data retention policies, audit logs, server-side data masking, UI customization, organization creators, the org management API with SCIM, and the instance management API. For HIPAA-relevant work, audit logs, retention policies and server-side masking are the three that matter most. Client-side masking in the SDKs is available without the key. Confirm the current license terms in the license key documentation and the LICENSE file before you commit to a design.

How much effort does the HIPAA configuration take, and what drives it?

Effort depends mainly on how many systems send traces with ePHI, how many users need access, and how much of the control set you must evidence yourself. Langfuse runs Langfuse Web, Langfuse Worker, PostgreSQL, ClickHouse, Redis or Valkey, and S3-compatible blob storage, so each store needs its own encryption, backup and access setup. The Security Rule has 18 standards and 36 implementation specifications, 14 required and 22 addressable, so the number of addressable decisions you must document also drives the work. Ask any partner to show which specifications they will assess and which evidence they will produce.

Can our internal team set this up without outside help?

Often yes, if your team already operates Kubernetes or VM infrastructure, PostgreSQL, ClickHouse and object storage, and has a compliance owner who can run a risk analysis. The Security Rule expects you to assess each addressable specification and document why you chose a given measure, which is work your compliance and security staff must own. An outside partner can help with architecture, hardening, masking rules, backup testing and evidence preparation. DeployOpen plans, implements, hardens, backs up, documents and supports self-hosted open-source platforms in your infrastructure, under a written, fixed-scope agreement. Your own team remains responsible for the risk decisions.

How long do setup and evidence collection take?

No duration is fixed here. The timeline depends on your infrastructure readiness, the number of trace sources, SSO integration, the masking rules you need and the evidence your compliance program requires. Most engagements are fixed-scope, so the scope, deliverables and timeline are agreed in writing before work starts. Ask for the timeline as a list of milestones with dependencies, including your own approvals. Also plan for the Langfuse major upgrade path, since the v3 to v4 guide requires ClickHouse 25.12 or later and PostgreSQL 15 or later, and a ClickHouse backfill may need about 3x disk headroom.

What penalties apply to HIPAA violations under the 2026 figures?

For penalties assessed on or after January 28, 2026, the inflation-adjusted civil money penalty under 45 CFR 102.3 (91 FR 3666) ranges from $145 per violation where there was no knowledge, up to $2,190,294 per violation for uncorrected willful neglect. The calendar-year cap is also $2,190,294. The Office for Civil Rights enforces the rule through complaints, compliance reviews and audits, and its 2024 to 2025 audit program reviews 50 covered entities and business associates on hacking and ransomware provisions. The Security Rule revision proposed on January 6, 2025 (90 FR 898) has no final rule as of October 2026, so confirm current requirements with counsel.

How DeployOpen scopes HIPAA-aligned Langfuse work and evidence

DeployOpen plans, implements, hardens, documents and supports self-hosted Langfuse inside your own cloud accounts, data centers or air-gapped networks. For HIPAA safeguards, the work is organized around the controls your compliance and security teams need to review, and DeployOpen prepares the evidence for those reviews without issuing any attestation or certification.

How we scope

  • Engagements are fixed-scope, with the systems, data flows and ePHI boundaries agreed in writing before work starts.
  • The written scope lists which prompts, outputs and trace fields may carry health data, and where masking at ingestion applies.
  • Scope also confirms the Langfuse edition, which features need an Enterprise license key, and which controls you will own.

How we build

  • We deploy Langfuse Web, Langfuse Worker, PostgreSQL, ClickHouse, Redis or Valkey and S3-compatible storage in your environment.
  • We configure SSO, role-based access, encryption in transit and at rest, and audit logging as defined in the scope.
  • We test masking, retention settings and access restrictions against sample traces that contain synthetic health data.

How we hand over

  • You receive configuration records, architecture documentation and a control-by-control map showing where each safeguard lives.
  • Runbooks cover backups, restores, upgrades, key handling for ENCRYPTION_KEY and access reviews that your team can repeat.
  • Evidence packs list test results and open items so your compliance team and independent assessors can review them directly.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers for teams that want help after handover.
  • Upgrades to Langfuse follow the migration guides, and we plan each one against the scope and your change process.
  • Retainer scope is agreed in writing, so you know which reviews, retests and updates are included and what triggers a new quote.

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.