Skip to content

EthanThePhoenix38/OpenClawTuto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦞 Phoenix Secure Kubernetes Deployment

License: MIT Kubernetes Docker Apple Silicon Security ORCID CVE-2026-25253

WCAG 2.1 AA Security: OWASP RGPD


πŸ’– Support This Project / Soutenir ce Projet

PayPal Ko-fi

Every contribution helps! / Chaque contribution compte ! πŸ™


πŸ‡«πŸ‡· Version FranΓ§aise | πŸ‡¬πŸ‡§ English Version


πŸ“– Table of Contents / Sommaire


πŸ‡«πŸ‡· Guide Complet (FR)

Déployer Phoenix de manière Sécurisée sur Mac Studio M3 Ultra

πŸ“‹ Γ€ propos

Ce guide complet vous accompagne pas à pas dans l'installation, la sécurisation et l'utilisation d'Phoenix sur un Mac Studio M3 Ultra. L'architecture propose 3 modes de déploiement (local, k3d, cloud Koyeb) avec une installation one-click via un script d'onboarding interactif, tout en conservant l'accès natif au GPU M3 pour les LLM locaux (Ollama, LM Studio).

⚠️ Sécurité : Cette configuration intègre les correctifs post-CVE-2026-25253 (RCE critique, CVSS 8.8). Image minimale requise : 2026.1.29.

🎯 Objectifs

  • βœ… Installation one-click : script d'onboarding interactif (setup.sh)
  • βœ… 3 profils de dΓ©ploiement : local (Docker), k3d (Zero-Trust), cloud (Koyeb)
  • βœ… DΓ©ploiement ultra-sΓ©curisΓ© post-CVE-2026-25253
  • βœ… Utilisation optimale du GPU Apple Silicon (M1/M2/M3)
  • βœ… Architecture Zero-Trust avec proxy Squid whitelist (mode k3d)
  • βœ… Monitoring avec Prometheus et Grafana (mode k3d)
  • βœ… Sauvegardes automatisΓ©es avec stratΓ©gie 3-2-1
  • βœ… ConformitΓ© OWASP, CVE, RGPD, WCAG
  • βœ… Token d'authentification gateway obligatoire
  • βœ… Containers non-root, read-only, PID limits

πŸ›οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           MAC STUDIO M3 ULTRA                               β”‚
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                      KUBERNETES (k3s)                                β”‚   β”‚
β”‚  β”‚                                                                      β”‚   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚   β”‚
β”‚  β”‚  β”‚    Phoenix     │─────▢│   Squid Proxy   │─────▢ Internet        β”‚   β”‚
β”‚  β”‚  β”‚     :18789      β”‚      β”‚     :3128       β”‚      (whitelist)      β”‚   β”‚
β”‚  β”‚  β”‚   (IsolΓ©)       β”‚      β”‚  (Whitelist)    β”‚                       β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚   β”‚
β”‚  β”‚           β”‚                                                          β”‚   β”‚
β”‚  β”‚           β”‚ host.docker.internal                                     β”‚   β”‚
β”‚  β”‚           β–Ό                                                          β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚              β”‚                                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                                  β”‚
β”‚  β”‚       OLLAMA         │◀── GPU Metal (192GB Unified Memory)              β”‚
β”‚  β”‚       :11434         β”‚                                                  β”‚
│  │   (Natif macOS)      │    Modèles: Llama 3.1 70B, Qwen, Mistral...     │
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                                  β”‚
β”‚                                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ PrΓ©requis

Composant Version Minimum RecommandΓ©
macOS 13.0 (Ventura) 14.0+ (Sonoma)
RAM 8 GB (Docker) 64-192 GB (LLM locaux)
Stockage 100 GB SSD 500 GB+ NVMe
Docker Desktop 4.25+ Dernière version
Ollama 0.3+ (optionnel) Dernière version
Phoenix β‰₯ 2026.1.29 2026.1.30

πŸš€ Installation Rapide (One-Click)

