[{"data":1,"prerenderedAt":178},["ShallowReactive",2],{"seo-verification":3,"blog-privategpt-on-a-vps-analyze-confidential-documents-locally-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"slugs":9,"title":12,"excerpt":13,"readTime":14,"views":15,"isPinned":16,"publishedAt":17,"category":18,"categories":24,"featuredImage":26,"bgImage":27,"posterImage":28,"relatedSolution":26,"intro":29,"sections":30,"ctaTitle":126,"ctaBody":127,"ctaButton":128,"ctaUrl":129,"relatedPosts":130},281,"privategpt-on-a-vps-analyze-confidential-documents-locally",{"fr":10,"en":8,"ar":11},"privategpt-documents-confidentiels-vps","تشغيل-privategpt-على-vps-تحليل-المستندات-السرية-محليا","PrivateGPT on a VPS: analyze confidential documents locally","Deploy PrivateGPT on a VPS to analyze contracts, financial reports and HR files with no data leaving your server. GDPR and AI Act article 50 compliant.",9,0,false,"2026-08-18T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},1,"Artificial Intelligence","intelligence-artificielle","bg-purple-500\u002F10 text-purple-400","ia",[25],{"id":19,"name":20,"slug":21,"color":22,"icon":23},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fprivategpt-documents-confidentiels-vps-poster.svg","AI Act article 50 came into force on 2 August 2026: any generative AI system processing personal data must now be declared or exempted. For lawyers, accountants, HR professionals and healthcare providers, the immediate answer is PrivateGPT — installed on a root VPS, it runs a language model locally, reads your PDFs and answers your questions, with zero requests leaving your server.",[31,35,46,49,80,83,92,114,117,120,123],{"type":32,"title":33,"body":34},"h2","Why your professional documents cannot go through the cloud","A lawyer pasting a merger contract into ChatGPT, an accountant submitting a tax return to Claude, an HR manager summarising a disciplinary file via the OpenAI API: in all three cases, data flows to third-party servers. GDPR article 28 is clear: the data controller remains responsible even when a sub-processor — here OpenAI or Anthropic — receives the data.\n\nAI Act article 50, in force since 2 August 2026, adds another layer: general-purpose generative AI systems must be declared or fall under an explicit exemption. Using a US provider's API to process personal data without prior declaration now carries concrete regulatory risk.\n\n**The immediate legal path is on-premise.** A root VPS running PrivateGPT answers questions about your documents without ever calling `api.openai.com` or `api.anthropic.com`. You can verify this in real time with `tcpdump` — this is an architectural property, not a contractual promise.",{"type":36,"title":37,"items":38},"ul","What you gain with on-premise PrivateGPT",[39,40,41,42,43,44,45],"**Zero outbound data**: the model runs locally via `llama-cpp-python`, no network calls to an AI provider — verifiable by firewall or `tcpdump`.","**GDPR article 28 compliance**: no additional sub-processor, no DPA to negotiate, no transfer outside the EU.","**AI Act article 50 exemption**: a self-hosted LLM with no public access does not fall under the obligation to declare general-purpose generative AI systems.","**Professional secrecy preserved**: contracts, tax filings, medical records and HR files stay within your legal perimeter.","**RAG on your own documents**: PrivateGPT indexes your PDF, DOCX, TXT and CSV files and answers while citing source passages — not a generic chatbot.","**No recurring subscription**: the cost is the VPS; the Mistral-7B-Instruct model is open-source.","**CPU-only viable**: no GPU required — a VPS with 8 GB of RAM and an NVMe SSD is enough for Mistral-7B Q4_K_M.",{"type":32,"title":47,"body":48},"PrivateGPT vs Ollama: two tools that do different things","Ollama is a **generic LLM server**: it downloads models, exposes an OpenAI-compatible API and answers prompts. It is an excellent tool, but it does not read your files — it answers from its conversation context, not your documents.\n\nPrivateGPT (repo \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzylon-ai\u002Fprivate-gpt\">github.com\u002Fzylon-ai\u002Fprivate-gpt\u003C\u002Fa>) is a **RAG engine** (Retrieval-Augmented Generation): it indexes your documents into a local vector store (ChromaDB), then for each question retrieves the relevant passages and injects them into the LLM's context. The answer cites its sources. This mechanism is what makes the tool useful on an 80-page contract or a 12-annex tax file: without RAG, the model hallucinates; with RAG, it reads.",{"type":50,"title":51,"headers":52,"rows":56},"comparison","PrivateGPT vs Ollama — key differences",[53,54,55],"Criterion","PrivateGPT","Ollama",[57,61,65,69,73,77],[58,59,60],"Primary use case","Q&A on your own documents (RAG)","Generic LLM serving (API)",[62,63,64],"File indexing","PDF, DOCX, TXT, CSV native","No — manual context",[66,67,68],"Web interface","Yes (port 8080)","No (API only)",[70,71,72],"Vector store","Local ChromaDB","None",[74,75,76],"Source citation","Yes — passage + filename","No",[78,79,79],"GPU required","No — CPU-only viable",{"type":32,"title":81,"body":82},"Prerequisites: choosing the right VPS before you start","Memory requirements are imposed by the model, not by PrivateGPT itself. The official documentation and field measurements converge on two thresholds:\n\n- **Mistral-7B-Instruct Q4_K_M** (PrivateGPT's default model): **8 GB of RAM minimum**. Below this, the process is killed by the kernel (OOM) when loading the model.\n- **13B model** (e.g. Llama-2-13B Q4_K_M): **16 GB of RAM minimum**. Response quality is noticeably better on long and technical texts.\n\n**NVMe SSD recommended**: indexing a 50-page PDF generates vector embeddings — on an NVMe disk this takes a few seconds; on an HDD or shared SATA SSD it can block for several minutes.",{"type":36,"title":84,"items":85},"Pre-installation checklist",[86,87,88,89,90,91],"VPS with **8 GB of RAM minimum** (16 GB if targeting a 13B model).","Debian 12 or Ubuntu 22.04\u002F24.04 — PrivateGPT's official Docker images target these distributions.","Docker and Docker Compose installed (`docker compose version` must return v2.x).","**NVMe SSD** for the data volume (fast PDF indexing).","SSH root or sudo access to the VPS.","Port 8080 **not publicly exposed** at this stage — PrivateGPT listens locally by default.",{"type":93,"title":94,"steps":95},"steps","Deploy PrivateGPT with Docker Compose",[96,99,102,105,108,111],{"title":97,"body":98},"Clone the repository and prepare the structure","```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fzylon-ai\u002Fprivate-gpt.git\ncd private-gpt\nmkdir -p local_data\u002Fprivate_gpt docs\n```\n\nThe `docs\u002F` folder will receive the documents you want to index. The `local_data\u002F` folder contains the ChromaDB vector store and downloaded models — **never mount it on an unencrypted network volume**.",{"title":100,"body":101},"Configure the environment","```bash\ncp .env.example .env\n```\n\nIn `.env`, the values to check:\n```bash\nDOCKER_COMPOSE_PROFILE=ollama\nPRIVATEGPT_SERVER_HOST=127.0.0.1\nPRIVATEGPT_SERVER_PORT=8080\n```\n\nThe `ollama` profile starts PrivateGPT in CPU mode with the `llama-cpp-python` backend.",{"title":103,"body":104},"Start the service and download the model","```bash\ndocker compose --profile ollama up -d\ndocker compose logs -f privategpt\n```\n\nWhen you see `Application startup complete`, the service is ready. The first request may take 15–30 seconds (model loading into RAM).",{"title":106,"body":107},"Ingest your documents","```bash\ncp \u002Fpath\u002Fto\u002Fmerger-contract.pdf docs\u002F\ncurl -X POST http:\u002F\u002F127.0.0.1:8080\u002Fv1\u002Fingest\u002Ffile \\\n  -H 'Content-Type: multipart\u002Fform-data' \\\n  -F 'file=@docs\u002Fmerger-contract.pdf'\n```\n\nSupported formats: PDF, DOCX, TXT and CSV. The `MAX_INPUT_SIZE` variable (`.env`) caps the size per file.",{"title":109,"body":110},"Access the interface via an SSH tunnel","PrivateGPT listens on `127.0.0.1:8080`, **never exposed directly to the internet**. To access it from your workstation:\n```bash\nssh -L 8080:127.0.0.1:8080 user@your-vps.com\n```\nThen open `http:\u002F\u002Flocalhost:8080` in your browser.",{"title":112,"body":113},"Query a contract","In the web interface, make sure **Query documents** mode is selected (not **LLM Chat**, which ignores the vector store). Example:\n\n> \"What are the conditions precedent set out in article 4?\"\n\nPrivateGPT returns the answer with cited source passages. Via the API:\n```bash\ncurl -X POST http:\u002F\u002F127.0.0.1:8080\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"messages\":[{\"role\":\"user\",\"content\":\"What are the conditions precedent in article 4?\"}],\"use_context\":true}'\n```",{"type":32,"title":115,"body":116},"Post-installation: secure and back up","**Team access with Nginx + basic authentication**\n\n```bash\n# \u002Fetc\u002Fnginx\u002Fsites-available\u002Fprivategpt\nserver {\n    listen 443 ssl;\n    server_name privategpt.your-domain.com;\n    ssl_certificate     \u002Fetc\u002Fletsencrypt\u002Flive\u002Fprivategpt.your-domain.com\u002Ffullchain.pem;\n    ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fprivategpt.your-domain.com\u002Fprivkey.pem;\n    auth_basic \"Restricted access\";\n    auth_basic_user_file \u002Fetc\u002Fnginx\u002F.htpasswd;\n    location \u002F { proxy_pass http:\u002F\u002F127.0.0.1:8080; }\n}\n```\n\n**Backing up critical data** — two folders constitute the complete state: `local_data\u002F` (ChromaDB vector store + models) and `docs\u002F` (your source documents).\n\n**Verifying no outbound traffic to AI APIs**:\n```bash\ntcpdump -i any host api.openai.com or host api.anthropic.com\n```\nNo packets should appear.",{"type":118,"body":119},"tip","**Model too slow? Switch to a smaller quantisation.** If response time exceeds 90 seconds on Mistral-7B, download the `Q3_K_S` version (~3.0 GB, ~20% faster on CPU) and update the `LLM_HF_MODEL_FILE` variable in `.env`. Quality drops slightly on very long texts, but remains sufficient for precise questions on a well-structured contract. Conversely, if you have 16 GB of RAM available, `mistral-7b-instruct-v0.2.Q8_0.gguf` (~7.7 GB) delivers more nuanced answers on ambiguous clauses.",{"type":32,"title":121,"body":122},"Most common errors","**OOM at launch** — `docker ps` shows `Exited (137)`. Verify RAM with `free -h`. Switch to `Q3_K_S` model if insufficient.\n\n**Ingestion stalled** — check permissions: `chown -R 1000:1000 local_data\u002F`. The container runs as non-root (UID 1000).\n\n**Response time over 60 seconds** — the model is paging to swap. Check with `htop` during a request. Increase VPS RAM or use a smaller model.\n\n**Results without source citation** — verify **Query documents** mode is selected (not **LLM Chat**), and check `GET http:\u002F\u002F127.0.0.1:8080\u002Fv1\u002Fingest\u002Flist`.\n\n**Container restarting in a loop after an update** — delete `local_data\u002Fchroma_db\u002F` and re-index your documents.",{"type":32,"title":124,"body":125},"PrivateGPT in production: an infrastructure decision, not just a Docker run","Installing PrivateGPT on a VPS takes less than an hour. Maintaining it in operational conditions — model updates, backups, team access management, RAM consumption monitoring — requires the same reflexes as any business service. That is precisely what a root VPS provides: the freedom to process your data under your own rules, with a responsibility perimeter you control end to end.","A VPS for your confidential documents","Choose a VPS with 8 GB of RAM for Mistral-7B or 16 GB for a 13B model, an NVMe SSD for fast indexing — and deploy PrivateGPT without sending a single document to the cloud.","Discover our professional solutions","\u002Fsolutions\u002Fprofessionnels",[131,145,162],{"id":132,"slug":133,"slugs":134,"title":137,"excerpt":138,"readTime":139,"views":15,"isPinned":16,"publishedAt":140,"category":141,"categories":142,"featuredImage":26,"bgImage":27,"posterImage":144,"relatedSolution":26},214,"how-to-deploy-an-mcp-server-on-a-vps",{"fr":135,"en":133,"ar":136},"mcp-serveur-ia-auto-heberge-vps","كيفية-نشر-خادم-mcp-على-vps","How to deploy an MCP server on a VPS","The MCP 2026-07-28 spec has made Model Context Protocol the universal standard for AI agents. Here is how to self-host your own MCP server on a VPS.",5,"2026-08-03T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[143],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fmcp-serveur-ia-auto-heberge-vps-poster.svg",{"id":146,"slug":147,"slugs":148,"title":151,"excerpt":152,"readTime":153,"views":15,"isPinned":16,"publishedAt":154,"category":155,"categories":156,"featuredImage":26,"bgImage":27,"posterImage":158,"relatedSolution":159},11,"how-to-host-ollama-on-a-vps",{"fr":149,"en":147,"ar":150},"heberger-ollama-vps","كيفية-استضافة-ollama-على-خادم-vps","Hosting Ollama on a VPS: advanced operational guide","Advanced Ollama VPS setup: model management, nginx reverse proxy, API security, Q4_K_M\u002FQ8 quantization, CVE-2026-45672 Open WebUI and secure coupling.",10,"2026-06-09T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[157],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-ollama-vps-poster.svg",{"categorySlug":160,"appSlug":161},"artificial-intelligence","ollama",{"id":163,"slug":164,"slugs":165,"title":168,"excerpt":169,"readTime":170,"views":15,"isPinned":16,"publishedAt":171,"category":172,"categories":173,"featuredImage":26,"bgImage":27,"posterImage":175,"relatedSolution":176},12,"how-to-host-localai-on-a-vps",{"fr":166,"en":164,"ar":167},"heberger-localai-vps","كيفية-استضافة-localai-على-خادم-vps","How to Host LocalAI on a VPS","Deploy LocalAI on your VPS as a drop-in replacement for the OpenAI API. Docker, GGUF models, chat, embeddings, images and reverse proxy.",3,"2026-06-08T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[174],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-localai-vps-poster.svg",{"categorySlug":160,"appSlug":177},"local-ai",1787581011261]