Self-hosted LLM stack for data residency

A self-hosted LLM stack changes where personal data goes, but only for the layers you run yourself. This article splits the LLM stack into layers and says what self-hosting each layer changes for GDPR transfers and residency. It also compares the open-source tracing tools you can run yourself, with license and setup facts checked in October 2026.

Opsware sets up self-hosted tracing, gateways, vector stores and model serving as part of its LLMOps and DevOps work.

A self-hosted tracing backend keeps traces in your region, but it does nothing for the prompt your application still sends to a model API in another country. The guide “LLM privacy: data flows, duties and controls” lists the GDPR duty for each store.

Data residency, transfers and access are three questions

Security questionnaires often treat three separate questions as one:

  • Residency is where data is stored and processed. It is usually a contract promise, such as "customer data stays in the EU", and sometimes a sector rule requires it. The GDPR itself does not require data to stay in the EU.
  • Transfers are the GDPR concept. Chapter V of the GDPR restricts transfers of personal data outside the European Economic Area (EEA). A transfer needs an adequacy decision, safeguards such as standard contractual clauses, or a derogation. A transfer can happen without any storage abroad: remote access by an engineer in another country is a transfer, and so is a prompt sent to a model endpoint outside the EEA.
  • Access is who can reach the data, technically or legally. This includes the vendor's staff, its sub-processors, and the authorities of the countries where the vendor and its parent company are based. A processor is a company that handles personal data on your behalf. Data in the EU region of a US provider is stored in the EU, but the US parent company remains subject to US law.

For each layer you host, you control all three: the location, the staff with access, and the legal entity that holds the data. For each layer you buy as a service, the vendor controls them.

The layers of a self-hosted LLM stack

The table lists each layer, the personal data it holds, and what self-hosting changes. The sections below explain each row.

LayerPersonal data heldWhat self-hosting changesWhat it does not changeEffort to runCommon alternative
Model inferenceEvery prompt and completion, in transit and in provider logsThe model provider leaves the data flow; you set retention and locationModel quality on hard tasks; the model's license termsHigh: GPUs, serving, model evaluationA hosted model on a regional endpoint with reduced retention
Gateway or proxyEvery prompt passes through; logs if enabledOne processor fewer; one place to enforce regions and redactionWhere the model call goes after the gatewayLow to moderateA hosted gateway under a DPA, with logging off
TracingFull copies of prompts, context, tool outputs and completionsThe processor with the most complete copy is gone; you set retention and accessHow much personal data the traces containModerate: several databasesA hosted tool in an EU region, with masking before export
Prompt managementUsually little; test runs may hold real dataPrompt versions and test runs stay in your environmentWhere model calls goLowHosted, with real-data test runs turned off
Vector database and documentsChunked source documents and their embeddingsThe corpus stays in your region; you control deletionCalls to a hosted embedding modelModerateA managed vector database in an EU region
EvaluationDatasets copied from production, with labelsLong-lived datasets stay in your environmentCalls to a hosted judge modelLow to moderateHosted, with scrubbed datasets only

Model inference

Open-weight models from Meta, Mistral, Alibaba's Qwen team, Google's Gemma family and others can run on your own GPUs or on rented GPUs in a region you choose. Common serving engines include vLLM (Apache-2.0), Ollama (MIT) and llama.cpp (MIT). Inference is the only layer where self-hosting removes the model provider from the data flow, so prompts, retrieved context and completions stay on infrastructure you control.

Self-hosting a model does not solve three issues:

  • Self-hosted LLMs may perform worse than the best hosted models on your task, so measure them on your own evaluation set.
  • You must still follow the model's license. Open-weight licenses differ, and some restrict certain uses.
  • Rented GPUs keep the cloud provider in the flow. A GPU instance in a US cloud's Frankfurt region keeps data in Germany, and the cloud provider is your processor.

Another option is a hosted model on a regional endpoint. Azure offers EU Data Zones, Vertex AI offers EU locations, Bedrock offers EU inference profiles, and OpenAI offers a Europe region. As of October 2026, OpenAI's EU region covers storage and processing, and it requires zero data retention or modified abuse monitoring (OpenAI, Your data). The article “Zero data retention and DPAs at model providers” compares the regional options and their limits.

Gateway or proxy

An LLM gateway sits between your application and the model providers. It handles routing, API keys, rate limits, budgets and fallbacks, and sometimes caching. LiteLLM is a common open-source gateway whose code is MIT-licensed except for the enterprise/ directory, which has its own license.

A self-hosted gateway matters for privacy in two ways. Every prompt passes through it, so a hosted gateway is a processor that sees all your traffic, and self-hosting removes that processor. The gateway is also a single point where you can enforce policy. It can block requests to providers or regions you have not approved, redact prompts before they leave your network, and keep request bodies out of its logs. The gateway does not change what happens after it forwards a request to a hosted model.