# 1. Cloner le projet
git clone https://github.com/EthanThePhoenix38/Phoenix.git && cd Phoenix

# 2. Lancer l'onboarding interactif (génère .env + lance la stack)
./scripts/setup.sh

Le script setup.sh vous guide Γ  travers :

  1. VΓ©rification des prΓ©requis (Docker, RAM, architecture)
  2. Choix du profil : 🏠 local Β· πŸ›‘οΈ k3d Β· ☁️ koyeb
  3. Configuration sΓ©curitΓ© (token gateway, auth, sandbox)
  4. ClΓ©s API (Anthropic, OpenAI, Google, Mistral)
  5. Lancement automatique de la stack

Installation manuelle

cd docker
cp .env.example .env
# Γ‰diter .env (OBLIGATOIRE : changer PHOENIX_GATEWAY_TOKEN et GRAFANA_PASSWORD)
docker compose --profile <local|k3d|koyeb> up -d

πŸ”„ Profils de DΓ©ploiement

Profil Usage Proxy Squid LLM Locaux Monitoring API Keys
🏠 local Dev / Usage personnel ❌ βœ… Ollama, LM Studio ❌ Optionnelles
πŸ›‘οΈ k3d Production locale / Zero-Trust βœ… Whitelist stricte βœ… Ollama, LM Studio βœ… Prometheus + Grafana Optionnelles
☁️ koyeb Cloud Koyeb ❌ ❌ ❌ Obligatoires

πŸ“š Documentation ComplΓ¨te

πŸ“– Ouvrir le guide interactif (GitBook-style viewer)

Partie Chapitres Description
Partie 1 Chapitres 1-5 Fondations : Introduction, PrΓ©requis, Architecture
Partie 2 Chapitres 6-10 Kubernetes : Installation k3s, Namespaces, Pods
Partie 3 Chapitres 11-15 SΓ©curitΓ© : NetworkPolicies, Secrets, Proxy Squid
Partie 4 Chapitres 16-20 OpΓ©rations : Monitoring, Alertes, Sauvegardes
Partie 5 Chapitres 21-24 AvancΓ© : HA, Scaling, Troubleshooting
Annexes A-C Glossaire, Commandes, Ressources

πŸ‡¬πŸ‡§ Complete Guide (EN)

Deploy Phoenix Securely on Mac Studio M3 Ultra

πŸ“‹ About

This comprehensive guide walks you through installing, securing, and using Phoenix on a Mac Studio M3 Ultra. The architecture provides 3 deployment profiles (local, k3d, cloud Koyeb) with a one-click interactive onboarding script, while maintaining native M3 GPU access for local LLMs (Ollama, LM Studio).

⚠️ Security: This configuration includes post-CVE-2026-25253 hardening (critical RCE, CVSS 8.8). Minimum image version: 2026.1.29.

🎯 Goals

  • βœ… One-click installation: interactive onboarding script (setup.sh)
  • βœ… 3 deployment profiles: local (Docker), k3d (Zero-Trust), cloud (Koyeb)
  • βœ… Ultra-secure deployment post-CVE-2026-25253
  • βœ… Optimal use of Apple Silicon GPU (M1/M2/M3)
  • βœ… Zero-Trust architecture with Squid proxy whitelist (k3d mode)
  • βœ… Monitoring with Prometheus and Grafana (k3d mode)
  • βœ… Automated backups with 3-2-1 strategy
  • βœ… OWASP, CVE, GDPR, WCAG compliance
  • βœ… Mandatory gateway authentication tokens
  • βœ… Non-root containers, read-only fs, PID limits

πŸš€ Quick Start (One-Click)

# 1. Clone the project
git clone https://github.com/EthanThePhoenix38/Phoenix.git && cd Phoenix

# 2. Run the interactive onboarding (generates .env + launches the stack)
./scripts/setup.sh

The setup.sh script guides you through:

  1. Prerequisites check (Docker, RAM, architecture)
  2. Profile selection: 🏠 local Β· πŸ›‘οΈ k3d Β· ☁️ koyeb
  3. Security configuration (gateway token, auth, sandbox)
  4. API keys (Anthropic, OpenAI, Google, Mistral)
  5. Automatic stack launch

