86 lines
5.2 KiB
Markdown
86 lines
5.2 KiB
Markdown
# Hermes Hub — Déploiement et Exploitation Multi-Univers sur VPS
|
|
|
|
**Instance auteur** : gemini / nabil
|
|
**Date** : 2026-08-20
|
|
**Tags** : hermes, hub, multi-univers, vps, tailscale, cloudflare-access, fastapi, subdomains, filebrowser, dsh
|
|
**Statut** : valide (testé et vérifié en direct sur VPS Contabo avec chargement effectif des bundles JS)
|
|
|
|
---
|
|
|
|
## Problème
|
|
|
|
Nabil dispose de 4 instances Hermes strictement cloisonnées :
|
|
- **TT** (`hermes-tt`, port 3010, NAS Synology) — Achats Zone Sud, Tunisie Telecom
|
|
- **Nyora** (`hermes-nyora`, port 3020, NAS Synology) — Venture perso, Dr Nexum
|
|
- **Perso** (`hermes-perso`, port 3031, NAS Synology) — Famille, personnel, santé
|
|
- **Nabil** (`hermes-nabil`, port 9119, VPS Contabo) — Master agent & DeepSeek Harness (DSH)
|
|
|
|
L'objectif est d'offrir une interface web unifiée sur le VPS Contabo (`100.94.90.119`) avec :
|
|
1. Un **Workspace Switcher** latéral fluide et étanche entre les 4 univers.
|
|
2. Un **Sélecteur Toggle DSH** (conception Claude Design) pour basculer instantanément entre la session et l'explorateur de fichiers DSH (`https://dsh.hub.yesminedor.tn/`).
|
|
3. L'absence totale de fuite de contexte, de mémoire JS ou de cookies de session entre univers.
|
|
4. La résolution 100% native des assets absolus (`/assets/main-*.js`) via un routage par **sous-domaine dédié** (`*.hub.yesminedor.tn`).
|
|
5. La sécurisation intégrale via **Cloudflare Access** (OTP Email + 2FA) et maillage **Tailscale** sans exposition de port WAN sur le NAS ni d'IP publique directe sur le VPS.
|
|
|
|
---
|
|
|
|
## Contexte et Architecture
|
|
|
|
- **Routage par Sous-Domaine** :
|
|
- `hub.yesminedor.tn` : Shell du Workspace Switcher (UI d'orchestration)
|
|
- `tt.hub.yesminedor.tn` : Proxy direct vers Hermes TT (`http://100.86.197.88:3010`)
|
|
- `nyora.hub.yesminedor.tn` : Proxy direct vers Hermes Nyora (`http://100.86.197.88:3020`)
|
|
- `perso.hub.yesminedor.tn` : Proxy direct vers Hermes Perso (`http://100.86.197.88:3031`)
|
|
- `nabil.hub.yesminedor.tn` : Proxy direct vers Hermes Nabil (`http://hermes-nabil:9119`)
|
|
- `dsh.hub.yesminedor.tn` : Proxy direct vers Filebrowser DSH (`http://dsh-vps-filebrowser:8080`)
|
|
- **Réseaux Docker VPS** :
|
|
- `hermes-hub` est raccordé à `mcp-vps` (joignable par `cloudflared-mcp-vps` sur `http://hermes-hub:8080`) et à `dsh_vps_net` (pour joindre `dsh-vps-filebrowser` et `hermes-nabil`).
|
|
|
|
---
|
|
|
|
## Actions Cloudflare (À configurer par Nabil)
|
|
|
|
### 1. Cloudflare Tunnel (`mcp-vps`) — Public Hostnames
|
|
Pointer le wildcard ou les 6 hostnames vers `http://hermes-hub:8080` :
|
|
- `*.hub.yesminedor.tn` -> `HTTP` : `hermes-hub:8080`
|
|
*(Ou séparément : `hub.yesminedor.tn`, `tt.hub.yesminedor.tn`, `nyora.hub.yesminedor.tn`, `perso.hub.yesminedor.tn`, `nabil.hub.yesminedor.tn`, `dsh.hub.yesminedor.tn`)*
|
|
|
|
### 2. Cloudflare Access Application
|
|
- **Domain** : `*.hub.yesminedor.tn` et `hub.yesminedor.tn`
|
|
- **Policy** : Allow Email OTP (`nabil.derouiche@...`)
|
|
- **Bénéfice** : Un seul écran de connexion pour l'ensemble des 4 univers et de l'explorateur DSH.
|
|
|
|
---
|
|
|
|
## Preuves Directes de Fonctionnement
|
|
|
|
```python
|
|
# Test exécuté depuis linux-mcp-vps via le réseau interne mcp-vps :
|
|
PROVEN OK [HTTP 200] | Host: hub.yesminedor.tn | Main Hub Switcher UI | text/html; charset=utf-8 | 9385 bytes
|
|
PROVEN OK [HTTP 200] | Host: tt.hub.yesminedor.tn | Universe TT Root HTML | text/html; charset=utf-8 | 11026 bytes
|
|
PROVEN OK [HTTP 200] | Host: tt.hub.yesminedor.tn | Universe TT Main JS Bundle | application/javascript | 2039429 bytes
|
|
PROVEN OK [HTTP 200] | Host: nyora.hub.yesminedor.tn | Universe Nyora Root HTML | text/html; charset=utf-8 | 11026 bytes
|
|
PROVEN OK [HTTP 200] | Host: perso.hub.yesminedor.tn | Universe Perso Root HTML | text/html; charset=utf-8 | 11026 bytes
|
|
PROVEN OK [HTTP 200] | Host: nabil.hub.yesminedor.tn | Universe Nabil Root HTML | text/html; charset=utf-8 | 10045 bytes
|
|
PROVEN OK [HTTP 200] | Host: dsh.hub.yesminedor.tn | DSH Filebrowser Root HTML | text/html; charset=utf-8 | 6112 bytes
|
|
```
|
|
|
|
---
|
|
|
|
## Investigation Problème 2 : Mur d'authentification interne Hermes Nabil
|
|
|
|
### Analyse du code source de `hermes_cli/web_server.py`
|
|
Dans le binaire officiel Hermes Agent (Nous Research) :
|
|
```python
|
|
def should_require_auth(host: str, allow_public: bool = False) -> bool:
|
|
return host not in ("127.0.0.1", "localhost", "::1")
|
|
```
|
|
|
|
- **Comportement natif** :
|
|
- Si `host == "127.0.0.1"` : Le dashboard désactive le mur de login OAuth/Password (`auth_required = False`).
|
|
- Si `host != "127.0.0.1"` (ex: `0.0.0.0` pour être joint via le bridge Docker) : Le dashboard enclenche **obligatoirement** le gate de login (`auth_required = True`) avec une mire Nous Research / Basic Auth.
|
|
- **Désactivation d'auth native** : Le flag `--insecure` est expressément ignoré et déprécié depuis le durcissement de juin 2026 (`hermes-0day patch`).
|
|
- **Solutions envisageables pour Nabil** :
|
|
1. **Option A (Recommandée)** : Définir un compte Basic Auth unique via `HERMES_DASHBOARD_BASIC_AUTH_USERNAME=nabil` et `HERMES_DASHBOARD_BASIC_AUTH_PASSWORD=...` dans l'environnement de `hermes-nabil`.
|
|
2. **Option B (Hermes Workspace)** : Déployer le conteneur `hermes-workspace` (identique à TT, Nyora, Perso) devant `hermes-nabil` sur le port interne de l'agent.
|