# Installation complète de Glances Web avec Docker (Debian 12 / Proxmox) Ce guide décrit une installation **PRODUCTION READY** de **Glances Web** via **Docker**. Aucune dépendance Python, aucune limitation PEP 668. Recommandé pour **Proxmox / Debian 12 / serveurs headless**. --- ## 1. Prérequis Docker ```bash apt update apt install -y ca-certificates curl gnupg curl -fsSL https://get.docker.com | sh systemctl enable --now docker ``` Test : ```bash docker run hello-world ``` --- ## 2. Arborescence recommandée ```bash mkdir -p /opt/glances cd /opt/glances ``` --- ## 3. Fichier de configuration Glances (custom) ```bash mkdir -p /opt/glances/config nano /opt/glances/config/glances.conf ``` Exemple : ```ini [global] refresh=2 check_update=false [cpu] hide=false [mem] hide=false [disk] hide=false [diskio] hide=false [network] hide=false [docker] hide=false ``` --- ## 4. Lancer Glances Web (FULL FEATURES) ```bash docker run -d \ --name glances \ --pid host \ --privileged \ -p 61208:61208 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /opt/glances/config:/glances/conf \ --restart unless-stopped \ nicolargo/glances ``` Accès : ``` http://IP_DU_SERVEUR:61208 ``` --- ## 5. Variables utiles | Variable | Description | |-------|------------| | GLANCES_OPT | Options glances | | -w | Mode Web | | -p | Port custom | | -B | Bind IP | Exemple : ```bash -e GLANCES_OPT="-w -p 61209 -B 0.0.0.0" ``` --- ## 6. Docker Compose (optionnel) ```bash nano /opt/glances/docker-compose.yml ``` ```yaml version: "3.9" services: glances: image: nicolargo/glances container_name: glances pid: host privileged: true ports: - "61208:61208" volumes: - /var/run/docker.sock:/var/run/docker.sock - /opt/glances/config:/glances/conf environment: - GLANCES_OPT=-w restart: unless-stopped ``` Lancer : ```bash docker compose up -d ``` --- ## 7. Logs & debug ```bash docker logs glances docker inspect glances ``` --- ## 8. Sécurité (recommandé) - Restreindre le port via firewall - Mettre Glances derrière Nginx - Ajouter authentification HTTP --- ## 9. Bonnes pratiques - ✅ Docker = méthode la plus stable - ❌ Pas de Python système - ❌ Pas de pip - ⭐ Recommandé sur Proxmox --- ## 10. Accès final ``` http://IP_DU_SERVEUR:61208 ``` --- FIN.