πŸ”„ Deployment Profiles

Profile Use Case Squid Proxy Local LLMs Monitoring API Keys
🏠 local Dev / Personal use ❌ βœ… Ollama, LM Studio ❌ Optional
πŸ›‘οΈ k3d Local production / Zero-Trust βœ… Strict whitelist βœ… Ollama, LM Studio βœ… Prometheus + Grafana Optional
☁️ koyeb Koyeb cloud ❌ ❌ ❌ Required

πŸ“š Full Documentation

πŸ“– Open interactive guide (GitBook-style viewer)

Part Chapters Description
Part 1 Chapters 1-5 Foundations: Introduction, Prerequisites, Architecture
Part 2 Chapters 6-10 Kubernetes: k3s Installation, Namespaces, Pods
Part 3 Chapters 11-15 Security: NetworkPolicies, Secrets, Squid Proxy
Part 4 Chapters 16-20 Operations: Monitoring, Alerts, Backups
Part 5 Chapters 21-24 Advanced: HA, Scaling, Troubleshooting

πŸ—οΈ Architecture

Security Layers / Couches de SΓ©curitΓ© (v2.0 β€” post-CVE-2026-25253)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    LAYER 0: Authentication                       β”‚
β”‚                    Gateway Token (mandatory), mDNS off           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 1: Network Isolation                    β”‚
β”‚                    Bind 127.0.0.1, NetworkPolicies (k3d)        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 2: Proxy Control (k3d only)             β”‚
β”‚                    Squid Proxy (domain whitelist)                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 3: Container Security                   β”‚
β”‚                    Non-root, read-only fs, PID limits, no caps  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 4: Secrets Management                   β”‚
β”‚                    .env (chmod 600), no hardcoded credentials    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 5: Sandbox Isolation                    β”‚
β”‚                    Per-agent sandbox, non-main thread            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 6: Monitoring & Audit (k3d)             β”‚
β”‚                    Prometheus, Grafana, security audit --deep    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Directory Structure / Structure des Dossiers

PhoenixBook/
β”œβ”€β”€ πŸ“ book/                      # Documentation (24 chapitres)
β”‚   β”œβ”€β”€ πŸ“ fr/                    # Documentation franΓ§aise
β”‚   └── πŸ“ en/                    # English documentation
β”œβ”€β”€ πŸ“ kubernetes/
β”‚   β”œβ”€β”€ namespace.yaml            # Namespace isolΓ©
β”‚   β”œβ”€β”€ deployment.yaml           # Deployment sΓ©curisΓ©
β”‚   β”œβ”€β”€ service.yaml              # Services ClusterIP
β”‚   β”œβ”€β”€ configmap.yaml            # Configurations
β”‚   β”œβ”€β”€ secrets.yaml              # Template secrets
β”‚   └── network-policy.yaml       # Policies Zero-Trust
β”œβ”€β”€ πŸ“ docker/
β”‚   β”œβ”€β”€ Dockerfile                # Multi-stage build sΓ©curisΓ©
β”‚   β”œβ”€β”€ docker-compose.yml        # Stack multi-profil (local/k3d/koyeb)
β”‚   β”œβ”€β”€ squid.conf                # Config proxy whitelist (k3d)
β”‚   β”œβ”€β”€ .env.example              # Template config ultra-sΓ©curisΓ©
β”‚   └── .env.koyeb                # RΓ©fΓ©rence config cloud Koyeb
β”œβ”€β”€ πŸ“ scripts/
β”‚   β”œβ”€β”€ setup.sh                  # πŸš€ Onboarding one-click interactif
β”‚   β”œβ”€β”€ install-k3s.sh            # Installation k3s
β”‚   β”œβ”€β”€ deploy-phoenix.sh        # DΓ©ploiement K8s
β”‚   β”œβ”€β”€ setup-ollama.sh           # Config Ollama
β”‚   └── backup.sh                 # Sauvegardes 3-2-1
β”œβ”€β”€ πŸ“ PRODUCTION/                # Fichiers de production
β”œβ”€β”€ πŸ“ assets/                    # Assets (images, etc.)
β”œβ”€β”€ README.md                     # Ce fichier
β”œβ”€β”€ CHANGELOG.md                  # Historique des changements
β”œβ”€β”€ CITATION.cff                  # Citation acadΓ©mique
β”œβ”€β”€ LICENSE                       # MIT License
└── index.html                    # GitBook viewer interactif

