Skip to content

EthanThePhoenix38/OpenClawTuto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦞 OpenClaw Secure Kubernetes Deployment

License: MIT Kubernetes Docker Apple Silicon Security ORCID

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 OpenClaw de manière Sécurisée sur Mac Studio M3 Ultra avec Kubernetes

πŸ“‹ Γ€ propos

Ce guide complet vous accompagne pas à pas dans l'installation, la sécurisation et l'utilisation d'OpenClaw sur un Mac Studio M3 Ultra. L'architecture proposée utilise Kubernetes (k3s) pour l'isolation maximale, tout en conservant l'accès natif au GPU M3 pour les LLM locaux (Ollama, LM Studio).

🎯 Objectifs

  • βœ… DΓ©ploiement sΓ©curisΓ© avec isolation rΓ©seau complΓ¨te
  • βœ… Utilisation optimale du GPU Apple Silicon (M1/M2/M3)
  • βœ… Architecture Zero-Trust avec NetworkPolicies
  • βœ… Proxy Squid avec whitelist stricte
  • βœ… Monitoring avec Prometheus et Grafana
  • βœ… Sauvegardes automatisΓ©es avec stratΓ©gie 3-2-1
  • βœ… ConformitΓ© OWASP, CVE, RGPD, WCAG

πŸ›οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           MAC STUDIO M3 ULTRA                               β”‚
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                      KUBERNETES (k3s)                                β”‚   β”‚
β”‚  β”‚                                                                      β”‚   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚   β”‚
β”‚  β”‚  β”‚    OpenClaw     │─────▢│   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 32 GB 64-192 GB
Stockage 100 GB SSD 500 GB+ NVMe
Docker Desktop 4.25+ Dernière version
Homebrew 4.0+ Dernière version

πŸš€ Installation Rapide

git clone https://github.com/EthanThePhoenix38/Openclaw.git && cd Openclaw && ./scripts/install-k3s.sh && ./scripts/setup-ollama.sh && ./scripts/deploy-openclaw.sh && kubectl get pods -n openclaw

πŸ“š 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 OpenClaw Securely on Mac Studio M3 Ultra with Kubernetes

πŸ“‹ About

This comprehensive guide walks you through installing, securing, and using OpenClaw on a Mac Studio M3 Ultra. The proposed architecture uses Kubernetes (k3s) for maximum isolation while maintaining native M3 GPU access for local LLMs (Ollama, LM Studio).

🎯 Goals

  • βœ… Secure deployment with complete network isolation
  • βœ… Optimal use of Apple Silicon GPU (M1/M2/M3)
  • βœ… Zero-Trust architecture with NetworkPolicies
  • βœ… Squid proxy with strict whitelist
  • βœ… Monitoring with Prometheus and Grafana
  • βœ… Automated backups with 3-2-1 strategy
  • βœ… OWASP, CVE, GDPR, WCAG compliance

πŸš€ Quick Start

git clone https://github.com/EthanThePhoenix38/Openclaw.git && cd Openclaw && ./scripts/install-k3s.sh && ./scripts/setup-ollama.sh && ./scripts/deploy-openclaw.sh && kubectl get pods -n openclaw

πŸ“š 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Γ©

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    LAYER 1: Network Isolation                    β”‚
β”‚                    NetworkPolicies (deny-all + whitelist)        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 2: Proxy Control                        β”‚
β”‚                    Squid Proxy (domain whitelist)                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 3: Container Security                   β”‚
β”‚                    Non-root, read-only fs, no capabilities       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 4: Secrets Management                   β”‚
β”‚                    K8s Secrets, no hardcoded credentials         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LAYER 5: Monitoring & Audit                   β”‚
β”‚                    Prometheus, Grafana, audit logs               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Directory Structure / Structure des Dossiers

clawdbot-secure-k8s/
β”œβ”€β”€ πŸ“ docs/
β”‚   β”œβ”€β”€ πŸ“ fr/                    # Documentation franΓ§aise (24 chapitres)
β”‚   └── πŸ“ en/                    # English documentation (24 chapters)
β”œβ”€β”€ πŸ“ 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
β”‚   β”œβ”€β”€ docker-compose.yml        # Stack complΓ¨te
β”‚   β”œβ”€β”€ squid.conf                # Config proxy
β”‚   └── .env.example              # Variables template
β”œβ”€β”€ πŸ“ scripts/
β”‚   β”œβ”€β”€ install-k3s.sh            # Installation k3s
β”‚   β”œβ”€β”€ deploy-openclaw.sh        # DΓ©ploiement K8s
β”‚   β”œβ”€β”€ setup-ollama.sh           # Config Ollama
β”‚   └── backup.sh                 # Sauvegardes 3-2-1
β”œβ”€β”€ πŸ“ monitoring/
β”‚   β”œβ”€β”€ prometheus.yml            # MΓ©triques
β”‚   └── grafana-dashboard.json    # Dashboards
β”œβ”€β”€ README.md                     # Ce fichier
β”œβ”€β”€ CITATION.cff                  # Citation acadΓ©mique
β”œβ”€β”€ LICENSE                       # MIT License
└── index.html                    # GitBook viewer

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

Feature Description (FR/EN)
Zero-Trust Network Tout le trafic bloquΓ© par dΓ©faut / All traffic blocked by default
Proxy Whitelist Seuls les domaines approuvΓ©s accessibles / Only approved domains accessible
Non-root Containers Tous les containers en user non-privilΓ©giΓ© / All containers run unprivileged
Read-only Filesystem Systèmes de fichiers en lecture seule / Read-only container filesystems
No Capabilities Toutes les capabilities Linux supprimΓ©es / All Linux capabilities dropped
Secret Management Kubernetes Secrets, jamais en dur / Never hardcoded
Audit Logging Toutes les actions journalisΓ©es / All actions logged
Resource Limits Limites CPU/Memory / CPU/Memory limits prevent exhaustion

πŸ“Š 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{bernier2026openclaw,
  author = {Bernier, Ethan},
  title = {OpenClaw Secure K8s Guide},
  year = {2026},
  publisher = {GitHub},
  url = {https://github.com/EthanThePhoenix38/Openclaw}
}

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

🦞 OpenClaw Secure Kubernetes Deployment - Version 1.0.0 - 2026