From Air-Gapped to Edge -- Choosing and Implementing the Right Architecture for Your Trust Level, Data Sensitivity, and Operational Constraints
Architecting Retrieval-Augmented Generation for Every Trust Level -- From Completely Disconnected to Fully Portable
A sovereign RAG system is not one architecture. It is a family of architectures, each trading operational convenience for data control. The fully air-gapped deployment -- a server in a locked room with no network connection, ingesting documents via USB -- is the most sovereign and the most burdensome. The edge deployment -- a RAG stack on a mini PC in a backpack -- is the least sovereign and the most flexible. Between these poles sit three patterns that cover the majority of real-world deployments: isolated LAN for organizations that need internal access without internet exposure, hybrid for organizations with mixed data sensitivity, and local-first for users who want sovereignty without sacrificing the convenience of occasional internet access. This guide maps the full spectrum, provides reference architectures and Docker Compose configurations for each pattern, explains how to move documents and model updates into air-gapped systems, details backup and monitoring strategies that work without internet, and gives a concrete decision framework for choosing the right pattern for your constraints. Every pattern described here has been deployed in production by organizations ranging from government agencies to solo researchers.
Sovereignty is not binary. It is a spectrum, and every RAG deployment sits somewhere on it. At one end is the fully cloud-hosted SaaS RAG service -- your documents are uploaded to a third-party API, embeddings and vectors live in someone else's database, and the language model runs on someone else's GPU. You have no control over data retention, no insight into who can access your queries, and no recourse if the provider changes their terms. At the other end is the air-gapped system -- a server in a physically secured room, no network connection of any kind, powered by a dedicated electrical circuit, with documents arriving on USB drives that are scanned and verified before ingestion. Between these extremes, sovereignty is a function of five variables:
| Variable | More Sovereign | Less Sovereign |
|---|---|---|
| Network connectivity | No network (air-gapped) | Persistent internet |
| Hardware ownership | Owned, in your facility | Leased or rented cloud instances |
| Data location | On your disk, never leaves | Stored in cloud regions you do not control |
| Model provenance | Signed, verified, offline model files | Pulled from a registry at runtime |
| Access control | Physical + network + application layers | Application-layer only |
The five deployment patterns in this guide correspond to five points on this spectrum. They are not arbitrary -- each one represents a meaningfully different threat model and a different set of trade-offs. The diagram below shows where each pattern sits relative to the others, along with the typical use cases that fall into each band.
1The air-gapped pattern is the gold standard of data sovereignty. The RAG server has no network connection -- no Ethernet, no WiFi, no Bluetooth, no cellular modem. It is a machine that exists in isolation, communicating with the outside world only through physical media: USB drives, external hard drives, or optical discs that are manually carried to and from the machine. This pattern is used by intelligence agencies for classified document analysis, by healthcare organizations handling data so sensitive that even encrypted network transmission is unacceptable, and by research institutions protecting patent-pending intellectual property where any data leak could cost millions.
The air-gapped RAG stack is the full sovereign stack -- Qdrant, Postgres, Ollama, embedding service, re-ranker, Tika, Tesseract, Whisper, orchestrator, and web UI -- running entirely on one or more servers in a physically secured room. All services run in Docker containers, but Docker images must be pre-loaded onto the machine from offline media; no image can be pulled at runtime. The GPU (if used for embeddings or LLM inference) is installed directly in the server. A local NTP server (a small hardware device) keeps the clock accurate for audit logs, since internet NTP is unavailable. A hardware security module (HSM) or Trusted Platform Module (TPM) stores encryption keys for the data at rest.
| Component | Specification | Purpose |
|---|---|---|
| Server | 32+ cores, 128 GB RAM, 4 TB NVMe SSD, 1× RTX 4090 or A6000 (24 GB VRAM) | Runs all RAG services |
| HSM / TPM | YubiHSM 2 or TPM 2.0 on motherboard | Stores encryption keys for data at rest |
| Local NTP device | GPS-synchronized NTP appliance | Accurate clock for audit logs without internet |
| USB / external drive | USB 3.2 external SSD, 1-4 TB | Sole data ingress and egress channel |
| UPS | 1500 VA minimum, 30+ min runtime | Clean shutdown on power loss |
There is no network configuration. The server's Ethernet ports are disabled at the BIOS level. WiFi is disabled (or the card is physically removed). Bluetooth is disabled. USB ports are the only external interface, and those can be restricted via USBGuard policy to only allow whitelisted devices by serial number. The server has no IP address, no hostname resolution, no DNS. All inter-service communication happens over Docker's internal bridge network on localhost.
2The isolated LAN pattern connects the RAG server to a local network but not to the internet. Users on the same LAN can access the RAG web UI directly. Remote users connect via a VPN that terminates inside the LAN. The RAG server itself has no route to the internet -- firewall rules block all outbound traffic from the RAG VLAN. This pattern is the workhorse of sovereign deployments for organizations: it provides the convenience of network access for multiple users while maintaining strong data sovereignty. Medical practices, legal firms, and financial institutions are the primary users of this pattern.
The full RAG stack runs on a server placed on an isolated VLAN. A firewall sits between the RAG VLAN and the rest of the network, allowing only the specific ports needed for the web UI and API (typically 8080 for the web UI and 8000 for the API). A VPN gateway (OpenVPN Access Server or WireGuard) provides remote access for users outside the office. The VPN terminates on a separate VLAN and routes into the RAG VLAN. All outbound traffic from the RAG VLAN is blocked -- the server cannot reach the internet even if a service is misconfigured to attempt it. Updates are performed by a maintenance administrator who temporarily connects a USB drive with pre-downloaded, verified packages, or by a controlled maintenance window where outbound access to specific, whitelisted update servers is temporarily enabled.
| Component | Specification | Purpose |
|---|---|---|
| RAG Server | 16-32 cores, 64-128 GB RAM, 2-4 TB NVMe SSD, 1× RTX 4090 (24 GB VRAM) | Runs all RAG services |
| VPN Gateway | Small appliance or VM (4 cores, 4 GB RAM) | WireGuard or OpenVPN for remote access |
| Firewall | pfsense or OPNsense appliance, or iptables rules on host | Blocks outbound from RAG VLAN |
| NAS (optional) | 4-8 TB, RAID 5 or 6, on RAG VLAN | Network backup target |
| Managed switch | VLAN-capable, L3 switch | Separates RAG VLAN from office LAN |
The RAG server lives on its own VLAN (for example, 192.168.10.0/24). The firewall allows inbound TCP 8080 (web UI) and TCP 8000 (API) from the office LAN and VPN VLAN. All outbound traffic from the RAG VLAN is denied by default. If updates are needed, a maintenance window is declared, an explicit firewall rule allowing traffic to a specific update server IP is added temporarily, the update is performed, and the rule is removed. This is documented in the change log. Inter-service communication within the RAG server uses Docker's internal bridge network.
3The hybrid pattern runs two RAG systems in parallel: a local, sovereign RAG stack for sensitive documents, and a cloud-hosted RAG service for non-sensitive public documents. A query router in front of both systems inspects each query and decides which system(s) to send it to. Sensitive queries go to the local stack only. Public-knowledge queries go to the cloud stack. Queries that might span both go to both, and the results are merged. This pattern is for organizations that have a clear split between sensitive and non-sensitive document sets and want the cost savings and scalability of cloud for the non-sensitive portion.
The local half is identical to the isolated LAN or local-first pattern (depending on whether multiple users need access). The cloud half is a separate RAG deployment on a cloud provider (AWS, GCP, Azure) or a cloud RAG SaaS service. A query router service sits in front of both. The router inspects each incoming query, applies classification rules, and routes accordingly. Results from both halves are merged by a fusion service that deduplicates and re-ranks the combined results. The fusion service runs locally -- cloud results are pulled back to the local side before being shown to the user, ensuring that the final response (including the LLM generation) happens on local hardware.
The local half requires the same hardware as the isolated LAN or local-first pattern. The cloud half is provisioned on the cloud provider and scales with demand. The query router and fusion service are lightweight (Python services, 2 cores and 4 GB RAM each) and run on the local server alongside the RAG stack. The primary hardware consideration is ensuring the local server has enough GPU capacity for the sensitive query load plus the fusion and final LLM generation for all queries.
The local server has a controlled outbound connection to the cloud RAG API endpoint only. Firewall rules restrict outbound traffic to the specific IP ranges and ports used by the cloud RAG service. No other outbound traffic is allowed. The connection to the cloud RAG service uses TLS with certificate pinning to prevent man-in-the-middle interception. The query router and fusion service are the only components that initiate outbound connections; the RAG stack itself (Qdrant, Postgres, Ollama) has no outbound access.
4The local-first pattern is the pragmatic sovereign choice. The RAG stack runs entirely on a local server or mini PC. Internet access is available but not required for operation -- it is used for model downloads, software updates, and optional remote monitoring. All queries, all document ingestion, all embedding, all retrieval, and all LLM generation happen locally. The internet connection is a maintenance channel, not a query path. This is the most common pattern for home users, small businesses, and independent researchers who want data sovereignty without the operational overhead of network isolation.
The full RAG stack runs on a single machine -- typically a mini PC (Intel NUC, Beelink, Mac Mini) or a standard tower server. All services run in Docker containers. The machine has an internet connection, but firewall rules restrict outbound traffic to specific destinations: the Docker registry for image updates, the Ollama model library for model downloads, the Debian/Ubuntu package repositories for OS updates, and optionally a monitoring service. The web UI is accessed via the machine's local IP address on the LAN. There is no VPN -- if remote access is needed, it is added on top of this pattern using a simple WireGuard tunnel.
| Component | Specification | Purpose |
|---|---|---|
| Mini PC (small corpus) | 8 cores, 32 GB RAM, 1 TB NVMe, integrated GPU or 8 GB discrete GPU | Up to 10K documents, CPU or small GPU inference |
| Standard server (medium corpus) | 16 cores, 64 GB RAM, 2 TB NVMe, 1× RTX 4090 (24 GB VRAM) | Up to 100K documents, GPU inference |
| UPS (recommended) | 1000 VA, 15+ min runtime | Clean shutdown on power loss |
The server has a static IP on the LAN. Inbound access is on port 8080 (web UI) and 8000 (API) from the LAN. Outbound access is restricted by firewall rules to a whitelist of update destinations. The simplest implementation is iptables rules on the host:
5The edge pattern puts the entire RAG stack on a single portable device -- a laptop, a mini PC, or even a Raspberry Pi 5. All services run on one device. There is no separate server, no network infrastructure, no VLANs. The device may connect to WiFi for convenience, but the RAG stack operates entirely on localhost. This pattern trades scale and multi-user access for portability. It is the pattern for individuals who need RAG in the field, on the road, or in environments where deploying a server is not practical.
The RAG stack runs as Docker containers on a single device. For a mini PC (Intel NUC, Beelink), the full stack can run with a smaller embedding model and a 7B-8B parameter LLM. For a Raspberry Pi 5 (8 GB RAM), the stack uses quantized models (GGUF Q4_K_M) and a lightweight embedding model (all-MiniLM-L6-v2), and may omit Whisper and Tesseract to save resources. The web UI is accessed via localhost:8080 in a browser on the same device. For field work, a phone or tablet on the same WiFi hotspot can access the UI.
| Device | Specification | Corpus Capacity | LLM Size |
|---|---|---|---|
| Laptop with GPU | 8-core CPU, 32 GB RAM, 1 TB SSD, RTX 4060 (8 GB VRAM) | Up to 50K documents | 8B (Q4_K_M) |
| Mini PC (Intel NUC / Beelink) | 8-core CPU, 32 GB RAM, 1 TB NVMe, integrated GPU | Up to 10K documents | 7B (Q4, CPU) |
| Raspberry Pi 5 | 4-core CPU, 8 GB RAM, 256 GB NVMe HAT, no GPU | Up to 2K documents | 3B (Q4, CPU) |
Minimal. The device runs Docker with the default bridge network. All services communicate over localhost. The web UI is served on localhost:8080. If the device connects to WiFi (for model downloads or to allow a phone to access the UI), a basic firewall blocks all inbound connections except from the local network. For field work where no WiFi is available, a phone hotspot provides the local network, and the RAG device connects to it.
ef_construct to 128 (down from 256) to reduce index build time. These compromises make RAG possible on 8 GB of RAM, though query latency will be 5-15 seconds per query rather than 1-5 seconds.
Each deployment pattern has a reference hardware architecture. These are not the only valid configurations, but they are known-good starting points. Adjust based on your corpus size, query volume, and performance requirements. The GPU is the most expensive and most impactful component -- if in doubt, invest in GPU over CPU. The tables below specify complete builds for each pattern, from the air-gapped server room to the pocket-sized Raspberry Pi.
| Component | Specification | Notes |
|---|---|---|
| Server | Dell PowerEdge R760 or equivalent, 32-core Xeon, 128 GB DDR5 ECC, 2× 4 TB NVMe SSD (RAID 1), 1× NVIDIA A6000 (48 GB VRAM) | Redundant power supplies |
| Physical security | Dedicated server room, badge access, camera surveillance, no windows | Room itself is part of the security boundary |
| Network | No network ports enabled at BIOS. WiFi card physically removed. USB ports restricted via USBGuard | Network is absent, not just disabled |
| Key storage | YubiHSM 2 hardware security module, or TPM 2.0 on motherboard | Encryption keys never leave the HSM |
| NTP | GPS-synchronized NTP appliance (e.g., Meinberg LANTIME) | Accurate timestamps for audit logs |
| UPS | APC Smart-UPS 1500 VA, 30+ min runtime | Enables clean shutdown |
| Console | Direct-connected monitor and keyboard (no KVM over IP) | Physical access for administration |
| Component | Specification | Notes |
|---|---|---|
| RAG server | 16-32 core CPU, 64-128 GB RAM, 2-4 TB NVMe SSD, 1× RTX 4090 (24 GB VRAM) | Handles up to 100K documents, 20-50 concurrent users |
| VLAN infrastructure | Managed L3 switch (e.g., Mikrotik CRS326, Ubiquiti EdgeSwitch) | Separates RAG VLAN from office VLAN |
| Firewall | Netgate (pfSense) appliance or VyOS VM | Blocks outbound from RAG VLAN, allows inbound 8080/8000 |
| VPN gateway | WireGuard on a small VM or appliance (4 cores, 4 GB RAM) | Certificate-based auth, logs all connections |
| NAS (backup) | Synology DS923+ or TrueNAS server, 8 TB RAID 5, on RAG VLAN | Nightly backups of Qdrant, Postgres, files |
| UPS | APC Smart-UPS 1500 VA | Clean shutdown on power loss |
| Component | Specification | Notes |
|---|---|---|
| Mini PC (small) | Beelink SER8 or Intel NUC 13 Pro, 8-core Ryzen/Intel, 32 GB RAM, 1 TB NVMe, integrated GPU | Up to 10K documents, CPU inference (7B LLM Q4) |
| Tower server (medium) | Custom build or workstation, 16-core CPU, 64 GB RAM, 2 TB NVMe, RTX 4090 (24 GB VRAM) | Up to 100K documents, GPU inference |
| Firewall | iptables/nftables on host, outbound restricted to update servers | See code block in Pattern 4 above |
| Backup | External USB drive (4 TB), nightly rsync | Offline backup, stored separately |
| UPS (optional) | CyberPower 1000 VA | Recommended but not critical for home use |
| Device | Specification | Estimated Cost | Capability |
|---|---|---|---|
| Raspberry Pi 5 (8 GB) | 4-core ARM Cortex-A76, 8 GB LPDDR4X, 256 GB NVMe HAT, active cooler | $150-$200 | 2K docs, 3B LLM, 10s/query |
| Mini PC (Beelink SER8) | 8-core Ryzen 7, 32 GB DDR5, 1 TB NVMe, integrated GPU | $600-$800 | 10K docs, 7B LLM, 5s/query |
| Laptop with GPU | 8-core CPU, 32 GB RAM, 1 TB SSD, RTX 4060 (8 GB VRAM) | $1,500-$2,000 | 50K docs, 8B LLM, 2s/query |
| Portable battery pack | 100 Wh, 100W USB-C PD output | $100-$150 | Field operation without wall power |
The sovereign RAG stack is the same set of services across all patterns. What changes is which services are included, how images are loaded, and what network access they have. The table below summarizes the service profile for each pattern, followed by the Docker Compose configurations for each.
| Service | Air-Gapped | Isolated LAN | Hybrid (local) | Local-First | Edge (Pi) |
|---|---|---|---|---|---|
| Qdrant (vector DB) | Yes | Yes | Yes | Yes | Yes (quantized) |
| Postgres (metadata + FTS) | Yes | Yes | Yes | Yes | Yes |
| Ollama (LLM) | Yes (GPU) | Yes (GPU) | Yes (GPU) | Yes (GPU/CPU) | Yes (CPU, small) |
| Embedding service | Yes (GPU) | Yes (GPU) | Yes (GPU) | Yes | Yes (small model) |
| Re-ranker | Yes | Yes | Yes | Yes | Optional (CPU) |
| Apache Tika | Yes | Yes | Yes | Yes | Optional |
| Tesseract (OCR) | Yes | Yes | Yes | Yes | Optional |
| Whisper (audio) | Yes | Yes | If needed | If needed | No (too heavy) |
| Redis (queue) | Yes | Yes | Yes | Yes | Yes |
| Web UI | Yes (local) | Yes (LAN) | Yes | Yes | Yes (localhost) |
| Prometheus | Yes (local) | Yes | Yes | Yes | Optional |
| Grafana | Yes (local) | Yes | Yes | Yes | Optional |
| cAdvisor | Yes | Yes | Yes | Yes | Optional |
| Query Router (hybrid only) | No | No | Yes | No | No |
| Fusion Service (hybrid only) | No | No | Yes | No | No |
| WireGuard VPN | No | Yes (separate) | If needed | If needed | No |
| Image loading | Offline (pre-loaded) | Pre-loaded or local registry | Pre-loaded or pull | Pull from registry | Pull from registry |
For air-gapped deployments, all Docker images must be pre-loaded. The standard workflow: on a connected machine, pull all images, save them as tar archives with docker save, transfer to USB, and load on the air-gapped server with docker load. The Compose file references local images only -- no image is pulled at runtime.
The isolated LAN Compose file is identical to the air-gapped file, with two differences: (1) images can be pulled from a local Docker registry on the LAN rather than pre-loaded via USB, and (2) the web UI binds to the server's LAN IP address instead of localhost so other machines on the network can access it.
The local half of a hybrid deployment adds two services: a query router that classifies and routes queries, and a fusion service that merges results from local and cloud. The cloud half is deployed separately (on the cloud provider) and is not in this Compose file.
The local-first Compose file pulls images from Docker Hub during initial setup. After the first docker compose up, images are cached locally. Subsequent restarts do not require internet. For a mini PC without a GPU, omit the deploy.resources blocks and use CPU-based configurations.
The edge Compose file for a Raspberry Pi 5 uses ARM-compatible images, omits Whisper and Tesseract, uses a small embedding model, and configures Qdrant for low memory. All services must use ARM64 images.
The air-gapped pattern's defining constraint is that data moves in and out only via physical media. This makes data transfer a formalized, audited process -- not an afterthought. There are two things that need to enter the air-gapped system: documents for ingestion, and software/model updates. Both follow a similar procedure: prepare on a connected machine, transfer to media, scan and verify at a transfer station, carry media to the air-gapped server, ingest.
Documents are prepared on a connected workstation (the "preparation machine"). The documents are written to a USB 3.2 external SSD. Before the USB drive is connected to the air-gapped server, it passes through a dedicated transfer station -- a separate machine that runs antivirus scanning (ClamAV with up-to-date signatures), checks file types against an allowlist, and verifies file integrity hashes. Only after the transfer station reports clean do the documents get ingested.
Model updates (new embedding models, new LLM versions) follow a stricter procedure than document ingestion. Models are downloaded on a connected machine, verified against published signatures, written to external media, scanned, and loaded onto the air-gapped server. Every model file has a known hash that is published by the model author. The transfer station verifies the hash before the model is approved for transfer. On the air-gapped server, the hash is verified again after the file is copied from the media, before it is loaded into Ollama or the embedding service.
Every deployment pattern needs a backup strategy. The components that must be backed up are the same across all patterns: Qdrant vector snapshots, Postgres dumps, the document file store, and Ollama model files. What differs is where backups are stored and how they get there. The table below summarizes the backup strategy for each pattern.
| Pattern | Primary Backup Target | Secondary Backup | Frequency | Retention |
|---|---|---|---|---|
| Air-Gapped | External USB drive (rotating set of 3) | Second external drive stored offsite | Weekly (or after major ingestion) | 4 weeks rotating, 3 monthly archives |
| Isolated LAN | NAS on RAG VLAN | External drive rotated weekly | Nightly (automated) | 7 daily, 4 weekly, 12 monthly |
| Hybrid (local) | NAS or local disk | External drive weekly | Nightly (automated) | 7 daily, 4 weekly |
| Local-First | External USB drive | Cloud backup of non-sensitive metadata (optional) | Nightly (automated) | 7 daily, 4 weekly |
| Edge | External USB drive or SD card | None (single device) | Manual, weekly | 2 snapshots |
The same backup script works for all patterns; only the target directory changes. For air-gapped, the target is a mounted USB drive. For isolated LAN, it is a NAS share. For local-first, it is an external drive. The script creates three artifacts: a Qdrant snapshot, a Postgres dump, and a tarball of the document file store.
Monitoring a sovereign RAG system means tracking the health of every service, the performance of queries, the state of the GPU, and the integrity of the data. The tools differ by pattern -- air-gapped systems cannot send alerts via email or Slack, while local-first systems can optionally forward metrics to a cloud monitoring service. The table below maps monitoring capabilities to patterns.
| Capability | Air-Gapped | Isolated LAN | Local-First | Edge |
|---|---|---|---|---|
| Prometheus metrics | Yes (local) | Yes | Yes | Optional |
| Grafana dashboards | Yes (local) | Yes | Yes | Optional |
| cAdvisor (container metrics) | Yes | Yes | Yes | Optional |
| Syslog (local) | Yes (required) | Yes | Yes | Yes |
| Email/Slack alerts | No (no internet) | No (no internet) | Yes (optional) | Yes (optional) |
| Cloud monitoring (e.g., Grafana Cloud) | No | No | Optional | No |
| SNMP traps to NOC | No | Yes (if NOC exists) | No | No |
| Physical dashboard (screen in server room) | Yes (recommended) | Optional | No | No |
Without internet, alerting must be local. Prometheus collects metrics from all services. Grafana displays dashboards on a monitor directly connected to the server (or on a nearby machine in the same room). Alerts are written to syslog and displayed on a local status page. For critical failures (GPU OOM, Qdrant down, disk full), an audible alarm (a simple script that plays a sound through the server's speakers) can be configured. A physical dashboard -- a monitor mounted in the server room showing the Grafana overview -- is the air-gapped equivalent of a NOC display.
Prometheus and Grafana run on the RAG server. Grafana is accessible from the LAN (and via VPN for remote users). Alert rules in Prometheus trigger on service failures, high GPU utilization, low disk space, and query latency spikes. Alerts are sent to a local syslog server and optionally to an internal messaging system (Mattermost, Rocket.Chat) running on the LAN. If the organization has a NOC (Network Operations Center), SNMP traps can be forwarded to the NOC's monitoring system.
Same Prometheus and Grafana stack as isolated LAN. The difference is alerting: because the local-first server has internet access (restricted, but present), alerts can be sent via email (SMTP to an external relay), to a Slack webhook, or to a Telegram bot. Optionally, metrics can be forwarded to Grafana Cloud or another cloud monitoring service for remote visibility. This is the only pattern where cloud-based monitoring adds value without compromising sovereignty -- the metrics themselves (CPU, disk, latency) are not sensitive.
On a Raspberry Pi 5, running Prometheus and Grafana is possible but consumes scarce resources. The pragmatic approach is to run a lightweight health-check script (similar to the air-gapped audible alarm, above) that logs to syslog and optionally writes a status file that the web UI can display. For a laptop or mini PC with more resources, the full Prometheus + Grafana stack can run alongside the RAG services.
nvidia-smi or DCGM exporter). Disk: Free space on data volumes, I/O wait. Query performance: p50 and p95 query latency, embedding time, retrieval time, LLM generation time. Ingestion queue: Queue depth (Redis LLEN), throughput. Error rate: HTTP 5xx responses, Ollama generation failures, parse failures.
The decision of which deployment pattern to use is driven by five factors: data sensitivity, number of users, remote access needs, budget, and maintenance capacity. The matrix below maps these factors to patterns. Start by answering the five questions, then use the decision flow to arrive at a recommended pattern.
| Question | Your Answer | Implication |
|---|---|---|
| How sensitive is your data? | Classified / existential if leaked | Air-Gapped |
| Regulated (HIPAA, attorney privilege, financial) | Isolated LAN | |
| Sensitive but not regulated | Local-First | |
| Mixed (some sensitive, some public) | Hybrid | |
| Personal / non-sensitive | Edge or Local-First | |
| How many users need access? | 1 (just me) | Edge or Local-First |
| 2-10 (small team) | Local-First or Isolated LAN | |
| 10-50 (department) | Isolated LAN | |
| Do users need remote access? | No (all on-site) | Any pattern works |
| Yes (occasionally) | Isolated LAN + VPN, or Local-First + WireGuard | |
| Yes (frequently) | Isolated LAN + VPN | |
| What is your hardware budget? | < $200 | Edge (Raspberry Pi) |
| $500-$1,000 | Local-First (mini PC) | |
| $2,000-$5,000 | Local-First (server with GPU) | |
| $5,000-$15,000 | Isolated LAN (server + networking) | |
| $15,000+ | Air-Gapped (server room) | |
| What is your maintenance capacity? | Minimal (I want it to just work) | Local-First or Edge |
| Moderate (weekly check-ins) | Isolated LAN | |
| Dedicated staff + procedures | Air-Gapped |
The decision flow below simplifies the matrix into a sequential process. Answer each question in order. If you reach a pattern, that is your starting recommendation. You can always adjust based on additional constraints.
Deployment patterns are not permanent. Organizations start simple and move toward more sovereign patterns as their data sensitivity or threat model evolves. They also start strict and loosen as they gain confidence in their security posture. Both directions are valid migrations. The key insight is that the RAG stack itself (Qdrant, Postgres, Ollama, embedding, re-ranker, orchestrator) does not change during migration. What changes is the network configuration, the hardware, and the operational procedures. This makes migration primarily a network and operations task, not a software rewrite.
The most common migration path is to start with local-first (the simplest pattern that provides sovereignty) and move toward more sovereign patterns as needs evolve. This path lets you get a working RAG system quickly, validate it with users, and then harden the deployment once the value is proven.
Less common but valid: an organization that deployed air-gapped may find that their threat model has changed (declassification, changed business model, new legal framework) and wants to move to a less restrictive pattern. This direction is easier than tightening -- you are adding capabilities, not removing them.
A local-first or isolated LAN deployment can be extended to hybrid by adding a cloud RAG half and a query router. This does not replace the local stack -- it augments it. The local stack continues to handle all sensitive queries. The cloud half handles public-knowledge queries. This migration is software-only (no hardware changes) and can be done in a day.
A user who started with an edge deployment (RAG on a Raspberry Pi or laptop) and wants to scale up to more documents or more users migrates to local-first by deploying the same Docker Compose stack on a more powerful machine. The Qdrant snapshots and Postgres dumps from the edge device can be loaded directly into the new server -- the data format is identical. This migration takes a few hours.
Suggested Citation:
Sovereign RAG Deployment Patterns: From Air-Gapped to Edge. Avondale.AI Technical Documentation Library. Accessed June 2026. https://avondale.ai/technical/rag/sovereign-rag-deployment-patterns.html