# Building a GDPR-Safe RAG Pipeline on EU Servers: Architecture and Hosting Choices
- **url:** https://easify-ai.com/gdpr-safe-rag-pipeline-on-european-servers-guide/
- **published:** 2026-07-06
- **updated:** 2026-11-16
- **topics:** technologies-deep-dive
- **publisher:** Easify AI, part of Easify Technologies
Retrieval-augmented generation (RAG) is how most companies build an assistant that answers from their own documents. The model doesn't learn your data. Instead, each question pulls the most relevant passages from your files and hands them to the model with the question.
That design is good news for GDPR: your documents stay in a store you control. But it also means personal data moves through several components on every question. This guide shows where it flows, how to keep it in the EU, and how to choose between an API and a self-hosted model.
> **Note:** hosting options and model availability change quickly. Provider details here reflect official pages as of November 2026.
## Where personal data flows in a RAG pipeline
Most compliance problems come from a stage nobody listed. Go through all of them.
| Stage | What it holds | GDPR risk | Control |
|---|---|---|---|
| Source documents | Contracts, HR files, emails, tickets | Indexing more than the purpose needs | Agree the sources and purpose first |
| Chunks | Copies of passages | Copies outlive the source | Delete chunks with the source |
| Embeddings | Vectors of each chunk | Can leak information about the text | Store in the EU, delete with the source |
| Embedding model | Every chunk and every question | Text sent to a third-party API | EU-hosted or local embedding model |
| Vector database | Embeddings plus metadata | US region by default on some hosted services | Choose an EU region or self-host |
| Language model | Question plus retrieved passages | Processing outside the EU | EU-region API or self-hosted model |
| Logs and traces | Prompts, passages, answers | Kept indefinitely "for debugging" | Log IDs and timings, not text |
| Backups and caches | All of the above | Forgotten in deletion requests | Include them in the deletion process |
The principle is simple: for each row, you should be able to say where it is stored, who processes it, and how it gets deleted.
## A reference architecture
Everything below can run inside the EU.
```flow
trigger | User asks a question | Signed in, identity known | Microsoft Teams
tool | Permission-aware search | Only chunks this user may open | PostgreSQL
ai | Answer with sources | EU-hosted model, passages only | Mistral
human | Owner reviews | Feedback, access tests, logs
output | Answer and citations | Links back to the source files | SharePoint
```
1. **Ingest:** pull documents from approved sources, record owner, classification and access list for each.
2. **Chunk and embed:** split into passages and embed them with a model that runs in the EU or on your own servers.
3. **Store:** keep embeddings and metadata (including permissions) in an EU-hosted vector database.
4. **Retrieve:** for each question, filter by the user's permissions first, then search.
5. **Generate:** send only the question and the retrieved passages to the language model.
6. **Log and review:** record document IDs, timings and feedback, and have an owner review regularly.
> **Watch out:** permissions belong in step 4. If a passage the user can't open reaches the model, you are relying on the model to keep a secret. It won't do that reliably.
## Self-hosted model or API?
This is the biggest decision in the design. Both can be GDPR-compliant; they put the work in different places.
| | EU-region API | Self-hosted open-weight model |
|---|---|---|
| Where data goes | To the provider, processed in an EU region | Stays on servers you control |
| Contract | Provider's DPA and subprocessor list | Your hosting provider's DPA only |
| Model quality | Access to the strongest closed models | Good open models, usually a step behind the best closed ones |
| Setup | Hours | Days to weeks, needs GPU servers |
| Running it | Provider handles scaling and updates | You handle updates, monitoring, security |
| Cost pattern | Pay per token; cheap at low volume | Fixed GPU cost; cheaper only at steady high volume |
| Best when | Ordinary business data, fast start | Highly sensitive data, contracts that forbid third parties, high volume |
A practical middle route is a managed open-weight model from an EU provider: you get an API, the model weights are public, and processing stays with a European company.
## EU hosting options
**EU-region APIs from the big providers.** Azure OpenAI offers EU Data Zone deployments. OpenAI has an EU data residency endpoint for eligible API customers. Claude models are available in EU regions through Amazon Bedrock and Google Cloud, and Gemini through Vertex AI EU regions. Anthropic's own API does not offer EU-only processing as of November 2026.
**European model providers.** Mistral, a French company, hosts La Plateforme data in the EU by default. Scaleway's Generative APIs serve open-weight models from a Paris data centre, and OVHcloud's AI Endpoints offer a catalogue of open models from its European infrastructure.
**European infrastructure for self-hosting.** Hetzner, OVHcloud and Scaleway all offer EU data centres with GPU servers, plus object storage and managed databases for the rest of the stack.
> **Tip:** some buyers also ask whether the provider is owned outside the EU, because of foreign access laws. If that question comes up in your sales process, an EU-owned host answers it more simply than an EU region of a US cloud.
## Choosing the components
**Language model.** Open-weight options now include Mistral Large 4, plus models from Qwen, DeepSeek, GLM, Meta's Llama and OpenAI's gpt-oss. Licences differ, and some restrict commercial use, so read each model card. For a comparison of closed models and prices, see [which LLM should you integrate into your business](/which-llm-should-you-integrate-into-your-business/).
**Embedding model.** Open multilingual embedding models such as the BGE and E5 families run comfortably on modest hardware, which keeps every chunk and question in-house. Test on your own documents in each language you use.
**Vector database.** Three common choices:
- **pgvector** if you already run PostgreSQL. One database, simple backups, permissions next to the data.
- **Qdrant** for larger collections and fast filtered search. Self-host it or use its managed cloud in an EU region.
- **Weaviate** if you want built-in hybrid (keyword plus vector) search. Also self-hosted or managed.
At the size most companies start with, any of the three is fast enough. Pick the one your team can run and back up.
## Latency: measure, don't assume
We removed the benchmark tables from earlier versions of this post. Numbers from someone else's hardware tell you little about yours.
What reliably matters:
- **Keep retrieval and the model in the same region.** Every round trip across the Atlantic adds delay you can't optimise away.
- **The model is usually the slowest step.** Streaming the answer makes the wait feel shorter.
- **Test from where your users are**, with your documents and realistic questions, before you choose a host.
## Deletion, logging and access in practice
**Right to erasure (Art. 17).** When a document or a person's data must go, delete the source, its chunks, its embeddings, any cached answers that quote it, and plan for backups to age out.
**Logging.** Log user ID, time, retrieved document IDs, model version, latency and errors. Don't log the full prompt or passages by default. If you need text for debugging, keep it short-term with a fixed retention period.
**Access.** Store each document's access list with its chunks and filter on it at query time. Test it: sign in as a user without access and try to get an answer from a restricted file.
For the wider legal checklist (lawful basis, DPIA, employee notice), see [what GDPR requires for an AI assistant on company documents](/ai-assistant-on-company-documents-gdpr-requirements/). This is also the kind of document workflow we build in [Bison](/systems/bison/), with permissions and deletion designed in from the start.
## Summary
- **Map every stage**: documents, chunks, embeddings, prompts, answers, logs and backups each need a location and a deletion path.
- **Filter by permissions before retrieval**, never after generation.
- **Keep it in the EU** with an EU-region API, a European model provider, or a self-hosted open-weight model.
- **Choose API or self-hosting** by data sensitivity, volume and who will run it; both can be compliant.
- **Measure latency and quality yourself**, on your documents, from where your users are.
## FAQ
### What is a GDPR-safe RAG pipeline?
It is a retrieval-augmented generation system where you know where every piece of personal data is stored and processed, only people with access to a document can get answers from it, and you can delete data from every layer, including embeddings and logs, when you need to.
### Are embeddings personal data under GDPR?
Treat them as personal data if the text they were made from contains personal data. Research has shown that embeddings can leak information about the source text, and they are linked to the original document anyway. Store them in the EU and delete them with the source.
### Can I use an LLM API and stay GDPR compliant?
Yes, with a data processing agreement, an EU processing region where available, and only the data the answer needs in each request. Several providers and cloud platforms offer EU regions. Self-hosting is the stricter option, not the only compliant one.
### Should I self-host an open-weight model or use an API?
Use an EU-region API if you want to move fast and your data is ordinary business information. Self-host if the documents are highly sensitive, your contracts forbid third-party processing, or volume is high enough that your own GPUs cost less. Many teams start with an API and keep the option to switch.