Tracing and observability

Traces hold the most complete copy of your LLM traffic: every prompt, retrieved chunk, tool payload and completion. Self-hosting the tracing backend removes the processor that would otherwise hold that copy and lets you choose the region, the retention period and the people with access. Self-hosting does not reduce what the traces contain, but redaction before export does, as the article “PII redaction for LLM prompts and traces” explains.

Instrument against the OpenTelemetry GenAI semantic conventions where you can. The conventions are still in Development status, and they mark message content as opt-in because it is likely to contain personal data. Standard instrumentation lets you move from a hosted backend to a self-hosted one without rewriting your code. OpenLLMetry (Apache-2.0) is instrumentation of this kind that emits OpenTelemetry data to any backend you run.

Prompt management

Prompt templates rarely contain personal data, unless someone pastes a real customer example into one. Some prompt tools also store playground sessions and test runs that use real data. Apply the same retention and access rules to those prompt tools as to the tracing backend.

Vector database and documents

The retrieval index holds chunked source documents and their embeddings. The corpus is often the most sensitive data in the stack: support tickets, contracts, HR files. Self-hostable options include Postgres with pgvector (PostgreSQL License), Qdrant (Apache-2.0) and Milvus (Apache-2.0). Self-hosting keeps the corpus in your region and makes deletion a query you run yourself.

Check the embedding step. A hosted embedding API receives every chunk of every document at indexing time, and every search query after that. A self-hosted vector database with a hosted embedding model still sends the corpus abroad if the embedding endpoint is abroad. Use a regional endpoint or a self-hosted embedding model.

Evaluation

Evaluation datasets copied from production are long-lived copies of real conversations, and LLM-as-judge evaluations send those conversations to a model again. A self-hosted evaluation tool keeps the datasets in your environment, but the call to the judge model is an inference call covered by the rules for the model layer.

Self-hosted tracing tools compared

The table compares five open-source tracing backends. License facts come from each repository's LICENSE file, and setup facts come from each project's self-hosting documentation, both checked in October 2026.

ToolLicenseSelf-hosted stackRetention control when self-hostedUsage telemetry
LangfuseMIT, except ee/ directories under a commercial licenseWeb and worker containers, PostgreSQL, ClickHouse, Redis or Valkey, S3-compatible storageProject retention settings need the Enterprise editionOn by default; aggregated counts only; TELEMETRY_ENABLED=false turns it off in the open-source edition
Arize PhoenixElastic License 2.0One container with SQLite by default, or PostgreSQLPHOENIX_DEFAULT_RETENTION_POLICY_DAYS; the default of 0 keeps traces foreverWeb analytics on by default; PHOENIX_TELEMETRY_ENABLED=false turns it off
OpikApache-2.0MySQL, Redis, ClickHouse, ZooKeeper and MinIO; Kubernetes for productionNot described in the self-hosting guideNot described in the self-hosting guide
HeliconeApache-2.0PostgreSQL, ClickHouse, MinIO, Redis and Kafka, with Docker Compose or HelmNot described in the self-hosting guideNot described in the self-hosting guide
MLflowApache-2.0MLflow tracking server with a SQL database and artifact storageNot described in the tracing guideNot described in the tracing guide

Each tool has details that matter for a privacy review:

  • Langfuse covers tracing, prompt management, evaluations, datasets and a playground. ClickHouse acquired Langfuse in January 2026 (ClickHouse announcement), and the MIT license for core features did not change. The self-hosted pricing page lists SSO, organization-level roles and client-side masking in the free edition. Audit logs, project-level roles, data retention management and server-side masking need the Enterprise edition. The telemetry event contains counts and up to 30 email domains, not trace content (Langfuse telemetry docs).
  • Arize Phoenix covers tracing, evaluation, prompt management, datasets and experiments, and it is built on OpenTelemetry. The Elastic License 2.0 allows self-hosting for your own use but forbids offering Phoenix to third parties as a managed service. The self-hosting docs list no paid feature tiers, and they list OAuth2, LDAP, local accounts and role-based access.
  • Opik is maintained by Comet, and its self-hosting docs say self-hosted Opik includes all features except user management. The local install script is for testing, and the docs call it not production-ready.
  • Helicone works as a proxy: your application sends model requests through Helicone's gateway, so the tool sits in the request path, unlike the other four. That makes it a gateway and a tracing backend in one. Its self-hosted stack is the largest of the five.
  • MLflow added GenAI tracing to its experiment tracking. The tracing is compatible with OpenTelemetry, and the MLflow docs describe client-side span processors that redact personal data before export (MLflow masking guide). Teams that already run MLflow for classic models can add LLM tracing without a new system.

