Private cloud
Private-cloud RAG in a single region
A GPU instance in one region running vLLM and Open WebUI, a managed PostgreSQL with pgvector for chats and embeddings, object storage for the original files, and your existing identity provider for sign-in. Same software as the on-premise recipe; different trust boundary.
- Source
- Editorial recipe — no step evidence has been fetched yet
- Verified
- Evidence not verified
- Confidence
- Low
01Objective
Run a document question-answering stack for the whole company inside one cloud tenancy, in a region you choose, with no vendor other than the cloud provider in the data path.
- use caseDocument Q&AAsk questions of a specific document or a small set of them and get an answer with the passage it came from. Narrower than company-wide search: the user already knows which file matters and wants it read carefully.
- use caseInternal company searchOne search box over the documents a company already has — shared drives, wikis, ticket systems, email attachments — answered by a model that quotes the source. The value is finding the right paragraph in a corpus nobody has read end to end, not writing new text.
- use caseKnowledge managementCapturing what the organisation knows — process notes, decisions, answers given once already — and keeping it findable and current. AI helps by drafting entries, spotting duplicates and flagging pages that contradict each other.
Reference deployments using this recipe
Field notes about this recipe
02Recommended stack
| Role | Component |
|---|---|
| Authentication | Existing identity provider via OIDC |
| Gateway | Private ingress: VPN, private endpoint or zero-trust proxy |
| Inference | Qwen2.5-14B-Instruct or Qwen3-32B |
| Inference | vLLM on a GPU instance |
| Storage | Object storage in the same region |
| Ui | Open WebUI |
| Vector store | Managed PostgreSQL with pgvector |
Architecture and data flow
Components
- Employees (office network) — people
- VPN / private endpoint — network
- Open WebUI (application instance) — application
- Existing identity provider (OIDC) — identity
- Retrieval layer — retrieval
- Managed PostgreSQL + pgvector — vector store
- Managed PostgreSQL (chats, users) — database
- Object storage (original files) — storage
- vLLM on a GPU instance — inference server
- Qwen3-32B (open weights) — model
- Cloud GPU instance (L4 or A100) — hardware
Connections
- Employees (office network) to VPN / private endpoint — HTTPS (confidential data)
- VPN / private endpoint to Open WebUI (application instance) — reverse proxy (confidential data)
- Open WebUI (application instance) to Existing identity provider (OIDC) — OIDC sign-in (personal data)
- Open WebUI (application instance) to Retrieval layer — question + user groups (confidential data)
- Retrieval layer to Managed PostgreSQL + pgvector — embedding search (confidential data)
- Retrieval layer to Managed PostgreSQL (chats, users) — documents + permissions (confidential data)
- Open WebUI (application instance) to Managed PostgreSQL (chats, users) — chats, users, settings (personal data)
- Retrieval layer to Object storage (original files) — original files (confidential data)
- Retrieval layer to vLLM on a GPU instance — prompt + retrieved passages (confidential data)
- vLLM on a GPU instance to Qwen3-32B (open weights) — loaded weights
- Qwen3-32B (open weights) to Cloud GPU instance (L4 or A100) — GPU memory
- vLLM on a GPU instance to Cloud GPU instance (L4 or A100) — GPU memory
External data transfer · SOME
- confidential content leaves your premises for your own cloud tenancy ("VPN / private endpoint"). You keep control of the account; the provider is a processor, so a DPA and a documented region apply.
- Everything inside the boundary is in one region and one account you control; the provider is a processor, not a recipient of the content for its own purposes.
- Model weights are downloaded once at setup; no prompt or document is sent to any third-party model API in this design.
03Suitable for
- Organisation size
- 20–1000 employees
- Data classes
- confidential, personal
- Constraints
- a cloud account you control, with a region that satisfies your residency requirement; a data processing agreement with the provider; no server room, or a workload too seasonal to justify buying hardware
- Industries
- Professional services, Technology, Financial services, Insurance
- Jurisdictions
- any
04Hardware
Cloud GPU instance — 1 × NVIDIA L4 24 GB
- GPU
- NVIDIA L4 24 GB (AWS G6, Azure NVadsA10/NCads equivalents, GCP G2)
- VRAM
- 24 GB
- System RAM
- 64 GB
- Storage
- 1000 GB
- CPU
- 8–16 vCPU
- Form factor
- Cloud instance
Indicative costUS$1 – US$2
indicative on-demand rental, USD per hour, Aug 2026 — verify against the provider price list for your region
The private-cloud counterpart of `onprem-small-24gb`: same model sizes, no capital outlay, and a region you choose explicitly. Running it continuously for a year usually costs more than buying the equivalent box, so it suits pilots, bursts and firms without a server room. The cloud provider becomes a data processor — a DPA and a documented region are required.
Cloud GPU instance — 1–2 × NVIDIA A100 80 GB
- GPU
- NVIDIA A100 80 GB (AWS P4d, Azure NDasr A100 v4, GCP A2)
- VRAM
- 80 GB
- System RAM
- 256 GB
- Storage
- 2000 GB
- CPU
- 24–48 vCPU
- Form factor
- Cloud instance
Indicative costUS$2 – US$12
indicative on-demand rental, USD per hour, Aug 2026 — verify against the provider price list for your region
For 32B models with long context, or 70B-class models on two cards. The band covers one to two GPUs and the gap between committed-use and on-demand rates. Check that the GPU family you need exists in the region you are required to stay in before committing to a design.
Indicative costUSD · one-off plus monthly
- Software licences
- All components are open source and self-installed. Check each licence for use limits.
- US$0
- Model usage
- Open weights served locally: no per-token charge. The GPU cost sits under infrastructure.
- US$0
- GPU instance, running continuously
- Hardware profile cloud-gpu-l4 at US$0.80–2.00 per hour × 730 hours. Stopping the instance outside working hours cuts this roughly in three; committed-use discounts cut it further. Excludes the database, storage, egress and the application instance.
- US$584 – US$1,460
- Managed database, storage and network
- Not estimated: managed Postgres, object storage, NAT and egress are priced per provider and per region, and we have not fetched a price list. Read yours before budgeting.
- Not estimated
- Implementation (6–15 FDE-days)
- 6–15 FDE-days at US$760–1940 per day, converted from the HK$6,000–15,000 band at the HKMA Linked Exchange Rate band of HK$7.75–7.85 to one US dollar. One-off; excludes internal staff time.
- US$4,560 – US$29,100
- 20–100 users, one region, one GPU instance sized for a 14B–32B model.
- Rented capacity: the infrastructure line recurs every month, unlike the on-premise recipe.
- A year of continuous L4 rental exceeds the purchase price of the equivalent on-premise box — that comparison, not privacy, is usually the deciding argument.
- Every figure is an assessment from the inputs listed, not a quotation.
05Difficulty
3 / 5
A project week with Linux, Docker and GPU experience
06Skills
- AWSaws
- infrastructure
- Azureazure
- infrastructure
- Dockerdocker
- infrastructure
- Google Cloudgcp
- infrastructure
- Identity and SSOidentity-sso
- security
- Linuxlinux
- operations
- LLM inferencellm-inference
- ml
- Networkingnetworking
- networking
- PostgreSQLpostgresql
- data
- Retrieval-augmented generationrag
- ml
- Security hardeningsecurity-hardening
- security
07Deployment steps
Commands are copied from each project’s own documentation, and the page they came from is linked under the step. 0 of 7 steps currently open an evidence record. The rest are linked to their source; §10 says which of those documents were fetched and which were fetched without their anchor being found — two different states, named differently there.
- 01
Choose the region, then check the GPU exists in it
AssessmentResidency drives the region and the region constrains the hardware: not every GPU family is offered everywhere. Azure documents its GPU families by series — the NCads H100 v5 VMs are "powered by NVIDIA H100 NVL GPU"; AWS G6 instances are "powered by NVIDIA L4 Tensor Core GPUs". Confirm the family, size and quota in your region before the design depends on it.
- 02
Build the network before the application
AssessmentOne VPC or virtual network, private subnets for the GPU instance and the database, no public IP on either, and access from the office over VPN or a private endpoint. Egress via NAT so the instance can pull images and model weights but nothing can reach it inbound.
- 03
Provision managed PostgreSQL and enable pgvector
AssessmentCreate the managed database in the same region, enable the extension once in the database you will use, and turn on automated backups with a retention window that matches your policy. Keep it private: no public endpoint, no allow-all firewall rule.
CREATE EXTENSION vector;run once in the database that stores embeddings
- 04
Run vLLM on the GPU instanceversion-sensitive
AssessmentUse the official image with the GPU attached and the model cache on a persistent disk, so a restart does not re-download tens of gigabytes across the provider network. Set an API key and bind the port to the private subnet only.
docker run --runtime nvidia --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=$HF_TOKEN" \ -p 8000:8000 \ --ipc=host \ vllm/vllm-openai:latest \ --model Qwen/Qwen3-0.6Bfrom the vLLM docs — substitute the model you sized for
- 05
Run Open WebUI against the managed database
AssessmentPoint Open WebUI at the managed PostgreSQL and set the vector store to pgvector before loading any documents. Configure OIDC sign-in with your existing identity provider so nobody has a local password in the cloud.
DATABASE_URL=postgresql://user:password@db-host:5432/openwebui VECTOR_DB=pgvector PGVECTOR_DB_URL=postgresql://user:password@db-host:5432/openwebui - 06
Turn on the controls the DPA will ask about
AssessmentEncryption at rest with a customer-managed key where the provider offers it, audit logging on the account, retention on the logs, and a documented list of who has administrative access. Record which provider services touch the data and in which region each of them runs.
- 07
Put a schedule and a budget alarm on the GPU instance
AssessmentA GPU instance left running out of hours is the single largest avoidable cost in this design. Stop it on a schedule if the usage pattern allows, and set a budget alert before the first month rather than after it.
08Compliance considerations
Structured issue-spotting to support your own review — not legal advice. Verify against the cited primary sources and your counsel.
Applies everywhere
Data residency · Cross-border transfershigh
The region is a design decision with legal consequences. Pin every component — compute, database, object storage, backups, logs — to the same region, and check whether provider support access or managed-service control planes sit outside it.
Data processing agreement · Subprocessors · Vendor jurisdictionhigh
The cloud provider is a processor: you need a data processing agreement and the current subprocessor list, and you should know which corporate group entity contracts with you.
Model trainingmedium
You are serving open weights on rented compute, so no provider trains on your content in this design. That changes the moment a managed model API is added — the providers publish their own commitments (Google states it "won't use your data to train or fine-tune any AI/ML models without your prior permission or instruction"; Azure states prompts and completions "are NOT used to train any generative AI foundation models without your permission or instruction"). Verify the current wording against the fetched page.
Security · Logginghigh
No public inbound route, keys in the provider secret store rather than in a compose file, account-level audit logging on, and a named owner for the administrative roles.
Retention · Personal datamedium
Backups and snapshots are copies of the corpus with their own lifetimes. A deletion request that does not reach them is not complete.
09Alternatives
The same stack on your own hardware
If the answer to "can documents leave the building?" is no, or if the GPU would run all day anyway, owning the box is both cheaper over a year and simpler to explain.
- — No processor in the data path, no DPA needed for the model
- — Capital spend, a room to put it in, and hardware to maintain
A managed model API inside the same tenancy
Replace the GPU instance with the provider's own model service: no capacity planning, usually a stronger model, and a per-token bill. The retrieval layer stays yours.
- — No GPU to size, patch or pay for while idle
- — Prompts and retrieved passages go to a managed service — check its retention and training terms
- — Model availability differs by region, which can undo the residency design
10Evidence
Not yet in the ledger
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
- AWS — Amazon EC2 G6 instances (NVIDIA L4)
Vendor page
not yet fetched
not yet fetched
- Google Cloud — Generative AI data governance
Vendor page
not yet fetched
- AWS — Data protection in Amazon Bedrock
Vendor page
not yet fetched
11Community
Deployed this stack, or hit something this page does not cover? Corrections, sources and implementation reports are what keep a recipe worth reading.
Improve this page
Sign in to contribute
From the field
0 deployments · 0 questions
Nobody has reported deploying this here yet, and no question has been opened against this page. Both appear once a reviewer accepts them.
12Hire an FDE
If you would rather not build it, we can introduce a forward-deployed engineer who has deployed this stack before. The enquiry form starts from this recipe.