By the end, you have an AI infrastructure
100% under your control.
8 specialized agents, local LLMs, zero commercial API. Your VPS in the jurisdiction of your choice, your data that never leaves your network. Not a promise — a real infrastructure you deploy in 4 hours.
What you'll accomplish concretely
An operational VPS in a CLOUD Act-free jurisdiction (Iceland, Switzerland, or Finland)
Hardened SSH, UFW active, Docker installed, domain configured
An encrypted WireGuard tunnel between your VPS and local machine — no open ports on local side
Via self-hosted Headscale, VPN IP 100.64.0.x
n8n orchestrator with PostgreSQL + Redis, accessible via HTTPS
Queue Mode: VPS orchestration, local execution
Ollama running on both machines with models adapted to each agent
DeepSeek-V2:16b on VPS, Qwen 2.5-Coder:32b locally
gVisor sandbox active — code generated by Dev agents runs in total isolation
--runtime=runsc, network disabled, read-only filesystem
ECHO pattern configured — every agent intent goes through risk validation before execution
LOW → auto, MEDIUM → sandbox, HIGH → human approval
All 8 agents deployed and tested — you can trigger a task and watch an agent execute it in real time
Dev, Support, Creative, Growth, Social, OPSEC, UX, Designer
Who this tutorial is for
💼
The tech entrepreneur
You want to automate repetitive tasks (support, social media, dev) without sending your data to OpenAI. You want to control costs and not depend on a third-party API.
🔐
The freelancer / consultant
You handle confidential client data. You need AI in your workflow without violating your NDAs. Self-hosting is the only clean solution.
🧑💻
The curious developer
You want to understand CrewAI, Ollama, n8n from the inside — not just use them. This tutorial explains why each technical choice was made.
The 10 tutorial chapters
Before you start
You visualize the final architecture, exact budget, and confirm prerequisites.
Why sovereign AI?
You identify the 3 concrete limits of OpenAI/Anthropic: logging, CLOUD Act, operational dependency.
OS-NEXUS architecture
You understand the role of each component (n8n, Redis, Ollama, CrewAI, gVisor) and why VPS + Local.
Choose and secure the VPS
VPS in production in a sovereign jurisdiction, hardened SSH, UFW active, Docker installed.
WireGuard VPN + Headscale
Active encrypted tunnel between VPS and local. IP 100.64.0.x. No open ports on local side.
Docker + n8n Queue Mode
n8n accessible on your domain, connected to Redis and PostgreSQL. First workflow created.
Ollama: your local LLMs
Models downloaded on VPS and local. First prompt answered without Internet.
gVisor sandbox
gVisor installed, isolation test passed. Agent-generated code = encrypted prison.
The ECHO pattern
risk_validator.js deployed in n8n. Every task classified LOW/MEDIUM/HIGH before execution.
Deploy the 8 agents
AI Gateway + orchestrator in production. First agent triggered and result received.
Verify and maintain
Verification script passed, 15-point checklist ticked. You know how to diagnose failures.
Ready? 4 hours and your AI infra is sovereign.
Every step is guided, every command is explained.
À la fin, tu as une infrastructure IA
100% sous ton contrôle.
8 agents spécialisés, LLMs locaux, zéro API commerciale. Ton VPS dans la juridiction de ton choix, tes données qui ne quittent jamais ton réseau. Pas une promesse — une infrastructure réelle que tu déploies en 4 heures.
Ce que tu vas accomplir concrètement
Tu auras un VPS opérationnel dans une juridiction hors CLOUD Act (Islande, Suisse ou Finlande)
SSH durci, UFW actif, Docker installé, domaine configuré
Un tunnel WireGuard chiffré entre ton VPS et ta machine locale — sans aucun port ouvert côté local
Via Headscale self-hosted, IP VPN 100.64.0.x
n8n orchestrateur avec PostgreSQL + Redis, accessible via HTTPS
Queue Mode : VPS orchestration, local exécution
Ollama tournant sur les deux machines avec les modèles adaptés à chaque agent
DeepSeek-V2:16b sur VPS, Qwen 2.5-Coder:32b en local
gVisor sandbox actif — le code généré par les agents Dev s'exécute en isolation totale
--runtime=runsc, réseau coupé, filesystem read-only
Le patron ECHO configuré — toute intention d'agent passe par une validation de risque avant exécution
LOW → auto, MEDIUM → sandbox, HIGH → approbation humaine
Les 8 agents déployés et testés — tu peux déclencher une tâche et voir un agent l'exécuter en temps réel
Dev, Support, Creative, Growth, Social, OPSEC, UX, Designer
Pour qui ce tutoriel est fait
💼
L'entrepreneur tech
Tu veux automatiser des tâches répétitives (support, social media, dev) sans envoyer tes données à OpenAI. Tu veux contrôler le coût et ne pas dépendre d'une API tierce.
🔐
Le freelance / consultant
Tu traites des données clients confidentielles. Tu as besoin d'IA dans ton workflow sans violer tes accords de confidentialité. L'auto-hébergement est la seule solution propre.
🧑💻
Le développeur curieux
Tu veux comprendre CrewAI, Ollama, n8n de l'intérieur — pas juste les utiliser. Ce tutoriel explique pourquoi chaque choix technique a été fait.
Tu viens de terminer le tutoriel VPN ?
Parfait — c'est exactement le point de départ recommandé. Si tu n'as pas encore de VPN souverain, commence par là (2h30, débutant friendly). Ce tutoriel IA reprend là où le VPN s'arrête.
Prérequis terminal
Si tu ne connais pas encore sudo ou ssh, un cours Linux de 2h sur YouTube te met à niveau. Ensuite reviens — chaque étape est guidée pas-à-pas.
Les 10 chapitres du tutoriel
Chaque chapitre a un objectif précis et se termine par une confirmation de résultat.
Avant de commencer
Tu visualises l'architecture finale, le budget exact et tu confirmes les prérequis.
Pourquoi l'IA souveraine ?
Tu identifies les 3 limites concrètes d'OpenAI/Anthropic : logging, CLOUD Act, dépendance opérationnelle.
L'architecture OS-NEXUS
Tu comprends le rôle de chaque composant (n8n, Redis, Ollama, CrewAI, gVisor) et pourquoi VPS + Local.
Choisir et sécuriser le VPS
VPS en production dans une juridiction souveraine, SSH durci, UFW actif, Docker installé.
VPN WireGuard + Headscale
Tunnel chiffré actif entre VPS et local. IP 100.64.0.x. Aucun port ouvert côté local.
Docker + n8n Queue Mode
n8n accessible sur ton domaine, connecté à Redis et PostgreSQL. Premier workflow créé.
Ollama : tes LLMs locaux
Modèles téléchargés sur VPS et local. Premier prompt répondu sans Internet.
Sandbox gVisor
gVisor installé, test d'isolation réussi. Code généré par agents = prison chiffrée.
Le patron ECHO
risk_validator.js déployé dans n8n. Toute tâche classifiée LOW/MEDIUM/HIGH avant exécution.
Déployer les 8 agents
AI Gateway + orchestrateur en production. Premier agent déclenché et résultat reçu.
Vérifier et maintenir
Script de vérification passé, checklist 15 points cochée. Tu sais diagnostiquer les pannes.
Prérequis
Ce qu'il te faut avant de commencer
- Un terminal fonctionnel : macOS Terminal, Linux Terminal, ou Windows WSL2
- Savoir utiliser
ssh,sudo,nanoouvim— les bases Linux - Un nom de domaine avec accès DNS (ex: via Cloudflare gratuit)
- Une machine locale avec au moins 16 Go de RAM (32 Go idéal pour les gros modèles)
- Budget : ~8-20€/mois pour le VPS selon l'hébergeur choisi
Pas de GPU requis pour commencer
Les modèles Q4 peuvent tourner sur CPU — plus lent (30-60 secondes par réponse), mais fonctionnel. Pour une utilisation intensive, un GPU NVIDIA avec 24 Go de VRAM accélère tout ×10. Ce tutoriel fonctionne sans GPU.
Prêt ? 4h et ton infra IA est souveraine.
Chaque étape est guidée, chaque commande est expliquée.