What self-hosting does not fix

If any step still calls a hosted model API, the prompt, its injected context and the completion leave your infrastructure on that call. Self-hosting the gateway, tracing and vector store does not change where that request goes.

Self-hosting does not cover these points:

  • Hosted model calls. The provider's region and retention terms govern the copy of the prompt and completion that the provider receives.
  • Hosted embeddings and judge models. Teams often forget to list embedding and judge calls in their records of processing, because users never see the output of those calls.
  • Your cloud provider. Self-hosting on a public cloud makes the cloud provider your processor.
  • Remote access. If engineers outside the EEA can query the self-hosted trace store, that access is a transfer to account for.
  • Tool telemetry. Several tools send usage statistics to their maintainers by default, as the tracing tools table shows. The statistics usually contain no trace content, but turn them off or list them in your records of processing.
  • Legal duties. Self-hosting changes who processes the data, but you still have to answer access and deletion requests and enforce retention on every self-hosted store.

The operational cost

Every self-hosted layer is a production system that holds personal data, and running one means this work:

  • Security baseline. SSO, role-based access, audit logging, encryption at rest and in transit, network isolation and patching. A self-hosted trace store with weak access control exposes more data than a hosted service with strong access control. The guide “GDPR Article 32 and security controls for personal data” lists the baseline.
  • Upgrades. LLM tools release often: Langfuse, Phoenix, Opik and MLflow each published a release in the first half of October 2026. Upgrades include database migrations.
  • Databases. A tracing backend may need an analytical database, a relational database, a queue and object storage, and each one needs backups, monitoring and capacity planning.
  • GPUs. Model hosting needs capacity planning, utilization tracking, and an evaluation process that decides when a new open-weight model is good enough to adopt.
  • Retention and deletion. Test that retention jobs delete data, including in object storage and backups. Versioned S3 buckets keep old object versions until a lifecycle rule removes them.
  • Paid features. Audit logs, retention settings or fine-grained roles may need a commercial license even in open-source tools, as with Langfuse. Check this against your control requirements before you choose.

Many teams choose a mixed setup:

  • Self-host the stores that keep the most personal data for the longest time: traces, the vector database and evaluation sets.
  • Run a gateway you control to enforce regions and redaction.
  • Call a hosted model through a regional endpoint, under a DPA with reduced retention.

Answering the customer questionnaire

When a customer asks whether their data leaves the EU, answer for each layer, following a template like this one:

  • Model inference runs on [provider]'s EU endpoint under a data processing agreement (DPA) with [retention setting].
  • Traces and the retrieval index are self-hosted in [region], and trace content is kept for [N] days.
  • Embeddings are generated on [endpoint] in [region].
  • Engineering access is limited to staff in [locations].

List the hosted vendors on your sub-processor page, as the guide “Subprocessor lists and change notices” describes. Make sure your data processing agreement with the customer describes the setup you run. The guide “Data processing agreement (DPA): what it must contain” lists what that agreement must contain.

Questions that come up

Is a US cloud's EU region enough for GDPR?

Storing data in an EU region keeps it in the EU, but the cloud provider is still your processor and its US parent is still subject to US law. For transfers, many US providers rely on the EU-US Data Privacy Framework. The General Court upheld the framework in September 2025, and an appeal to the Court of Justice was pending in October 2026. The guide “LLM privacy: data flows, duties and controls” covers the transfer tools.

Does a self-hosted tracing tool need a DPA?

Not with the tool's maintainer, because the maintainer does not process your data. You still need a DPA with the cloud provider that hosts the servers. If the tool sends usage telemetry, check what the telemetry contains.

Can we self-host Phoenix and offer it to our customers?

Not as a managed Phoenix service. The Elastic License 2.0 forbids providing the software to third parties as a hosted or managed service with access to a substantial set of its features. Using Phoenix internally to trace your own product is allowed.

Data sovereignty vs residency: what is the difference?

Data residency is where data is stored and processed. Data sovereignty is about which country's laws apply to the data and which authorities can demand access to it. Neither term has a single legal definition in the GDPR. Sovereignty is the "access" question in the first section of this page. Data stored in the EU can still be subject to another country's laws.

Which layer should we self-host first?

Most teams start with tracing, because traces hold the most complete copy of the traffic and a tracing backend is easier to run than self-hosting LLM inference on GPUs. Add redaction before export, because the traces still contain personal data.

Need this built?

If you want a self-hosted tracing stack, a gateway or regional model serving set up for you, tell us about your project, and we will reply with questions or a rough plan.

Privacy engineering notes by email

When we publish a new guide on data mapping, DSR automation or AI privacy, we send it to this list. Nothing else.