πŸ›‘οΈ Security Features / FonctionnalitΓ©s de SΓ©curitΓ©

πŸ”’ Configuration conforme aux recommandations post-CVE-2026-25253 (CSRF β†’ RCE, CVSS 8.8)

Feature Description (FR/EN) Profil
Gateway Auth Token Token obligatoire pour toute connexion / Mandatory token for all connections Tous
mDNS Disabled DΓ©couverte rΓ©seau dΓ©sactivΓ©e / Network discovery disabled Tous
Secure Control UI Auth non-sΓ©curisΓ©e interdite / Insecure auth disabled Tous
Bind localhost Port exposΓ© uniquement sur 127.0.0.1 / Port bound to localhost only local, k3d
DM Pairing Couplage sΓ©curisΓ© obligatoire / Secure pairing required Tous
Zero-Trust Network Trafic bloquΓ© par dΓ©faut / All traffic blocked by default k3d
Proxy Whitelist Seuls les domaines approuvΓ©s accessibles / Only approved domains accessible k3d
Non-root Containers User non-privilΓ©giΓ© (UID 1000) / Unprivileged user (UID 1000) Tous
Read-only Filesystem FS en lecture seule + tmpfs ciblΓ©s / Read-only fs + targeted tmpfs Tous
No Capabilities cap_drop: ALL + no-new-privileges / All capabilities dropped Tous
PID Limits Anti fork-bomb (256 PIDs) / Fork bomb protection Tous
Sandbox Isolation Scope per-agent, thread non-main / Per-agent scope, non-main thread Tous
Secret Management .env chmod 600, jamais en dur / Never hardcoded, restricted permissions Tous
Audit Logging phoenix security audit --deep / Deep security audit Tous
Resource Limits CPU/Memory/PID limits / Prevent resource exhaustion Tous

πŸ“Š Monitoring

Prometheus & Grafana

# AccΓ©der Γ  Prometheus / Access Prometheus
kubectl port-forward -n monitoring svc/prometheus 9090:9090

# AccΓ©der Γ  Grafana / Access Grafana
kubectl port-forward -n monitoring svc/grafana 3000:3000

πŸ“š Citation

Si vous utilisez ce guide, merci de le citer / If you use this guide, please cite it:

@misc{bernier2026phoenix,
  author = {Bernier, Ethan},
  title = {Phoenix Secure K8s Guide},
  year = {2026},
  publisher = {GitHub},
  url = {https://github.com/EthanThePhoenix38/Phoenix}
}

Voir CITATION.cff pour plus de dΓ©tails.


🀝 Contributing / Contribuer

Les contributions sont bienvenues ! / Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“œ License / Licence

This project is licensed under the MIT License - see the LICENSE file for details.

Ce projet est sous licence MIT - voir le fichier LICENSE pour plus de dΓ©tails.


πŸ‘€ Author / Auteur

Ethan Bernier


πŸ’– Support / Soutenir

Ce guide est gratuit et open source. Si vous le trouvez utile :

This guide is free and open source. If you find it useful:

Platform Link
β˜• Ko-fi ko-fi.com/EthanThePhoenix
πŸ’³ PayPal paypal.me/VanessaBernier
⭐ GitHub Star this repo! / Donnez une étoile !

PayPal Ko-fi


πŸ”— Resources / Ressources


Made with ❀️ by Ethan Bernier

🦞 Phoenix Secure Kubernetes Deployment - Version 1.0.0 - 2026