# Youssef's Homelab Context Document

Generated: 2026-04-05 | Last updated: 2026-11-26
Source: Perplexity Homelab Space (historical baseline) + ongoing YB Homelab maintenance

---

## 1. Demographics

| Field | Detail |
|-------|--------|
| Name | ******** |
| Email | ******** |
| Cloudflare Access Domain | youssefbouanani.com |
| Location | Casablanca, Morocco |
| ISP | IAM (Maroc Telecom) 200 Mbps Fiber (188–198 Mbps actual) |
| Vehicle | Tesla Model 3 "Tessy the beast" – 32,611 km, FW 2026.2.9.1 |
| Blog | blog.smarthomes.ma (Ghost) |
| Work | Corporate laptop HP EliteDesk with Zscaler; MeshCentral for remote access workaround |
| Subscriptions | Perplexity Max (Apr 2026), Google Gemini Pro (Sep 2026 expiry) |

### Family
- Brother: ********
- Family members: ********
- Parents: ********

-Family detail: ********

## 2. Active Projects & Interests

### Infrastructure
- **Hypervisor**: Two-node Proxmox cluster with GCP qdevice. `pve` (192.168.68.122, Lenovo M920x) hosts core infrastructure including local PBS VM110, Docker-Infra VM122, AdGuard primary CT114 and the backup Tailscale subnet router CT113. `NAS` (192.168.68.123, HP EliteDesk 800 G4) hosts TrueNAS VM102, Docker-Apps VM121, Zorin VM104 and AdGuard secondary CT115. Legacy Docker CT111/CT117 remain powered off temporarily as rollback.
- **Storage**: TrueNAS Scale (VM 102 on NAS node, boot disk on local-lvm), Pool Bolt 18% of 1.8TiB (set up currently as single drive — mirroring deferred, planned as part of full homelab revamp), Pool Tank 39% of 10.8TiB - this is a mirrored 2x12TB drives pool for storage and media. Pool Bolt = 1.8 TiB; Pool Tank = 10.8 TiB
- **Backup**: Local PBS VM110 runs on the main `pve` node. Additional PBS targets are Tuxis and RemoteBackups; `backupsOnNas` provides local NAS-backed PBS storage; `Cold-Backups` is the physically-offline monthly USB PBS tier.
- **NVMe health**: Main PVE WDC PC SN730 256 GB is at 68% Percentage Used; NAS-node KIOXIA KBG30ZMV256G 256 GB is at 51%. Both currently report 100% Available Spare and zero Media/Data Integrity Errors. Daily SMART/write-rate monitoring with Gotify threshold alerts was deployed on both Proxmox nodes 2026-10-09. Replacement TLC NVMe planning is active.

### Hardware
- HARDWARE: HP EliteDesk G4 800 SFF with vPro for NAS proxmox node, Lenovo M920x tinnyPC with vPro for PVE proxmox Node

| Node | Hardware | CPU | RAM | Role |
|------|----------|-----|-----|------|
| M920x (PVE node) | Lenovo ThinkCentre M920x Tiny | i5-8500T 6c/6t 35W | 32 GB DDR4-2666 | Proxmox host: VMs & LXCs |
| HP G4 (NAS node) | HP EliteDesk 800 G4 SFF | i5-8500 6c/6t 65W | 48 GB DDR4-2666 | Proxmox host: TrueNAS VM & storage |
| GCP e2-micro | Google Cloud | Shared vCPU | 1 GB | Public-facing tunnel endpoint |
| M920q (spare) | Lenovo ThinkCentre M920q Tiny | i5-8500T 6c/6t 35W | 32 GB DDR4-2666 | Cold standby (not set up) |
| Brother PVE | ********'s node | — | — | 192.168.50.x |

### HP G4 NAS Node Exact Storage Layout

| Device | Drive | Size | Wear | Owner | Role |
|--------|-------|------|------|-------|------|
| /dev/sda | MSI S270 240GB | 240 GB SATA SSD | N/A | **Proxmox Host** | **BOOT DRIVE** (`/boot/efi`, `pve-root`, `local-lvm`). Hosts the TrueNAS VM102 boot disk and local Proxmox storage. Former AI LXC109 has been deleted. |
| /dev/nvme0n1 | KIOXIA KBG30ZMV256G | 256 GB | **51%** | Proxmox Host | **Zpool ZFS datastore**. Hosts Docker-Apps VM121, Zorin VM104, AdGuard secondary CT115 and replication/rollback datasets. SMART passes; replacement with TLC NVMe planned. |
| /dev/nvme1n1 | Samsung 990 EVO Plus | 2 TB | 0% | TrueNAS VM | Bolt pool (PCIe passthrough). TrueNAS system dataset + ALL Docker app volumes. |
| /dev/sdb | Seagate ST12000NE0008 | 12 TB HDD | N/A | TrueNAS VM | Tank pool drive 1 (passthrough). Mirrored with /dev/sdc. |
| /dev/sdc | Seagate ST12000NM001G | 12 TB HDD | N/A | TrueNAS VM | Tank pool drive 2 (passthrough). Mirrored with /dev/sdb. |

> **Key rule**: The Samsung 990 EVO Plus (Bolt) and both Seagate HDDs (Tank) are passed through directly to the TrueNAS VM. Proxmox has no visibility into them. New LXCs and VMs land on either the KIOXIA Zpool (being replaced) or the MSI 240 GB SATA SSD (local-lvm).

### HP G4 NAS Node Boot Drive Layout (MSI S270 240GB — /dev/sda)

sda (MSI S270 240GB) — PROXMOX BOOT DRIVE
├─ sda1 1007K BIOS boot
├─ sda2 1G vfat /boot/efi
└─ sda3 222.6G LVM2\_member
  ├─ pve-root 65.6G ext4 / ← Proxmox root
  ├─ pve-swap 8G swap
  ├─ pve-data 130.3G ← local-lvm thin pool
  ├─ pve-vm-102 32G ← TrueNAS boot disk (migrated from Zpool Apr 2026)
  ├─ pve-vm-104 32G ← Zorin OS disk

### HP G4 NAS Node Zpool Contents (KIOXIA 256GB — /dev/nvme0n1)

Current role: active Proxmox ZFS datastore on the NAS node.

Verified current datasets/zvols on 2026-10-09:

| Dataset/Zvol | Allocated | Role |
|---|---:|---|
| `Zpool/vm-121-disk-1` | 65.0 GB | **Docker-Apps VM121 primary disk — ACTIVE** |
| `Zpool/vm-121-disk-0` | 3 MB | VM121 auxiliary disk |
| `Zpool/vm-104-disk-0` | 32.5 GB | **Zorin VM104 — ACTIVE** |
| `Zpool/subvol-115-disk-0` | 410 MB | **AdGuard secondary CT115 — ACTIVE** |
| `Zpool/subvol-103-disk-1` | 2.35 GB | Jellyfin CT103 replication target |
| `Zpool/subvol-106-disk-0` | 4.38 GB | MeshCentral CT106 replication target |
| `Zpool/subvol-111-disk-1` | 7.75 GB | Legacy CT111 replication/rollback dataset |
| **Zpool total allocated** | **~112 GB** | Pool ONLINE |

The drive is **not** the TrueNAS boot disk and does **not** host PBS VM110.
PBS VM110 runs on the main `pve` node.

SMART baseline on 2026-10-09:
- Percentage Used: **51%**
- Available Spare: **100%**
- Data Units Written: approximately **35.1 TB**
- Media/Data Integrity Errors: **0**
- Overall health: **PASSED**
- Replacement with a TLC NVMe is planned.

### HP G4 TrueNAS ZFS Pools

| Pool | Drives | Usable | Redundancy | Contents |
|------|--------|--------|------------|----------|
| Bolt | 1× Samsung 990 EVO Plus 2 TB | 1.8 TiB | NONE (single drive — mirroring deferred to homelab revamp) | TrueNAS system dataset. ALL Docker app volumes (Immich DB/thumbs/ML/originals, Nextcloud, Radarr, Sonarr, NZBGet, Jellyseer, Audiobookshelf, Calibre, Kavita, Photodrop). |
| Tank | 2× Seagate 12 TB HDD (mirror) | 10.8 TiB | Mirror (survives 1 drive loss) | Bulk media storage. Snapshot replication targets. PBS backup storage. 39% used (~4.2 TiB). Target destination for Immich originals post-migration. |

### HP G4 Available Slots and Expansion

| Slot/Bay | Type | Status | Notes |
|----------|------|--------|-------|
| M.2 slot 1 | PCIe x4 2280 NVMe | Occupied | Samsung 990 EVO Plus 2 TB. The Bolt pool drive. Passed through to TrueNAS. |
| M.2 slot 2 | PCIe x4 2280 NVMe | **EMPTY — target for new NVMe** | Install new 512 GB–1 TB TLC NVMe here. Becomes new Zpool data storage (replacing KIOXIA). Replacement on order. |
| 2.5" SATA bay | SATA III | Occupied | MSI S270 240 GB SSD. **Proxmox boot drive** + local-lvm. |
| PCIe x16 (wired x4) | PCIe 3.0 | Empty | Available for GPU, HBA, or NVMe adapter if needed. |
| PCIe x1 (2 slots) | PCIe 3.0 x1 | Empty | Could host SATA expansion card (not recommended). |

> **Fikwot 512 GB SATA SSD note**: The HP G4's second M.2 slot is NVMe-only (PCIe), not SATA M.2. The Fikwot is a 2.5" SATA drive and the 2.5" bay is already taken by the MSI SSD. The Fikwot cannot be used inside the HP G4 without a PCIe-to-SATA card (not recommended). Keep as cold spare.

### M920x PVE Node Storage

| Storage | Type | Size | Role |
|---------|------|------|------|
| Zpool | ZFS (NVMe PCIe onboard) | ~238 GB usable | Proxmox Zpool – all VM/LXC disks |

> M920x Tiny has one M.2 slot only. No expansion bays. Both nodes use "Zpool" as the storage backend name — this enables seamless cross-node VM/LXC migration.

### Networking
- **Topology**: IAM ISP NOKIA Fiber router → Asus RT-AX58U v2 (Main Router with Gnuton's Merlin firmware + Tailmon on USB 3.0) → 2×5 ports GBE TP-Link switches → TP-Link Deco S4 APs (3 APs connected through Ethernet cables). Subnet 192.168.68.0/24. Brother (********) Subnet 192.168.50.0/24.
- ISP Router → Asus RT-AX58U v2 (Gnuton's Merlin) → TP-Link Deco S4 APs (AP mode)
- **Local Subnet**: 192.168.68.0/24
- **Brother Subnet**: 192.168.50.0/24
- **DNS**: Dedicated AdGuard Home pair: CT114 primary at `192.168.68.10` and CT115 secondary at `192.168.68.11`. ASUS DHCP distributes both. Both Proxmox hosts plus Docker-Apps VM121 and Docker-Infra VM122 now use `.10/.11`. The former Docker-hosted AdGuard instance on `.36` is retired.
- **Reverse Proxy**: Nginx Proxy Manager runs on Docker-Infra VM122 at `192.168.68.36` (admin `:81`; HTTP/HTTPS `:80/:443`). ASUS WAN TCP 80/443 continues forwarding to `.36`.
- **Public Access**: Cloudflare Tunnel + Zero Trust + Authentik OIDC for most services. Four large-file/streaming services intentionally bypass the Cloudflare reverse proxy via DNS-only records to `origin.youssefbouanani.com`.
- **Direct origin**: `origin.youssefbouanani.com` → A `********` (**DNS only**). `photos`, `photodrop`, `nextcloud`, and `media` are DNS-only CNAMEs to `origin`.
- **WAN/NAT**: Asus WAN IPv4 `********`; TCP 80 → `********:80`, TCP 443 → `********:443`.
- **VPN**: Privado VPN on Asus router (speed issues noted ~10 Mbps)
- **Remote Access**: Tailscale mesh (all devices). Asus RT-AX58U v2 with Tailmon is the primary Tailscale subnet router advertising `192.168.68.0/24`. A dedicated minimal unprivileged Debian LXC on the main PVE Proxmox node provides high-availability backup subnet routing for the same `192.168.68.0/24`. GCP VPS (e2-micro, IP 35.211.62.198, Tailscale 100.86.11.23) remains available as an exit node. Direct Asus WAN administration/SSH remains disabled.

#### Tailscale High-Availability Subnet Routing
- **Primary subnet router**: Asus RT-AX58U v2 running Tailmon/Tailscale. Advertises `192.168.68.0/24`.
- **Secondary subnet router**: Dedicated minimal unprivileged Debian LXC on the main `pve` Proxmox node. Advertises the same `192.168.68.0/24` for Tailscale high availability.
- The Debian LXC has `/dev/net/tun` passed through from Proxmox, IPv4 forwarding enabled, and Tailscale configured with `--accept-dns=false` and `--accept-routes=false`.
- The backup LXC is configured to start automatically with the Proxmox host.
- **Failover tested successfully on 2026-10-05**: with Tailscale/Tailmon on the Asus unavailable, remote Tailscale clients retained access to the home LAN through the Debian LXC.
- During failover, the Asus remains reachable at `192.168.68.1`, including SSH access for troubleshooting/restarting Tailmon or other router services.
- **Security rule**: Do not expose the Asus administration GUI or SSH directly to the Internet. The redundant Tailscale subnet-router path is the preferred remote recovery method.
- Limitation: this protects against Tailmon/Tailscale failure on the Asus, but not against complete Asus/router/WAN failure where the home LAN itself loses Internet connectivity.

#### LAN Access to ******** Infrastructure over Tailscale (2026-10-12)

- Local home LAN: `192.168.68.0/24`; gateway ASUS RT-AX58U v2 (`192.168.68.1`).
- ******** LAN: `192.168.50.0/24`, reachable as a remote Tailscale subnet route.
- ASUS Tailscale interface: `tailscale0`; Tailscale policy routing table: `52`.
- ASUS accepts the remote subnet route `192.168.50.0/24` through Tailscale.
- A priority-2500 policy rule routes destination `192.168.68.0/24` through the main table to keep local traffic local.
- Full local-LAN source NAT on ASUS enables all local hosts, including Docker-Infra and Windows desktop, to initiate connections to ********'s LAN with a valid return path.
- Persistent POSTROUTING rule:
  `-s 192.168.68.0/24 -d 192.168.50.0/24 -o tailscale0 -j MASQUERADE`.
- The earlier specific TrueNAS SSH replication NAT rule is retained:
  `-s 192.168.68.64/32 -d 192.168.50.50/32 -o tailscale0 -p tcp --dport 22 -j MASQUERADE`.
- Rules are maintained idempotently by `/jffs/scripts/yb-********-routing.sh`:
  `route` handles the local-LAN policy rule and `nat` handles source NAT.
- Merlin `/jffs/scripts/firewall-start` calls the helper with `route`; `/jffs/scripts/nat-start` calls the helper with `nat`.
- Existing YazFi and ARP configuration in `firewall-start` is preserved.
- Router helper backup created before the October 12 modification at `/jffs/scripts/yb-********-routing.sh.bak`.
- ******** endpoints verified from Docker-Infra and Windows desktop:
  - TrueNAS `192.168.50.50:443` (HTTPS).
  - Proxmox `192.168.50.45:8006` (HTTPS).
  - Tailscale router VM `192.168.50.43:22` (SSH).
- Windows Wi-Fi desktop `192.168.68.181` successfully established TCP connections to all three endpoints. Windows Tailscale remained enabled; no need to disable it.
- Uptime Kuma's existing three ******** infrastructure checks returned UP after routing repair.
- This is LAN-initiated access over Tailscale, not a public WAN exposure and not a general internet exit route.
- NAT obscures the originating LAN device from remote services. A no-NAT routed site-to-site design would require suitable return routing and access rules on ********'s side.
- October 12: verified live NAT rules and connectivity. Persistence is configured through Merlin hooks; a post-change ASUS reboot test has not yet been performed.

### Backups and Replication

#### ******** TrueNAS Tailscale routing fix (2026-10-11)
- Source: TrueNAS `192.168.68.64`.
- Destination: ******** TrueNAS `192.168.50.50:22`, via Tailscale subnet `192.168.50.0/24`.
- ******** subnet routers: primary VM `100.91.148.126`; backup LXC `100.73.235.88`.
- Root cause: ASUS was not accepting remote Tailscale subnet routes; LAN-sourced SSH additionally required source NAT for the return path.
- ASUS now uses `--accept-routes=true`, with remote routes in routing table 52.
- LAN protection: policy rule priority `2500`, destination `192.168.68.0/24`, lookup `main`.
- SSH NAT: `POSTROUTING MASQUERADE`, source `192.168.68.64/32`, destination `192.168.50.50/32`, TCP port 22, interface `tailscale0`.
- Persistent helper: `/jffs/scripts/yb-********-routing.sh`.
- Merlin `firewall-start` executes helper `route`; `nat-start` executes helper `nat`.
- Removed legacy Tailmon unconditional `tailscale down; tailscale up` from `firewall-start`.
- Preserved YazFi, ARP settings, Entware, Tailscale watchdog, and local subnet-router HA.
- ASUS reboot verified: Tailscale restarted, routing and NAT restored, no duplicate NAT rules, and TrueNAS SSH connectivity succeeded.
- Router configuration rollback: `/jffs/yb-********-backup-20261011-221902`.
- TrueNAS replication task `16` (`Youssef_to_********`) enabled for normal scheduled execution. Interrupted job `57050` stopped for maintenance. Verify ZFS resume and successful replication on next scheduled run.

- **Brother replication**: Daily TrueNAS replication task (Youssef Truenas snapshots → ******** Truenas) via Tailscale.
- **Router backup**: Daily at 02:30 via custom script on Asus RT-AX58U v2. Backs up NVRAM, JFFS (scripts/addons/certs), and Entware (Tailscale/Tailmon/packages) to TrueNAS `Bolt/configs/router-backups` via Dropbear SSH key auth (`dbclient`), with 30-day retention and persistence through `services-start`. In addition, the monthly offline `Cold-Backups` workflow now creates a fresh ASUS recovery bundle containing native NVRAM export, full JFFS archive, full Entware archive, and router/firmware metadata; this is stored inside `host/pve` as `asus-router.pxar` and the temporary PVE copy is deleted after capture.
- **Proxmox node config backup**: Daily at 08:00 on both pve and NAS nodes via root/nodebackupconfigs.sh. Pushes to Tuxis PBS (ns: ProxmoxNodes) with fixed archive names for deduplication. Auto-syncs to RemoteBackups PBS daily at 01:00. Gotify notifications on success/failure. Captures /etc/pve, /etc/network, /etc/fstab, /etc/modprobe.d (VFIO passthrough on pve, ZFS ARC tuning on NAS), /etc/sysctl.d, /etc/ssh, /etc/apt, /etc/systemd/system, root scripts + .ssh keys, plus metadata (dpkg list, lsmod, kernel cmdline, node config JSON, crontab).
- **Proxmox cross-node replication**: LXCs 103 (Jellyfin), 106 (MeshCentral), 111 (Docker) replicated from PVE node → NAS node Zpool via Proxmox replication jobs.
- **Docker application backups to Backblaze B2**: The former Docker CT111 automation was retired when the Docker workload moved. Docker-Apps VM121 retains service-level backup automation where migrated and validated. VM121 and VM122 also have PBS VM-level backups. Live CT111 is the regional gateway.
- **Former Docker CT111 DB backup script** (`/root/backup-docker-dbs.sh`): This automation belonged to the former Docker installation. VM122 has PBS VM-level coverage. Its service-level database backup strategy can be revisited separately.
- **Docker-Apps VM121 service backups**: Existing migrated application-level backup scripts continue from `.57` where validated; Spliit has a separately verified PostgreSQL → Backblaze B2 backup.
- **Ghost backup**: Ghost now runs on Docker-Apps VM121 (`192.168.68.57`). Legacy CT111 Ghost-backup references are obsolete and should not be treated as active automation until the migrated backup path is separately verified.
- **Spliit backup**: Daily at 03:00 on .57 (`/root/scripts/spliit\_backup.sh`). PostgreSQL dump → AWS CLI to B2 `spliit-backups`. 7 files in bucket. Gotify alerting.
- **Spliit receipts**: App-native upload on creation → B2 `spliit-receipts` (public). Keep all. No alerting configured. Intentionally left without alerting — low stakes.
- **Cloudflare export**: The export automation from the former Docker CT111 is inactive. Reassess it separately if needed.
- **Home Assistant**: Google Drive backup addon — daily at 04:00, 21 generational retention, HA sensor alerting.
- **Immich photos**: rclone copy daily at 06:00 → OneDrive (1 TB, additive/never deletes). Gotify alerting. Also covered by ******** replication via TrueNAS snapshots.
- **Immich DB dumps**: Built-in periodic dumps to Bolt/configs/immich/backups/ — covered by Bolt snapshots + rclone. Via parent tasks.
- **TrueNAS Config**: Manual pre-upgrade export to Google Drive (`Truenas_Config_Backup`) remains as an additional recovery copy. The monthly offline `Cold-Backups` workflow now also creates a fresh automated TrueNAS SCALE configuration export using `config.save` with the secret seed, pool-key option, and authorized SSH keys. The archive is streamed from TrueNAS to the NAS Proxmox node, stored inside `host/NAS` as `truenas-config.pxar`, and the temporary NAS copy is deleted immediately after the PBS snapshot.
- **Local TrueNAS Snapshots**: Configured and documented. Snapshot schedules active on both Bolt and Tank pools. Used as source for brother replication.

### Cold USB Backup – Final Design (updated 2026-10-11)
- **Purpose**: Physically offline monthly disaster-recovery tier using an external USB HDD attached to the local PBS VM.
- **PBS datastore**: `Cold-Backups`
  - Removable datastore using backing-device UUID `68a99781-3125-4f57-acf2-37f3c73530e3`.
  - Filesystem: ext4.
  - Mounted by PBS at `/mnt/datastore/Cold-Backups` when connected.
  - Intentionally offline/unmounted between backup cycles.
  - Automatic GC schedule removed; GC is run manually as part of the cold-backup cycle.
  - Obsolete prune job for the old/nonexistent datastore `Cold` removed.
  - Current PBS/client encryption mode: `crypt-mode none`.
  - Because the datastore now contains TrueNAS secrets, router NVRAM, router SSH material and Tailscale state, the external drive must be treated as highly sensitive physical media.

#### Guest VM/LXC cold backups
- Proxmox backup job ID: `backup-8a13334d-46c2`
- Comment: `Cold BACKUP to USB external hard drive`
- Storage: `Cold-Backups`
- Mode: snapshot
- Job remains configured but intentionally **disabled** (`enabled=0`) so it cannot fire while the USB disk is disconnected.
- Monthly execution is manual from the Proxmox GUI using **Run now**.
- Included VMIDs/LXCs:
  `100,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,121,122,123`
- Retention:
  - `keep-last=6`
  - `keep-yearly=2`
- Guest backups remain at the root of the datastore; no `VMs` namespace is used.
- TrueNAS VM 102 backup contains the VM boot/system disk only. Physical passthrough data disks are excluded with `backup=no`.
- Full selected guest set was refreshed successfully on 2026-10-06. On 2026-10-11 the cold set was expanded to include VM104, VM105 and VM112, and targeted backups were completed for previously missing/currently important workloads. Every guest currently listed in the cold job has at least one recent cold snapshot.
- Full datastore verification completed successfully with zero errors.
- Old stale backup groups `ct/114` and `ct/115` were deleted.
- Old `ct/113` snapshots belonging to the former `restoreimmich` workload were deleted. Current VMID 113 is `TailscaleSubnet-backup`.

#### Proxmox/PBS host configuration cold backups
- Dedicated PBS namespace: `Proxmox_Nodes`
- Backup groups:
  - `host/pve`
  - `host/NAS`
  - `host/pbs`
- `host/pve` archives:
  - `/etc` → `etc.pxar`
  - `/etc/pve` → `pve-config.pxar`
  - fresh ASUS/Merlin recovery bundle → `asus-router.pxar`
- `host/NAS` archives:
  - `/etc` → `etc.pxar`
  - `/etc/pve` → `pve-config.pxar`
  - fresh TrueNAS SCALE recovery bundle → `truenas-config.pxar`
- `host/pbs` archives:
  - `/etc` → `etc.pxar`
  - `/etc/proxmox-backup` → `pbs-config.pxar`
- Host retention:
  - `keep-last=6`
  - `keep-yearly=2`

#### Host-backup authentication
- Dedicated PBS service account: `coldhost@pbs`
- Separate API tokens:
  - `coldhost@pbs!pve`
  - `coldhost@pbs!nas`
  - `coldhost@pbs!pbs`
- Tokens are scoped to:
  `/datastore/Cold-Backups/Proxmox_Nodes`
- Effective token privileges:
  - `Datastore.Backup`
  - `Datastore.Prune`
- Host backup-group ownership was transferred from `root@pam` to the corresponding dedicated token.
- Token secrets are stored locally in root-only files:
  `/root/.config/proxmox-backup/coldhost-*.token`
- Token secrets are not embedded in hook scripts.

#### Automated host backups during GUI cold-backup run
- Both Proxmox nodes use:
  `/usr/local/sbin/cold-vzdump-hook.sh`
- `/etc/vzdump.conf` contains:
  `script: /usr/local/sbin/cold-vzdump-hook.sh`
- Hooks immediately exit unless `STOREID=Cold-Backups`, so normal backup jobs are unaffected.

##### pve job-end sequence
1. Generate a fresh ASUS/Merlin router recovery bundle.
2. Back up `host/pve`, including `asus-router.pxar`.
3. Prune `host/pve`.
4. Delete the temporary ASUS bundle.
5. Trigger the PBS host backup through restricted SSH.

##### NAS job-end sequence
1. Request a fresh TrueNAS SCALE configuration export.
2. Stream it temporarily to the NAS Proxmox node.
3. Validate the generated tar archive.
4. Back up `host/NAS`, including `truenas-config.pxar`.
5. Prune `host/NAS`.
6. Delete the temporary TrueNAS configuration archive.

##### PBS helper
- `/usr/local/sbin/cold-pbs-host-backup.sh`
- Backs up and prunes `host/pbs`.

#### TrueNAS SCALE configuration recovery bundle
- TrueNAS version validated during setup: `25.10.7`.
- TrueNAS management IP: `192.168.68.64`.
- Native export uses `core.download` wrapping `config.save`.
- Export options:
  - `secretseed=true`
  - `pool_keys=true`
  - `root_authorized_keys=true`
- TrueNAS-side helper:
  `/home/truenas_admin/bin/cold-truenas-config-export.sh`
- TrueNAS `/home` is intentionally mounted `noexec`; helper is invoked explicitly with `bash`.
- Dedicated NAS → TrueNAS SSH key:
  `/root/.ssh/cold-truenas-config`
- Temporary NAS location:
  `/root/.cold-backup/truenas/truenas-config.tar`
- Temporary file permissions: root-only.
- Cleanup is enforced by the NAS cold hook even if later processing fails.
- Validated TrueNAS export contains:
  - `freenas-v1.db`
  - `pwenc_secret`
  - `truenas_admin_authorized_keys`
  - `root_authorized_keys`
- Latest validated `host/NAS` snapshot contains:
  - `etc.pxar.didx`
  - `pve-config.pxar.didx`
  - `truenas-config.pxar.didx`

#### ASUSWRT-Merlin router recovery bundle
- Router: ASUS RT-AX58U V2 at `192.168.68.1`.
- Firmware at integration time:
  `3.0.0.4.388.10_2-gnuton1`
- Existing daily router backup remains active independently at 02:30 to TrueNAS Bolt with 30-day retention.
- Dedicated cold-export helper on pve:
  `/usr/local/sbin/cold-asus-router-export.sh`
- Dedicated PVE → ASUS SSH key:
  `/root/.ssh/cold-asus-router`
- Key is persisted in router NVRAM `sshd_authkeys`.
- Cold export is streamed directly to pve to avoid exhausting router `/tmp` RAM.
- Temporary PVE directory:
  `/root/.cold-backup/asus-router`
- Recovery bundle contains:
  - `nvram.cfg` — native `nvram save` export
  - `jffs.tar.gz` — complete `/jffs`
  - `entware.tar.gz` — complete `/tmp/mnt/Entware`
  - `router-info.txt` — hostname, product ID, firmware/build, kernel and backup timestamp
- `/jffs` is approximately 3.8 MB.
- Entware source is approximately 588.5 MB and compresses to approximately 97 MB.
- Router recovery bundle is approximately 98 MB total.
- JFFS includes persistent Merlin scripts/configs and router SSH material.
- Entware includes Tailmon/Tailscale state and installed packages.
- The pve cold hook removes the temporary router directory automatically after the PBS snapshot.
- Latest validated `host/pve` snapshot contains:
  - `etc.pxar.didx`
  - `pve-config.pxar.didx`
  - `asus-router.pxar.didx`

#### Restricted pve → PBS trigger
- `pve` has a dedicated SSH key used only to trigger the PBS cold-host helper.
- PBS `authorized_keys` forces:
  `/usr/local/sbin/cold-pbs-host-backup.sh`
- The key cannot obtain a normal shell.
- PTY, port forwarding, agent forwarding and X11 forwarding are disabled.
- Restricted execution was tested successfully; even an attempted arbitrary command runs the forced PBS backup helper instead.

#### Monthly cold-backup workflow
1. Physically connect the USB cold-backup disk.
2. Confirm PBS datastore `Cold-Backups` is available/mounted.
3. In Proxmox GUI: **Datacenter → Backup → Cold BACKUP to USB external hard drive → Run now**.
4. Selected VMs/LXCs are backed up across `pve` and `NAS`.
5. NAS automatically creates a fresh TrueNAS configuration recovery bundle.
6. pve automatically creates a fresh ASUS/Merlin router recovery bundle.
7. `pve`, `NAS`, and `pbs` host configuration backups run automatically through the vzdump hooks.
8. Host backup groups are pruned automatically.
9. Run PBS garbage collection manually.
10. Run verification periodically or after significant changes.
11. In the PBS GUI, select `Cold-Backups` and use **Unmount**; confirm the datastore is inactive/unmounted before disconnecting the drive.
12. Physically unplug the USB disk.

> **Important operating rule**: Plugging in the USB does **not** automatically start a backup. The disk is connected first, then the administrator explicitly starts the disabled cold-backup job from the Proxmox GUI using **Run now**.

### 3-2-1 Coverage Matrix
| ID | Workload | PBS Local | PBS NAS | PBS DE | PBS NL | Cold USB | App/Cloud | 3-2-1? |
|----|----------|-----------|---------|--------|--------|----------|-----------|--------|
| 100 | HomeAssistant | — | ✓ | — | ✓ | ✓ | ✅ GDrive (21 gen) | ✅ Yes |
| 102 | TrueNAS | — | ✓ | ✓ | ✓ | ✓ | ✅ GDrive config (manual) | ✅ Yes |
| 103 | Jellyfin | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✅ Yes |
| 104 | Zorin OS | — | ✓ | — | — | ✓ | — | ✅ Local + offline recovery coverage |
| 105 | Win11 | — | ✓ | ✓ | ✓ | ✓ | — | ✅ Yes |
| 106 | MeshCentral | — | ✓ | ✓ | ✓ | ✓ | — | ✅ Yes |
| 107 | Vaultwarden | — | ✓ | ✓ | ✓ | ✓ | — | ✅ Yes |
| 108 | rclone | — | ✓ | — | ✓ | ✓ | — | ✅ Yes |
| 110 | PBS VM | — | — | — | ✓ | ✓ | — | ✅ Yes |
| 111 | docker legacy rollback | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✅ Retained rollback |
| 112 | Ubuntu VM | — | ✓ | — | ✓ | ✓ | — | ✅ Yes |
| 113 | TailscaleSubnet-backup | — | — | — | — | ✓ | — | ✅ Cold recovery copy |
| 114 | AdGuard primary | — | ✓ | ✓ | ✓ | ✓ | — | ✅ Yes |
| 115 | AdGuard secondary | — | ✓ | ✓ | ✓ | ✓ | — | ✅ Yes |
| 117 | docker2 legacy rollback | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✅ Retained rollback |
| 121 | Docker-Apps | — | ✓ | ✓ | ✓ | ✓ | Spliit B2 + selected app backups | ✅ Yes |
| 122 | Docker-Infra | — | ✓ | ✓ | ✓ | ✓ | — | ✅ Yes |

### Self-Hosted Services
- **Media**: Jellyfin, Radarr, Sonarr, Jellyseer, NZBGet/Usenet (UWEKA), Audiobookshelf, Calibre, Calibre-Web, Kavita
- **Photos**: Immich (main) + Immich Kiosk (parents' house)
- **Identity/Auth**: Authentik OIDC + Cloudflare Zero Trust
- **Passwords**: Vaultwarden (family)
- **Home Automation**: Home Assistant + TeslaMate/Grafana dashboards + HACS
- **Notes**: Trilium Notes
- **Recipes**: Mealie (recettes)
- **Location**: Dawarich (Google Timeline replacement)
- **Notifications**: Gotify
- **Local AI**: No active dedicated local-AI workload. Former LXC109 `ai-stack` has been deleted. Spare M920q remains powered off/cold standby.
- **Remote Access**: MeshCentral (replaced RustDesk, blocked by Zscaler). Installed via npm at /opt/meshcentral on LXC 106 (192.168.68.75). Updated to latest version on 2026-04-05 to fix Windows 11 24H2 agent install issue (WMIC removal). SSO enabled via Authentik OIDC. Device groups: AMT/vPro, Brother, HP G4 Backup, Desktops (BMAX-HOMEPC new desktop), Home Servers (980/108).
- **Code**: Native code-server on Docker-Infra VM122 with SSH shortcuts to PVE, NAS, Docker-Apps and GCP
- **Cloud Storage**: Nextcloud (on TrueNAS)
- **Monitoring**: WatchYourLAN, Uptime Kuma (local + GCP) monitors health across local and GCP infrastructure
- **Utilities**: Stirling-PDF, Spliit, Zakat calculator, Book requests manager
- **DASHBOARD**: Homepage (gethomepage) v1.12.3 at home.youssefbouanani.com
  - Runs on Docker-Infra VM122 and is published through Cloudflare Tunnel to `192.168.68.36:2000`.
  - Portainer dashboard integration uses the single Portainer Server on Docker-Apps (`192.168.68.57:9443`) with two cards: `Docker-Apps` endpoint ID `2` and `Docker-Infra` endpoint ID `5`. Docker-Infra is managed by the Portainer Agent on `192.168.68.36:9001`.
  - AdGuard widget uses direct LAN API access to primary AdGuard at `http://192.168.68.10`; the clickable AdGuard URL remains the externally protected hostname.
  - Jellyfin widget uses `https://media.youssefbouanani.com`, Jellyfin widget `version: 2` for Jellyfin 12.x, and a dedicated API key supplied through Homepage environment variables.
- **Docker UI management**: One Portainer Server at portainer.youssefbouanani.com on Docker-Apps VM121; Docker-Infra VM122 is attached through its Portainer Agent.
- **DEVOPS**: Native code-server on Docker-Infra VM122 at code.youssefbouanani.com – workspace: `/home/youssef/homelab/homelab.code-workspace`

### Active / Done
- **Local AI stack retired**: former NAS-node LXC109 was deleted. No production Open WebUI/Ollama/SearXNG stack is currently running.
- **Backup & DR plan fully resolved / expanded**: The offline `Cold-Backups` tier protects the selected guest set plus pve/NAS/PBS host configurations. TrueNAS configuration is exported automatically into `host/NAS`, and `host/pve` contains both a complete ASUS/Merlin recovery bundle and a standalone `homelab-context.pxar` archive pulled from the canonical VM122 repository at `/opt/homelab-context`. On 2026-10-11 the cold guest set was expanded to include VM104, VM105 and VM112, and coverage was validated for every guest currently included in the cold job. Manual TrueNAS pre-upgrade Google Drive exports remain as an additional recovery copy.

### Planned / In Evaluation
- Isolate Authentik in its own LXC if still co-hosted
- Tesla automations in HA – Off-peak charging, solar excess charging
- Xiaomi Mi Scale – Self hosting data

---

## 3. Infrastructure Detail

### Proxmox Node pve (192.168.68.122)

| ID | Name | Type | IP | Status / Role |
|----|------|------|----|---------------|
| 100 | HomeAssistant | VM | 192.168.68.147 | Running |
| 101 | Win11Template | VM | — | Template |
| 103 | Jellyfin | LXC | 192.168.68.52 | Running |
| 105 | Win11 | VM | — | Running |
| 106 | MeshCentral | LXC | 192.168.68.75 | Running |
| 107 | Vaultwarden | LXC | 192.168.68.107 | Running |
| 108 | rclone | LXC | — | Existing |
| 110 | ProxmoxBackup | VM | 192.168.68.71 | **Running — local PBS** |
| 111 | docker | LXC | formerly 192.168.68.36 | **STOPPED rollback** |
| 112 | Ubuntu-VM | VM | — | Existing |
| 113 | TailscaleSubnet-backup | LXC | — | Backup Tailscale subnet router |
| 114 | adguard-primary | LXC | 192.168.68.10 | **Running — primary DNS** |
| 117 | docker2 | LXC | formerly 192.168.68.57 | **STOPPED rollback** |
| 122 | docker-infra | VM | 192.168.68.36 | **Running — production infrastructure Docker host** |

#### VM122 — Docker-Infra

- Debian 13.
- 2 vCPU, 4 GB RAM, 40 GB local-lvm.
- Docker Engine 29.8.2 and Docker Compose 5.6.0.
- Production IP: `192.168.68.36`.
- DNS: `192.168.68.10` and `192.168.68.11`.
- Docker stacks live under `/opt/docker`.
- Docker logging uses `json-file`, `max-size=20m`, `max-file=5`.
- Runs Nginx Proxy Manager, Authentik, cloudflared, Cloudflare DDNS, Homepage, Uptime Kuma, Gotify, TrueNAS Gotify adapter and Portainer Agent.
- code-server runs natively under systemd as user `youssef` on port `8443`.
- code-server has a dedicated SSH identity and management shortcuts for PVE, NAS, Docker-Apps and GCP.
- Portainer Server on VM121 reaches the VM122 Portainer Agent at `192.168.68.36:9001`.
- VM122 has been added to `backupsOnNas`, Tuxis, RemoteBackups and Cold-Backups.
- Successful post-cutover VM122 backup to `backupsOnNas` verified on 2026-10-08.
- At the time of the Docker migration, the former Docker CT111 was retained powered off for rollback. Restore that image with isolated networking while VM122 owns .36. CT111 now identifies the regional gateway.

### Proxmox Node NAS (192.168.68.123)

| ID | Name | Type | IP | Status / Role |
|----|------|------|----|---------------|
| 102 | TrueNAS | VM | 192.168.68.64 | Running |
| 104 | Zorin | VM | — | Existing |
| 115 | adguard-secondary | LXC | 192.168.68.11 | **Running — secondary DNS** |
| 121 | docker-apps | VM | 192.168.68.57 | **Running — production application Docker host** |

#### VM121 — Docker-Apps

- Debian 13.
- 4 vCPU, 8 GB fixed RAM, 64 GB disk.
- Production IP: `192.168.68.57`.
- Docker Engine 29.8.2 and Docker Compose 5.6.0.
- Docker stacks live under `/opt/docker`.
- VM121 primary disk is on the NAS-node KIOXIA-backed `Zpool`.
- DNS resolvers: `192.168.68.10` and `192.168.68.11`.
- Host timezone identifier: `Africa/Casablanca`.
- Dawarich 1.15.3: Sidekiq background-processing concurrency reduced from 5 to 3 on 2026-10-09. Redis persistence changed to `save 900 1` while the large reverse-geocoding backlog drains. OwnTracks phone monitoring was changed from high-frequency movement mode to Significant Changes while stationary.
- **Dawarich optimized trip preview (2026-10-10)**: Preview optimization was deployed as `yb/dawarich:1.15.3-trip-preview-v2`; the current boundary image is listed below on VM121 `docker-apps` (`192.168.68.57`). Official upstream base is Dawarich 1.15.3; the production app uses a separate Compose override at `/opt/docker/Dawarich/yb-preview.prod.yml`.
  - **Optimization**: Redis-cached GPS API aggregates; lightweight PostGIS-simplified daily GeoJSON previews; on-demand full-resolution GPS loading; preserved full-trip overview underlay for ferry crossings. Original GPS data was not deleted.
  - **Performance**: Cosardinia 2026 (trip ID 5, 302,548 selected GPS points) renders a roughly 116 KiB daily preview instead of immediately downloading all raw points. Typical cached preview requests measured approximately 60-100 ms; cold regenerations can take 2-4 seconds. Preview Redis cache TTL is 10 minutes.
  - **Source and recovery**: Original development branch `yb/trip-performance`, commit `35cc3ad`, at `/opt/docker/Dawarich/optimization/dawarich-1.15.3`. Independent private GitHub source backup: `Joe123-B/yb-dawarich-optimized`, branch `main`, local directory `/opt/docker/Dawarich/optimization/yb-dawarich-private`. Contains modified application files, Dockerfile, patch, deployment override and README; not production secrets or database backups.
  - **Deployment safety**: Use the complete current Compose set listed in the journey-boundary section below when managing the optimized app. Omitting custom overrides can select the wrong image or remove operational holds. Never use `docker compose down -v`. Future Dawarich updates require testing upstream changes and rebuilding/reapplying this customization; do not blindly auto-update the application image.
  - **Validation**: Production image healthy; Compose configuration valid; Cosardinia daily routes and ferry-crossing underlay visually confirmed. Restored backup was tested in isolated PostgreSQL (`1,133,386` points). Regression tests passed: daily-route selection/filtering, replay, poster and video generation.
  - **OwnTracks audit**: Tracker `yb` had 303,686 points during the trip date range; 209,947 consecutive timestamp intervals were exactly one second. Dominant point sources 371 and 397 contain OwnTracks location payloads and MQTT topics. OwnTracks Android `pegLocatorFastestIntervalToInterval` was changed from `false` to `true`, retaining the 10-second Move interval. Live verification: 17 points, median 11-second interval, zero one-second intervals. Source-level lifetime totals must not be confused with trip totals.

- **Dawarich persistent journey boundaries (2026-10-13)**: deployed and enabled with `YB_JOURNEY_BOUNDARIES=1` in app and Sidekiq. Nine validated boundaries: four Casablanca and five motorcycle; September 22 ferry candidate excluded. SQL, parallel/incremental generators, both merger paths, shared builder and orphan attachment consult the persistent boundary policy. Regression baseline: 24 Rails examples, 7 Ruby tests/15 assertions, and 12 concurrent scenarios passed.
  - **Current deployment**: image `sha256:92ea8aed2e91cf7eb54dbc87ae95f6952d7167ed1478d052e07d2d8fce8ea5ab`. Use the full Compose set: `/opt/docker/Dawarich/docker-compose.yml`, `docker-compose.override.yml`, `yb-preview.prod.yml`, `yb-geocoding-hold.prod.yml`, `yb-geobudget.prod.yml`, plus `/opt/docker/Dawarich/optimization/dawarich-1.15.3/optimization/yb-track-tests/journey-release/activate.feature-on.yml` and `/opt/docker/Dawarich/optimization/dawarich-1.15.3/optimization/yb-geoapify-tests/deploy.held.yml`, `/opt/docker/Dawarich/optimization/dawarich-1.15.3/optimization/yb-geoapify-tests/reactivate.yml`. Preserve all overrides when managing services.
  - **Approved targeted rebuild**: original track 30646 replaced by 32124-32128 (5 pieces, 50,507 points, 226.83 km); original track 30600 replaced by 32129-32134 (6 pieces, 221,107 points, 3,031.64 km). All 271,614 GPS points and GPS attributes preserved; school track 31957 retains 237 points; unrelated history preserved. Post-commit read-only checks confirm exact piece ownership, no active boundary crossings and populated transport segments.
  - **Backup/recovery**: pre-rebuild archive `/opt/docker/Dawarich/backups/journey-prerebuild-20261013-203309/dawarich-prerebuild.dump`, 398,964,701 bytes; archive listing verified, this archive not restore-tested. Reviewed plan, execution results and verifier remain in `optimization/yb-track-tests/journey-release/`; rerunnable verification: `python3 optimization/yb-track-tests/verify_reviewed_rebuild.py` from the 1.15.3 checkout. Image rollback does not undo committed track changes; use reviewed data recovery if needed.
  - **Current geocoding operation**: Geoapify reactivated under the durable credit guard on 2026-10-13. Both reverse_geocoding and reverse_geocoding_recovery queues are subscribed; app and Sidekiq healthy. Activation snapshot backlog 57,437, track queues and retries empty. Backlog completion is not implied by queue draining: budget-blocked points remain eligible for bounded recovery. No broader historical track regeneration authorized.
  - **Remaining checks**: longer observation of natural processing; review automatic transport labels (some motorcycle pieces classified as cycling); full map visual review unavailable in the cloud browser because WebGL 2 is unavailable. Cosardinia trip page loads, but still reports no data on September 18-19; ferry endpoint replay remains incomplete. The trip total (7,208 km) uses a different full-trip/date-range scope than the rebuilt source track subtotal.

- **Dawarich durable Geoapify credit ledger (2026-10-13)**: production patch deployed and verified; app and Sidekiq healthy. Migration 20261013221000 applied and tracked, creating yb_geoapify_budget_states and yb_geoapify_credit_reservations. PostgreSQL is the persistent budget authority, using a separate committed connection pool and an advisory lock. Reservations survive caller rollback, application/worker restarts and API-key changes. All Geoapify keys used by this instance share one allowance.
  - **Credit limits**: 2,500 attempted lookups per rolling 24 hours; 1,000 recent and 1,500 historical. The 500-credit margin is below the 3,000-credit provider allowance. Cache hits and failed calls may conservatively count. User confirmed on October 13 this Geoapify account/API is used exclusively by this Dawarich instance; no other application usage needs accounting.
  - **Activation state**: ACTIVE at 2026-10-13T23:17:19Z. One-time bootstrap used the user-provided all-key dashboard baseline of 24 credits for October 13 UTC, plus 96 legacy reservations conservatively retained (120 initial ledger entries). A single live lookup succeeded with GPS attributes and track ownership preserved. Activation verification counted 122 rolling reservations, recent=1 and historical=1; these are conservative ledger counts, not provider billing totals. Never reset this initialized ledger during retries or restarts.
  - **Verification/recovery**: 13 candidate regressions passed, including the last-credit boundary, two racing worker processes, restart persistence, rollback persistence, API-key changes, unavailable accounting and HTTP-path blocking. Eleven existing Geoapify/journey source files matched the previous running image. All 271,614 rebuilt points, school run and nine boundaries re-verified after deployment. Fresh prerelease backup /opt/docker/Dawarich/backups/geoapify-prerelease-20261013-223411/dawarich-geobudget-prerelease.dump, 393,875,356 bytes; archive listing and checksum verified, this archive not restore-tested.
  - **Files**: candidate and rollout material at /opt/docker/Dawarich/optimization/dawarich-1.15.3/optimization/yb-geoapify-tests/; active image pin deploy.held.yml plus reactivate.yml and read-only sidekiq-budgeted.yml. Worker activation preserved existing queues/concurrency, environment, all other mounts and the journey flag; app was not restarted. activation.json records verification. To pause geocoding retain the current budget image and restore the held queue mount by omitting reactivate.yml from the full Compose set. Old-image rollback.held.yml must retain the geocoding hold because the old image uses Redis accounting.
- Replaced legacy CT117 while retaining `.57`.
- Runs Portainer Server, Mealie, Spliit, Trilium, Dawarich, Zakat, Ghost, TeslaMate, Paperless, Stirling PDF, Homelab Hub, Immich Kiosk, WatchYourLAN and Speedtest.
- Watchtower and Tugtainer retired.
- Spliit PostgreSQL backup runs daily at 03:00 to Backblaze B2.
- Spliit B2 retention is seven objects.
- Replacement restricted B2 key verified after the previously exposed key was revoked.
- VM121 is included in `backupsOnNas`, Tuxis, RemoteBackups and Cold-Backups.
- CT117 remains powered off temporarily as rollback. **Do not start CT117 while VM121 owns `.57`.**

### Docker Host Inventory (Updated 2026-10-08)

#### VM122 — Docker-Infra (`192.168.68.36`)

Infrastructure / edge services:

- Nginx Proxy Manager
- Authentik
- cloudflared
- Cloudflare DDNS
- Homepage
- Uptime Kuma
- Gotify
- TrueNAS Gotify adapter (`:31662`)
- Portainer Agent (`:9001`)
- native code-server (`:8443`)

#### VM121 — Docker-Apps (`192.168.68.57`)

Application services:

- Portainer Server
- Mealie
- Spliit
- Trilium
- Dawarich
- Zakat
- Ghost
- TeslaMate
- Paperless
- Stirling PDF
- Homelab Hub
- Immich Kiosk
- WatchYourLAN
- Speedtest

#### Regional Wi-Fi gateways (2026-11-26)

Both gateway LXCs run on PVE. Joining a regional ASUS SSID selects its exit. Ordinary ASUS/Deco Wi-Fi and wired clients use ASUS's default ISP route.

| SSID | Band / VLAN | Subnet | Gateway on PVE | Verified public IPv4 |
| --- | --- | --- | --- | --- |
| HOME_USA | 2.4 GHz / 501 | 192.168.101.0/24 | CT116, 192.168.68.139 | 35.211.62.198 (GCP, USA) |
| HOME_France | 5 GHz / 502 | 192.168.102.0/24 | CT111, 192.168.68.110 | 68.221.173.111 (Azure, Spain) |

- ASUS uses br1/wl0.1 and table 171 for USA, and br2/wl1.1 and table 170 for France. Persistent hooks restore routing, firewall rules and trusted LAN bridge exceptions. The early boot hook installs fallback blocks. DHCP advertises Cloudflare DNS at 1.1.1.1 and 1.0.0.1. ASUS IPv6 is disabled.
- Virtual clients verified regional IPv4 and DNS, DHCP and bidirectional TCP access to the trusted LAN. Each gateway blocked tested internet and DNS traffic during failures, preserved LAN access and recovered on its own exit. Both LXCs and ASUS passed reboot tests, with no unexpected public IP observed in sampled startup probes. The owner confirmed both SSIDs worked on physical Wi-Fi clients.
- CT111 and CT116 are selected in BackupOnNas (backupsOnNasNew), Tuxis, RemoteBackups and the manual Cold-Backups USB job. Verify fresh CT116 restore points after the next scheduled runs and next manual cold USB run. Check date and guest notes before selecting a CT111 restore point because older backups may belong to the former Docker workload.
- Keep both containers on PVE. If a NAS move is reconsidered, compare measured host load and check LAN bridge, storage and TUN support before planning a cutover.
- Future Regional Gateway Manager scope includes optional per-device Default / USA / France assignments with stable device addressing, DNS, fail-closed routing and undo. Current routing follows the SSID. Corporate device changes remain deferred.
- Private recovery material is in /root/yb-regional-20261126/ on PVE and /jffs/yb-regional-backup-20261126-1110/ on ASUS.

#### Dedicated DNS

- CT114 — AdGuard Home primary — `192.168.68.10`
- CT115 — AdGuard Home secondary — `192.168.68.11`

Both AdGuard instances are native dedicated LXCs.

#### Legacy rollback hosts

- Historical CT111 `docker` was the former .36 Docker infrastructure host. Live CT111 runs the HOME_France gateway at 192.168.68.110.
- CT117 `docker2` — former `.57` Docker application host — **powered off**.

The former Docker CT111 record documents the previous workload and its backup history.

**Restore the historical Docker CT111 image only with isolated networking while VM122 owns `.36`.**
**Never start CT117 while VM121 owns `.57`.**

### Service → IP Mapping

| Service | Subdomain | Destination |
|---------|-----------|-------------|
| AdGuard Home | adguard.youssefbouanani.com | 192.168.68.10:80 |
| Authentik SSO | authentik.youssefbouanani.com | Cloudflare Tunnel |
| Book Requests | bookrequests.youssefbouanani.com | 192.168.68.64:8084 |
| Books (audiobookshelf) | books.youssefbouanani.com | 192.168.68.64:30067 |
| Ebooks (Calibre-Web) | ebooks.youssefbouanani.com | 192.168.68.64:8083 |
| Dashboard (Home) | home.youssefbouanani.com | 192.168.68.36:2000 |
| Immich (Photos) | photos.youssefbouanani.com | 192.168.68.64:30041 (NPM direct-public; DNS-only via `origin`) |
| Immich Kiosk (Parents) | parents.youssefbouanani.com | 192.168.68.57:3000 |
| Jellyfin | media.youssefbouanani.com | 192.168.68.52:8096 (NPM direct-public; DNS-only via `origin`) |
| MeshCentral (Remote) | remote.youssefbouanani.com | 192.168.68.75:443 |
| Mealie (Recettes) | recettes.youssefbouanani.com | 192.168.68.57:9925 |
| Nextcloud | nextcloud.youssefbouanani.com | 192.168.68.64:30027 (NPM direct-public; DNS-only via `origin`) |
| Notes (Trilium) | notes.youssefbouanani.com | 192.168.68.57:8081 |
| PBS (local) | pbs.youssefbouanani.com | 192.168.68.71:8007 |
| PDF (Stirling) | pdf.youssefbouanani.com | 192.168.68.57:8090 |
| Photodrop | photodrop.youssefbouanani.com | 192.168.68.64:9002 (NPM direct-public; DNS-only via `origin`) |
| Jellyseer (Requests) | requests.youssefbouanani.com | 192.168.68.64:30357 |
| Spliit | spliit.youssefbouanani.com | 192.168.68.57:3011 |
| Dawarich (Timeline) | timeline.youssefbouanani.com | 192.168.68.57:3091 |
| Vaultwarden (Vault) | vault.youssefbouanani.com | 192.168.68.53:8090 |
| Zakat Calculator | zakat.youssefbouanani.com | 192.168.68.57:8080 |
| Ghost Blog | blog.smarthomes.ma | — |
| Proxmox VE | proxmox.youssefbouanani.com | 192.168.68.122:8006 |
| TrueNAS Scale | truenas.youssefbouanani.com | 192.168.68.64 |
| Portainer | portainer.youssefbouanani.com | 192.168.68.57:9443 |
| Code Server | code.youssefbouanani.com | 192.168.68.36:8443 |
| Uptime Kuma (local) | monitoring.youssefbouanani.com | 192.168.68.36:3001 |
| Homelab Hub | hub.youssefbouanani.com | 192.168.68.57:3500 |
| Homelab Visualizer | homelab.youssefbouanani.com | Cloudflare Pages |

Additional internal services (no public subdomain):

| Service | Destination |
|---------|-------------|
| Uptime Kuma (GCP) | uptime.youssefbouanani.com → 172.17.0.1:3001 |
| Nginx Proxy Manager | 192.168.68.36:81 |
| Home Assistant | homeassistant.youssefbouanani.com → 192.168.68.147:8123 |
| Teslamate | teslamate.youssefbouanani.com → 192.168.68.57:4000 |
| Authentik IdP | authentik.youssefbouanani.com → 192.168.68.36:85 |
| Gotify | gotify.youssefbouanani.com → 192.168.68.36:8010 |
| WatchYourLAN | 192.168.68.57:8840 |
| OpenSpeedTest | 192.168.68.57:8765 |

---

## 4. Cloudflare Tunnels

| Tunnel | Runs On | Notes |
|--------|---------|-------|
| Docker-Infra VM122 | 192.168.68.36 | Main managed Cloudflare Tunnel connector; routes target VM122, VM121 and other LAN services as appropriate |
| TrueNAS | 192.168.68.64 | Separate tunnel for TrueNAS node |
| GCP-US | 35.211.62.198 | Cloud tunnel (keep separate) |

---

## 4A. Cloudflare DNS, DDNS & Direct NPM Origin (Updated 2026-09-08)

### DNS model

- `youssefbouanani.com` → A `105.159.138.39` — **Proxied**
- `*.youssefbouanani.com` → CNAME `youssefbouanani.com` — **Proxied**
- `origin.youssefbouanani.com` → A `********` — **DNS only**
- `photos.youssefbouanani.com` → CNAME `origin.youssefbouanani.com` — **DNS only**
- `photodrop.youssefbouanani.com` → CNAME `origin.youssefbouanani.com` — **DNS only**
- `nextcloud.youssefbouanani.com` → CNAME `origin.youssefbouanani.com` — **DNS only**
- `media.youssefbouanani.com` → CNAME `origin.youssefbouanani.com` — **DNS only**

Purpose: the four direct services bypass Cloudflare's reverse proxy so large uploads and streaming are not constrained by Cloudflare's 100 MB request-body limit.

Expected path:

```text
client
  → <service>.youssefbouanani.com
  → origin.youssefbouanani.com
  → 105.159.138.39
  → Asus TCP 443
  → NPM 192.168.68.36:443
  → backend
```

### Cloudflare DDNS

Container: `favonia/cloudflare-ddns`

Logical environment:

```text
DOMAINS=youssefbouanani.com,origin.youssefbouanani.com
PROXIED=is(youssefbouanani.com)
IP6_PROVIDER=none
```

Behavior:
- root A record is maintained and remains proxied;
- `origin` A record is maintained and remains DNS-only;
- IPv6 DDNS is disabled;
- dedicated Cloudflare API token exists for DNS edit on the required zone only; token secret must never be stored in this context.

### ASUS firewall / port forwarding

Router: ASUS RT-AX58U_V2, ASUSWRT-Merlin / gnuton build.

Public WAN IPv4: `********`

Port forwards:

```text
WAN TCP 80  → 192.168.68.36:80
WAN TCP 443 → 192.168.68.36:443
```

A custom router-wide `CF_FILTER` iptables chain previously allowed only Cloudflare source CIDRs to NPM ports 80/443. This blocked all DNS-only/direct clients. The `CF_FILTER` rules and live chain were removed and must not be restored globally.

Current `/jffs/scripts/firewall-start`:

```sh
#!/bin/sh

/jffs/scripts/YazFi runnow & # YazFi Guest Networks
/jffs/scripts/yb-********-routing.sh route
arp -s 192.168.68.123 ********
```

Security rule: Cloudflare-only restrictions must be applied per NPM virtual host (or via separate listeners/IPs/ports), not as a router-wide source-IP filter on 80/443.

### AdGuard DNS-cache behavior

Local resolvers: primary `192.168.68.10`, secondary `192.168.68.11`.

After changing a hostname from proxied to DNS-only, AdGuard can retain old Cloudflare A/AAAA answers for a short period. Diagnostic pattern:

```bash
nslookup <host> 1.1.1.1
nslookup <host> 192.168.68.10
```

If public DNS resolves through `origin.youssefbouanani.com → ********` while AdGuard still returns Cloudflare addresses (`104.21.x.x`, `172.67.x.x`, or `2606:4700:...`), clear the AdGuard DNS cache and retry.

### Direct NPM services

#### Immich

- Public hostname: `photos.youssefbouanani.com`
- Backend: `http://192.168.68.64:30041`
- WebSockets enabled
- Wildcard Let's Encrypt certificate
- Force SSL enabled

Advanced Nginx:

```nginx
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

client_max_body_size 0;
proxy_max_temp_file_size 16384m;

proxy_request_buffering off;
proxy_buffering off;
client_body_buffer_size 1024k;

proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;

location = /Portugal_Mototrip {
    return 302 https://photos.youssefbouanani.com/share/********;
}
```

Verified:
- backend healthy;
- NPM → Immich works;
- public direct route resolves to `105.159.138.39`;
- uploads through `photos.youssefbouanani.com` succeed without Cloudflare in the data path.

#### PhotoDrop / Immich Drop

- Public hostname: `photodrop.youssefbouanani.com`
- Backend: `http://192.168.68.64:9002`
- Container: `immich-drop` (`ghcr.io/nasogaa/immich-drop:latest`, host `9002` → container `8080`)
- Cache Assets off
- Block Common Exploits on
- WebSockets on
- Publicly Accessible

Advanced Nginx:

```nginx
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

client_max_body_size 0;

proxy_request_buffering off;
proxy_buffering off;

proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
```

Verified:
- public direct GET reaches NPM/OpenResty and redirects to `/login`;
- a 140 MB video reached PhotoDrop and was identified as a duplicate with zero upload errors, proving the former Cloudflare 100 MB request-size path is bypassed.

#### Nextcloud

- Public hostname: `nextcloud.youssefbouanani.com`
- Backend: `http://192.168.68.64:30027`
- TrueNAS container: `ix-nextcloud-nextcloud-1`
- Cache Assets off
- Block Common Exploits on
- WebSockets on
- Publicly Accessible

Advanced Nginx:

```nginx
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

client_max_body_size 0;

proxy_request_buffering off;
proxy_buffering off;

proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
```

PHP limits verified inside `ix-nextcloud-nextcloud-1`:

```text
max_execution_time = 0
max_input_time = -1
memory_limit = 512M
post_max_size = 3G
upload_max_filesize = 3G
```

Verified public direct route:
- resolves to `105.159.138.39`;
- wildcard Let's Encrypt certificate;
- `server: openresty`;
- HTTP/2 302 to `/login`;
- no Cloudflare `server` header or `cf-ray`.

#### Jellyfin

- Public hostname: `media.youssefbouanani.com`
- Backend: `http://192.168.68.52:8096`
- Backend server: Kestrel
- Cache Assets off
- Block Common Exploits on
- WebSockets on
- Publicly Accessible

Advanced Nginx:

```nginx
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_buffering off;

proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
```

Verified public direct route:
- resolves to `105.159.138.39`;
- wildcard Let's Encrypt certificate;
- `server: openresty`;
- HTTP/2 302 to `web/`;
- no Cloudflare `server` header or `cf-ray`.

### Pending NPM security hardening

Because the router-wide Cloudflare-only filter was removed, NPM's public listener is directly reachable on forwarded TCP 80/443.

Next task:
1. inventory all NPM proxy hosts;
2. classify each as **direct-public**, **Cloudflare-only**, or **internal-only**;
3. leave `photos`, `photodrop`, `nextcloud`, and `media` unrestricted for direct public access;
4. restrict Cloudflare-only NPM virtual hosts to Cloudflare source ranges at Nginx/NPM level;
5. ensure internal-only hosts are not exposed through the public NPM listener.

Do not restore a global router-level Cloudflare source-IP filter on NPM ports 80/443.


---

## 5. code-server (Updated 2026-10-08)

code-server was rebuilt cleanly during the CT111 → VM122 migration rather than copying the previous root-owned installation.

- Host: Docker-Infra VM122 (`192.168.68.36`).
- URL: `https://code.youssefbouanani.com`.
- Backend: `http://192.168.68.36:8443`.
- Installed natively on Debian rather than inside Docker.
- Runs as Linux user `youssef`.
- Managed by systemd unit `code-server@youssef`.
- Workspace: `/home/youssef/homelab/homelab.code-workspace`.
- code-server password authentication remains enabled.
- SSH uses dedicated identity `/home/youssef/.ssh/code_server_ed25519`.
- SSH aliases provide access to:
  - `pve` → `192.168.68.122`, root
  - `nas` → `192.168.68.123`, root
  - `apps` → `192.168.68.57`, youssef
  - `gcp` → current GCP VM, user `youssef123`
- Batch-mode SSH was verified successfully against all four targets.
- VS Code extensions include YAML, SSH FS and Task Buttons.
- Workspace Task Buttons expose PVE, NAS, Docker Apps and GCP SSH terminals.
- The old code-server installation belonged to the former Docker CT111. The current instance runs on Docker-Infra VM122.

## 6. Router Backup (Added April 8, 2026)

Problem: Gnuton's Merlin firmware 3004.388.x lacks cifs.ko kernel module, so BACKUPMON cannot mount SMB shares.
Solution: Custom SCP-based backup script using Dropbear SSH (native to Merlin).

Setup:
- Script: /jffs/scripts/backup-router.sh
- SSH Key: /jffs/.ssh/id\_dropbear (Dropbear RSA 2048-bit key)
- TrueNAS User: youssef (local user with SSH Shell access enabled, home dir: /mnt/Bolt/configs/youssef)
- Remote Path: /mnt/Bolt/configs/router-backups/router-backup-YYYYMMDD
- Transfer Method: dbclient (Dropbear SSH client) with key auth (no password needed)
- Schedule: cru (cron) at 02:30 daily, persisted in /jffs/scripts/services-start
- Retention: 30 days auto-cleanup on TrueNAS

| File | Contents |
|------|----------|
| nvram\_YYYYMMDD.cfg | All router settings, DHCP, firewall rules |
| jffs\_YYYYMMDD.tar.gz | Scripts (services-start, YazFi, scMerlin, Skynet, SSL certs, addons) |
| usb\_entware\_YYYYMMDD.tar.gz | Entware packages (Tailscale, Tailmon, Skynet blocklists) ~39MB |

services-start contents:
#!/bin/sh
modprobe tun
/jffs/scripts/scmerlin startup scMerlin
/jffs/scripts/YazFi startup YazFi
cru a fixnasarp "\*/5 \* \* \* \*" "arp -s 192.168.68.123 ********"
cru a router-backup "30 2 \* \* \*" "/jffs/scripts/backup-router.sh"

---

## 7. Homelab Hub (NEW)

- **Stack:** React + Express + SQLite (Drizzle ORM + better-sqlite3)
- **Host:** Docker-Apps VM121 (`192.168.68.57`), port 3500 (internal), mapped from 5000
- **Docker dir:** `/opt/docker/homelab-hub/`
- **Public URL:** https://hub.youssefbouanani.com (Cloudflare Tunnel, no Zero Trust auth — plain tunnel route)
- **Features:** Dashboard (Mission Control), Project detail with phase accordion + task toggle, Infrastructure reference, MD/HTML import engine, sidebar project delete (hover → confirm)
- **Seeded projects:** Infrastructure Restructuring (21 tasks), Backup Strategy (13 tasks), Homelab Visualizer (6 tasks)
- **iframe fix:** Express server removes `X-Frame-Options` and sets `frame-ancestors *.youssefbouanani.com` so it embeds cleanly in homelab-viz

---

## 8. Homelab Visualizer (homelab-viz)

- **Deployed to:** Cloudflare Pages at homelab.youssefbouanani.com
- **Files:** `index.html` + `homelab.json` + `dr-bible.md` (edit JSON locally, upload via Cloudflare UI)
- **Tabs:** Topology, Graph, List, Backups, **Project Hub** (iframe → hub.youssefbouanani.com), **DR Bible** (renders dr-bible.md with search, TOC, print)
- **DR Bible tab:** Added 2026-04-16. Loads `dr-bible.md` via fetch, renders with marked.js. Features: auto-generated clickable TOC, live search with highlighting, print/PDF button. Keyboard shortcut: `6`. Covers complete backup architecture, service-to-backup mapping, step-by-step recovery procedures for all VMs/LXCs/services, 5 major disaster playbooks, 6 DR exercises with schedule.
- **Maintenance:** Only `homelab.json` needs editing for infra changes; `index.html` only changes for new features; `dr-bible.md` updated when backup strategy changes
- **`\_headers`:** Custom CSP with `frame-src https://\*.youssefbouanani.com` to allow hub iframe
- **CDN deps:** D3.js v7 (graph view), marked.js (DR Bible markdown rendering)

---

## 9. Proxmox Node Config Backup (Updated April 8, 2026)

Script: root/nodebackupconfigs.sh on both pve and NAS nodes. Schedule: Daily at 08:00 via crontab. Logs to /var/log/nodebackupconfigs.log. Destination: Tuxis PBS (pbs005.tuxis.nl), ns: ProxmoxNodes → auto-syncs to RemoteBackups PBS (fra1-1.pbs-host.de) daily at 01:00 via sync job. Notifications: Gotify (token omitted from context) — success priority 2, failure priority 8.

| Archive | Contents |
|---------|----------|
| etc-pve.pxar | VM/LXC configs, storage.cfg, user.cfg, vzdump.cron, firewall |
| etc-network.pxar | Network interfaces |
| etc-modprobe.pxar | VFIO passthrough (pve), ZFS ARC tuning (NAS), GPU blacklists |
| etc-sysctl.pxar | Kernel params |
| etc-ssh.pxar | SSH host keys & server config |
| etc-apt.pxar | Repo sources & keys |
| root-home.pxar | Scripts (.sh), .ssh keys, .bashrc |
| etc-systemd.pxar | Custom units & overrides |
| hostfiles.pxar | fstab, hosts, resolv.conf, hostname, crontab, dpkg package list, lsmod, kernel cmdline, node config JSON |

Old script: node-backup.sh — Commented out on pve, can be deleted. Was backing up entire / to local PBS; replaced by targeted config backup.

---

## 10. Known Issues / Recurring Concerns

- **NVMe SMART/endurance monitoring**: ACTIVE 2026-10-09. `nvme-health-check.sh` runs daily via systemd timer on both Proxmox nodes. Gotify notifications are event-driven rather than daily status messages: wear milestones at 70/80/90/100%, temperature threshold crossings, spare depletion, increased media errors, NVMe critical warnings and abnormal daily write rate. Normal healthy runs are silent.

- **NPM direct-listener exposure**: OPEN 2026-09-08. Router-wide Cloudflare-only filtering was removed so direct-public services can work. Review all NPM hosts and apply Cloudflare source-IP restrictions per virtual host where appropriate; keep internal-only hosts off the public listener.

- **VM backup locks**: RESOLVED 2026-04-05. VMs/LXCs no longer remain locked after backup.
- **TrueNAS VM 102 backup**: RESOLVED 2026-04-05. Backups working reliably since fix.
- **Uptime Kuma DB bloat**: RESOLVED 2026-04-16. Retention set to 90 days in Settings → General. DB size will shrink over time.
- **GCP egress limit**: 1 GB/month free tier (running Portainer, Cloudflare, Tailscale exit node)
- **Privado VPN speed**: Only ~10 Mbps on Asus router (expected 200 Mbps)
- **NVMe endurance**: PVE WDC PC SN730 256 GB is at **68% Percentage Used**; NAS KIOXIA KBG30ZMV256G 256 GB is at **51%**. Both report 100% Available Spare and zero media/data-integrity errors. Daily threshold/milestone monitoring with Gotify is active on both Proxmox hosts. TLC replacements are being evaluated; priority will be guided by wear and measured daily write rate.
- **Gnuton's Merlin firmware**: No cifs.ko module → BACKUPMON network backup not possible; using custom Dropbear SCP script instead
- **MeshCentral Windows 11 agent install**: RESOLVED 2026-04-05. Agent GUI installer failed with "The specified procedure could not be found" on Windows 11 24H2 due to WMIC removal by Microsoft. Fixed by updating MeshCentral server to latest via npm install meshcentral@latest. CLI workaround: meshagent64-Desktops.exe -fullinstall.

---

## 11. Preferences & Conventions

- **Docker**: Current production Compose stacks on VM121/VM122 live under `/opt/docker/<service>/docker-compose.yml`. Historical Docker backups may contain earlier layouts.
- **Reverse proxy**: Cloudflare Tunnel + Authentik OIDC for most public services. NPM is used directly for four DNS-only services that must bypass the Cloudflare reverse proxy: Jellyfin (`media`), Immich (`photos`), Nextcloud, and PhotoDrop.
- **Backups**: Local PBS VM110 on main `pve` + 2 cloud PBS targets, monthly physically-offline USB PBS datastore `Cold-Backups`, Docker DB dumps to B2, Immich offsite copy to OneDrive, daily ASUS router backup to TrueNAS, daily Proxmox node config backup to Tuxis/RemoteBackups, plus automated TrueNAS and ASUS recovery bundles embedded into the monthly cold host snapshots.
- **AI tools**: No dedicated self-hosted AI stack currently active; former LXC109 has been deleted.
- **Remote access**: MeshCentral (corporate workaround), Tailscale (homelab mesh)
- **Homelab context source of truth**: private Git repository `********/homelab-context`, canonical working copy on Docker-Infra VM122 at `/opt/homelab-context`, canonical file `homelab-context.md`. The former `/root/homelab-context` copy on the main PVE host is retained temporarily only as a rollback copy while the VM122 migration and cold-backup integration are validated. Public sanitized publishing is automated via GitHub Actions → Wrangler v4 → Cloudflare Worker. Read endpoint: `https://homelab-context.youssefbouanani.com/context.txt` with the Worker-backed publication workflow retained underneath. A confirmed infrastructure change is not considered complete until `homelab-context.md` is updated and pushed. Trilium receives the full private copy through the relay; the public Worker receives only generated `homelab-context-ai.md`, never the canonical file.

---

### Live Services and uptime monitoring (2026-11-19)

- **Live Services** is deployed in the production Visualizer at [homelab.youssefbouanani.com](https://homelab.youssefbouanani.com/). Cloudflare Access authenticates remote access to the private service inventory. The tab shows internal addresses and ports, source evidence and Kuma health. Discovery reconciles the static catalog with Docker published ports and Nginx Proxy Manager routes. Unmatched entries are unmonitored and expired evidence is stale. Catalog-only entries may remain after an endpoint disappears.
- **Manual refresh.** Opening the tab loads the saved snapshot. **Snapshot … ago** shows the time since the last successful scan. **Refresh now** calls the authenticated Hub API, and the Docker-Infra listener runs the collector on demand. The periodic collector timer is disabled. Kuma runs its own monitoring schedule.
- **Local Kuma** handles LAN, apps, backups, PBS, storage and replication. Eleven checks send Telegram directly, covering both Proxmox hosts, primary DNS, Nginx Proxy Manager, four backup destinations, PBS verification, TrueNAS data pools and Docker-Apps host reachability. The host is checked every two minutes and alerts after three consecutive failures. Individual Docker-Apps container checks stay quiet and use the repaired SSH Unix socket. Selected checks still use Gotify. New checks do not inherit alerts automatically.
- **GCP Kuma** has 15 active monitors and groups, with nine Telegram checks. One heartbeat per minute from Docker-Infra replaces 90 mirrored reports. It reflects the Local Kuma check for Homelab Hub and expires after three minutes without a report, so GCP can alert independently if the local stack or home internet fails. Public probes run every two to five minutes. Gotify must return its application health response. The Home Assistant and PVE access-entry checks can pass at the sign-in page. The local Docker-Apps alert adds no GCP traffic. Paused monitor history was retained.

### Uptime Kuma Monitoring Architecture (2026-10-12 baseline)

**Platform**
- Local Uptime Kuma 1.23.17 runs on Docker-Infra VM122 (`192.168.68.36:3001`).
- Public monitoring entry: `monitoring.youssefbouanani.com`.
- Persistent data: `/opt/docker/uptime-kuma/uptime-kuma-data`, mounted inside the container at `/app/data`.
- Existing monitor IDs, heartbeat history, Push tokens and notification assignments were preserved during the overhaul.
- October notification assignments are historical. See the November 19 summary above for current alert routing.
- Python API administration environment: `/home/youssef/.venvs/uptime-kuma-admin`, using `uptime-kuma-api2`.
- Management scripts and protected Push configuration live under `/home/youssef/uptime-kuma-migration/` on Docker-Infra. Push URLs/tokens are secrets and must not be published.

**Docker container monitoring**
- Docker-Apps runs at `192.168.68.57` on NAS Proxmox.
- Uptime Kuma Docker Host ID 3 uses a Unix socket through a dedicated SSH tunnel rather than an exposed Docker TCP port.
- Docker-Infra systemd unit: `uptime-kuma-docker-apps-tunnel.service`.
- Dedicated SSH identity: `~/.ssh/uptime-kuma-docker-apps` on Docker-Infra.
- Tunnel socket: `/opt/docker/uptime-kuma/uptime-kuma-data/docker-apps-tunnel/docker.sock`, visible inside Kuma under `/app/data/docker-apps-tunnel/docker.sock`.
- Corrected existing container monitors for Cloudflare DDNS (ID 2), TeslaMate (ID 3), Stirling PDF (ID 11), Mealie (ID 20) and Trilium (ID 21).
- Added additional Docker, infrastructure and HTTP checks across IDs 36-67.
- Retired obsolete AdGuard, Watchtower and Tugtainer container monitors rather than keeping invalid alerts.

**Monitoring groups**
- `Proxmox - Backup Jobs`: IDs 68-73.
- `PBS - Backup Health`: IDs 74-75.
- `TrueNAS - Storage & Replication`: IDs 76-79.
- `Infrastructure - Core Services`: existing `Infra - ...` monitors plus primary and secondary AdGuard DNS checks (IDs 53, 54).
- Existing ******** infrastructure monitors IDs 28-30 retained and restored; do not recreate them.

**PVE scheduled-backup health collector**
- Host: main Proxmox `pve` (`192.168.68.122`).
- Script: `/usr/local/sbin/yb-pve-backup-monitor.py`.
- Protected Push configuration: `/root/pve-backup-push.json`.
- systemd service: `yb-pve-backup-monitor.service`.
- systemd timer: `yb-pve-backup-monitor.timer`, `OnCalendar=*:0/15`.
- Reads Proxmox vzdump task history and targeted task logs, and reports the latest job outcome and age since last successful completion.
- Monitor 68: Local backup, 36-hour threshold.
- Monitor 69: `backupsOnNas`, 36-hour threshold.
- Monitor 70: `RemoteBackups`, 36-hour threshold.
- Monitor 71: `Tuxis`, 36-hour threshold.
- Monitor 72: Weekly `SMB_Backup`, 192-hour threshold.
- Monitor 73: Manual `Cold-Backups` USB, deliberately PAUSED pending full-scope monitoring validation. Collector intentionally excludes this Push.
- Failed/warning latest results should be surfaced; a running backup is not automatically considered a failure when the preceding success is sufficiently recent.
- Push timeout for IDs 68-72 is 1800 seconds; collector executes every 15 minutes.
- Collector verified with five accepted UP reports on October 12.
- Monitoring does not change backup retention, schedules or remote-datastore capacity management.

**PBS verification and maintenance health collector**
- Host: local PBS VM110 (`192.168.68.71`).
- Script: `/usr/local/sbin/yb-pbs-health.py`.
- Protected configuration: `/root/yb-pbs-health.json`.
- systemd service: `yb-pbs-health.service`.
- systemd timer: `yb-pbs-health.timer`, `OnCalendar=*:0/15`.
- Monitor 74: Latest datastore verification must be successful and no older than 36 hours.
- Monitor 75: Latest prune and garbage collection task results must be OK; no arbitrary freshness threshold for maintenance.
- No datastore-capacity alerts are implemented in these two checks.
- Push interval 1800 seconds; timer every 15 minutes.
- October 12 live checks: verification OK; prune OK; GC OK; both Push reports accepted.

**TrueNAS pool and replication health collector**
- Host: TrueNAS SCALE VM102 (`192.168.68.64`).
- Script: `/home/truenas_admin/yb-truenas-health.py`.
- Protected configuration: `/home/truenas_admin/yb-truenas-health.json`.
- Progress state: `/home/truenas_admin/yb-truenas-progress.json`.
- TrueNAS-managed Cron Job: `YB TrueNAS Health Monitor`, user `truenas_admin`, every 15 minutes (`*/15 * * * *`).
- Command: `/usr/bin/python3 /home/truenas_admin/yb-truenas-health.py --push`.
- Collector uses direct read-only `zpool` and `midclt` access; no passwordless sudo.
- Monitor 76: Data pools `Bolt` and `Tank` must both be ONLINE.
- Monitor 77: `boot-pool` must be ONLINE.
- Monitor 78: Local replication task 11, `Bolt/configs - Tank/configs`, must be FINISHED without warnings.
- Monitor 79: Remote replication task 16, `Youssef_to_********`, checks RUNNING/FINISHED state and available progress fields.
- Remote stall policy: six hours without detectable changes in dataset, snapshot, snapshots_sent or bytes_sent. The collector must retain and compare progress across runs.
- Important qualification: the six-hour detector uses progress-field changes, not actual network throughput; verify progress state across scheduled runs before relying on stall alerts.
- Push timeout is 1800 seconds; monitoring interval 15 minutes.
- On October 12 all four checks reported UP and Push was accepted.
- Boot-pool historical `sda3` WRITE errors (18) were cleared with `zpool clear`; the pool returned ONLINE with zero displayed errors. Clearing counters did not repair any possible underlying disk/path issue; watch for recurrence.
- Local replication warning was caused by obsolete `Tank/configs/paperless/pgdata`, an unmounted read-only leftover test dataset (96 KB, April 18 snapshot, no corresponding source). After targeted deletion, task 11 completed FINISHED with zero warnings.
- Remote replication remained RUNNING and reported byte progress fields; do not interrupt it for monitoring.
- These checks are observational and must not modify ZFS properties, snapshots, replication tasks or retention.

---
## 12. Timeline / Changelog

- **2026-11-26 — Regional Wi-Fi gateways:** Enabled HOME_USA alongside HOME_France, validated both regional paths and reboot recovery, and verified CT111 and CT116 are selected in all four backup tiers.

- **2026-11-19 — Live Services and Kuma:** Deployed the authenticated service directory with manual refresh, added direct local Telegram alerts and reduced GCP monitoring to a focused off-site safety net.
- **2026-11-09 — Search indexing disabled:** Deployed Cloudflare zone-wide `X-Robots-Tag: noindex, nofollow` rule; verified on Recipes, Project Hub and public Context. Google Search Console removal request for Recipes homepage submitted (processing).
- **2026-10-14**: Established stable Dawarich follow-up items 1–7. Read-only Geoapify monitor: budget safe at 1121/2500; recent bucket exhausted, historical allowance largely unused. 995 formatted marine results since cap activation, last completion yesterday 23:33 UTC; 76995 points still unstamped despite substantial queue drain. Prioritize bounded historical routing/recovery under item 1; no queue/provider mutations.

- **2026-10-14**: Approved Bluetooth motorcycle backend DEPLOYED after verified 296 MB PostgreSQL backup; both containers healthy, authenticated/public API checks and active queues passed, durable Geoapify ledger retained. Free 28-block v2 flow import confirmed by user after HTTP field-type fix; Phone credentials configured by user; start/runtime/upload and Oct 21 bike test remain pending.

- **2026-10-14**: Prepared (not deployed) Bluetooth motorcycle backend: 28 Bluetooth + 13 Geoapify tests passed. Received Automate export and built FREE 28-block replacement with 14 parsed-flow simulations. Production approval and phone/hardware validation remain pending.

- **2026-10-14**: On user confirmation that no cycling was performed, converted all remaining 1805 cycling segments across 697 tracks to saved manual motorcycle corrections. Verified track geometry/metrics and ownership of 861087 GPS points unchanged. Refreshed 13 affected monthly/yearly Insights activity digests across [2013, 2015, 2016, 2025, 2026] and invalidated scoped display caches; zero cycling segments remain for this user. Before/after label and digest snapshots persisted under optimization/yb-geoapify-tests/all-cycling-*.json. Other transport modes preserved; automatic classification of future journeys can still require correction.
- **2026-10-14**: Refreshed September/October 2026 and yearly Insights activity digests after manual motorcycle labeling; cleared only affected user/year Insights display fragments. Yearly saved summary now motorcycle=24.15h, cycling=91.61h. Remaining cycling belongs to other historical tracks (1,805 segments outside the six corrected trip tracks); no broader label conversion performed. Track geometry/GPS unaffected. Insights activity cards cache for 24h independently of digest updates, so manual corrections require digest refresh and scoped display-cache invalidation.
- **2026-10-13**: Corrected 145 cycling and 81 driving segments to motorcycle on rebuilt trip tracks 32129–32134, using native manual-correction fields (source=user, corrected_at, high confidence). All six dominant labels now motorcycle; geometry, distance, 221,107 GPS points and point ownership preserved. Stops/walking/running retained. Before-label snapshots preserved under optimization/yb-geoapify-tests/. Future automatic classification may still require manual correction; resetting detection can replace manual segments. User confirmed exclusive Geoapify usage.

- **2026-10-13**: Deployed and activated approved durable PostgreSQL Geoapify credit accounting after a fresh verified backup. Cap 2,500 attempted lookups per rolling 24 hours (recent 1,000; historical 1,500). Bootstrap retained 24 provider-dashboard credits plus 96 legacy reservations. One bounded API probe succeeded with GPS and tracks preserved; both queues subscribed and both containers healthy. 13 candidate regressions passed. activation.json records 2026-10-13T23:17:19Z. Backlog processing remains budget-limited.
- **2026-10-13**: Deployed and enabled Dawarich persistent journey-boundary protection, activated nine reviewed boundaries with the September 22 ferry excluded, and completed the explicitly approved two-track rebuild into 11 pieces. All 271,614 GPS points preserved; school run and unrelated history preserved. Follow-up verified piece ownership, boundary protections, service health and geocoding hold. Motorcycle labels manually corrected on October 13; full map rendering and longer natural-processing observation remain pending.

- **2026-10-12**: Expanded and organized Uptime Kuma monitoring on Docker-Infra. Repaired Docker-Apps SSH socket tunnel, corrected migrated Docker monitors, added Docker/HTTP/infrastructure checks, and grouped Proxmox backups (68-73), PBS health (74-75), TrueNAS storage/replication (76-79), and core infrastructure/AdGuard DNS. Automated PVE and PBS Push collectors using 15-minute systemd timers, and TrueNAS health via a 15-minute TrueNAS-managed cron task. Push intervals are 30 minutes; manual Cold USB monitor 73 remains paused. ******** infrastructure monitors 28-30 restored.
- **2026-10-12**: TrueNAS boot pool returned ONLINE after clearing historical ZFS errors; local replication task 11 finished without warnings after removal of obsolete Paperless test replica. Remote replication task 16 remains monitored for progress without interruption.
- **2026-10-12**: Extended ASUS/Tailscale connectivity from TrueNAS-only replication to home-LAN-initiated access to ********'s `192.168.50.0/24` subnet. Installed idempotent LAN-wide MASQUERADE alongside the existing TrueNAS SSH rule in `/jffs/scripts/yb-********-routing.sh`, invoked by Merlin `nat-start`. Verified desktop and Docker-Infra reachability to ********'s TrueNAS, Proxmox and router VM. No public exposure added.

- **2026-10-11**: Fixed ******** TrueNAS replication routing over Tailscale. Persistent LAN safeguard and scoped SSH source NAT installed through Merlin hooks; reboot and SSH connectivity verified. Scheduled replication re-enabled; completion verification pending.
- **2026-10-11**: Completed cold-backup integration for the canonical homelab context repository. The main PVE cold hook now pulls `/opt/homelab-context` from Docker-Infra VM122 and embeds it in `host/pve` as `homelab-context.pxar` alongside the PVE configuration and ASUS/Merlin recovery bundle. A real PBS restore test from snapshot `host/pve/2026-10-11T20:31:29Z` succeeded, and the restored canonical `homelab-context.md` SHA256 exactly matched the live VM122 copy.
- **2026-10-11**: Completed a full cold-backup coverage audit while the removable USB PBS datastore was online. The cold job was expanded to `100,102,103,104,105,106,107,108,110,111,112,113,114,115,117,121,122`. Fresh targeted backups were completed for VM104 Zorin, VM105 Win11, VM112 Ubuntu, CT114/CT115 AdGuard, VM121 Docker-Apps and VM122 Docker-Infra; all other scheduled guests retain recent Oct 6 cold copies. PVE, NAS, PBS, ASUS/Merlin and TrueNAS configuration recovery archives were also refreshed successfully.
- **2026-10-11**: Migrated the canonical homelab-context working repository from `/root/homelab-context` on the main PVE host to Docker-Infra VM122 at `/opt/homelab-context`. Commit/hash parity, clean Git state, generator dependencies and GitHub authentication using the dedicated repository SSH key were verified before cutover. Cold-backup integration for the canonical repository was validated on 2026-10-11 by restoring `homelab-context.pxar` from `Cold-Backups` and confirming its `homelab-context.md` SHA256 exactly matched the live VM122 canonical copy. The old PVE working copy remains temporarily only as a rollback copy until final cleanup.
- **2026-10-11**: Reconciled Homepage dashboard integrations after Docker/Portainer consolidation. Homepage now shows separate Portainer cards for Docker-Apps (endpoint ID 2) and Docker-Infra (endpoint ID 5) through the single Portainer Server on VM121. AdGuard widget now queries primary AdGuard directly at `192.168.68.10`, while its browser link remains external. Jellyfin Homepage integration was updated for Jellyfin 12 using widget `version: 2`, `media.youssefbouanani.com`, and a dedicated environment-supplied API key. All three dashboard API errors were resolved.
- **2026-10-10**: Completed Dawarich 1.15.3 trip-map optimization on VM121. Deployed healthy custom `yb/dawarich:1.15.3-trip-preview-v2`, restored continuous ferry route visibility, committed development changes as `35cc3ad`, and pushed source/Compose override to private GitHub repository `Joe123-B/yb-dawarich-optimized`. Verified restored GPS database and identified predominantly one-second OwnTracks reporting during Cosardinia; OwnTracks fast-interval limiting was enabled and verified at an 11-second median; daily-route selection, replay, poster and video regression tests all passed.
- **2026-10-09**: Post-migration infrastructure reconciliation. Corrected local PBS VM110 placement to the main `pve` node, updated VM121/VM122 and DNS `.10/.11` topology, removed deleted AI LXC109 from current-state sections, and updated NAS KIOXIA ownership/content. Verified Zorin VM104 currently resides on `Zpool:vm-104-disk-0` on the NAS-node KIOXIA.
- **2026-10-09**: Investigated NAS fan/write activity and traced the dominant workload to Dawarich on VM121. A large genuine reverse-geocoding backlog was being processed while Redis performed frequent RDB snapshots. OwnTracks stationary high-frequency reporting was stopped, Dawarich Sidekiq concurrency was reduced to 3, and Redis persistence was changed to `save 900 1`. The reverse-geocoding queue was draining at that time; current geocoding hold is recorded in the journey-boundary section.
- **2026-10-09**: Established NVMe health baselines and deployed silent daily health monitoring with Gotify threshold alerts on both Proxmox nodes. PVE WDC SN730 is at 68% Percentage Used; NAS KIOXIA is at 51%; both currently report 100% spare and zero media/data-integrity errors. Historical Docker CT117/CT111 storage mapping confirms their root filesystems were on the PVE SN730-backed Zpool, making historical Docker write load a plausible contributor to SN730 wear.

- **2026-10-08**: Completed Docker host consolidation and infrastructure migration. Debian 13 VM122 `docker-infra` on the main PVE node took over production IP `192.168.68.36` from CT111. VM122 now runs Nginx Proxy Manager, Authentik, cloudflared, Cloudflare DDNS, Homepage, Uptime Kuma, Gotify, TrueNAS Gotify adapter and Portainer Agent. code-server was rebuilt cleanly as a native `youssef` systemd service with a dedicated SSH identity and browser SSH shortcuts for PVE, NAS, Docker-Apps and GCP.
- **2026-10-08**: VM121 `docker-apps` on the NAS node is now the production application Docker host at `192.168.68.57`, replacing CT117. Application services include Portainer Server, Mealie, Spliit, Trilium, Dawarich, Zakat, Ghost, TeslaMate, Paperless, Stirling PDF, Homelab Hub, Immich Kiosk, WatchYourLAN and Speedtest.
- **2026-10-08**: Dedicated DNS architecture finalized: CT114 AdGuard primary at `192.168.68.10` and CT115 secondary at `192.168.68.11`. ASUS DHCP distributes both resolvers; VM122 itself uses `.10/.11`.
- **2026-10-08**: CT111 and CT117 were powered off and retained temporarily as rollback hosts. CT111 must not be started while VM122 owns `.36`; CT117 must not be started while VM121 owns `.57`.
- **2026-10-08**: Cloudflare ingress audit found no remaining `192.168.68.56` references. Production infra routes point to VM122 `.36`; application routes point primarily to VM121 `.57`. NPM remains on `.36` and ASUS TCP 80/443 forwarding continues unchanged.
- **2026-10-08**: Added VM122 to Tuxis, RemoteBackups, backupsOnNas and Cold-Backups while retaining CT111 during the rollback period. Successful VM122 backup to backupsOnNas verified after cutover.
- **2026-10-08**: Completed Spliit Backblaze B2 credential rotation. The previously exposed application key was revoked, the replacement restricted key successfully created a post-revocation backup and enforced seven-object retention.

- **2026-10-06**: Finalized and substantially expanded the physically-offline `Cold-Backups` disaster-recovery tier. The removable PBS USB datastore is intentionally disconnected between backup cycles. Automatic GC scheduling was removed, the obsolete prune job for the former `Cold` datastore was deleted, and stale groups `ct/114`, `ct/115`, plus old `ct/113` snapshots from the former `restoreimmich` workload were removed. The original cold guest set was `100,102,103,106,107,108,110,111,113,114,115,117,121,122` with `keep-last=6,keep-yearly=2`. A complete guest refresh, manual GC, and full datastore verification completed successfully with zero verification errors.

  Host configuration backups were integrated into the same GUI-triggered cold workflow using PBS namespace `Proxmox_Nodes`. `host/pve` backs up `/etc` and `/etc/pve`; `host/NAS` backs up `/etc` and `/etc/pve`; `host/pbs` backs up `/etc` and `/etc/proxmox-backup`. Dedicated PBS service account `coldhost@pbs` uses separate namespace-scoped API tokens for pve, NAS and PBS with only `Datastore.Backup` and `Datastore.Prune` privileges. Host-group ownership was transferred to the dedicated tokens and token secrets are stored in root-only local files.

  Global `vzdump` hooks were installed on pve and NAS through `/usr/local/sbin/cold-vzdump-hook.sh` and `/etc/vzdump.conf`. Hooks act only when `STOREID=Cold-Backups`. pve backs up/prunes itself and triggers PBS through a restricted forced-command SSH key; NAS backs up/prunes itself; PBS uses `/usr/local/sbin/cold-pbs-host-backup.sh`. All three host backup paths were tested successfully without interactive authentication.

  Added automated **TrueNAS SCALE 25.10.7 configuration recovery** to the cold workflow. A dedicated NAS→TrueNAS SSH key invokes `/home/truenas_admin/bin/cold-truenas-config-export.sh` with `bash` because TrueNAS `/home` is intentionally `noexec`. The helper uses `core.download` + `config.save` with secret seed, pool-key option and authorized SSH keys. The resulting archive is streamed temporarily to the NAS node, validated, embedded into `host/NAS` as `truenas-config.pxar`, then deleted. Validated contents include `freenas-v1.db`, `pwenc_secret`, `truenas_admin_authorized_keys`, and `root_authorized_keys`.

  Added automated **ASUS RT-AX58U V2 / Merlin router recovery** to the same cold workflow. A dedicated PVE→ASUS SSH key and `/usr/local/sbin/cold-asus-router-export.sh` create a fresh recovery bundle consisting of native NVRAM export, full `/jffs`, full Entware installation/state, and router/firmware metadata. Entware is streamed directly over SSH rather than archived in router RAM; source size is ~588.5 MB and compresses to ~97 MB. The complete recovery bundle is ~98 MB, is embedded into `host/pve` as `asus-router.pxar`, and the temporary PVE copy is removed automatically. Existing daily router backup to TrueNAS remains active independently.

  The cold Proxmox job `backup-8a13334d-46c2` remains intentionally disabled (`enabled=0`) and is started manually with **Run now** only after the USB disk is attached. Monthly operation is now: connect USB → confirm `Cold-Backups` → GUI **Run now** → selected guests back up → fresh TrueNAS and ASUS recovery bundles are generated → pve/NAS/PBS host snapshots run → retention prunes automatically → manual GC / periodic verify → PBS GUI **Unmount** → confirm datastore inactive → physically disconnect. Plugging in the USB alone does not start the backup. Current cold PBS archives remain `crypt-mode none`, so the physical USB must be treated as sensitive recovery media.

  Resolved the **LXC 111 (`docker`) stale `vzdump` snapshot cleanup issue** discovered during the final cold-backup validation. CT111 had an obsolete bind mount exposing the entire PVE host root filesystem as `mp1: /,mp=/mnt/pve`, originally created for the former `code.youssefbouanani.com` / code-server workflow. Investigation confirmed no running or stopped Docker container, active compose stack, or user process still depended on `/mnt/pve`; the old code-server container no longer exists. The full-host bind mount was removed. The remaining `mp0` bind mount (`/Zpool/subvol-117-disk-0` → `/mnt/docker2`) was retained with `backup=0,replicate=0`. CT111 was fully stopped/started, all Docker services returned normally, and a controlled snapshot-mode backup to `backupsOnNas` completed successfully with clean temporary snapshot removal, only `current` remaining in `pct listsnapshot 111`, and no CT lock. The previous need for `pct delsnapshot 111 vzdump --force` is therefore considered resolved.


- **2026-10-05**: Added high-availability Tailscale subnet routing for the home `192.168.68.0/24` network. Asus RT-AX58U v2/Tailmon remains the primary subnet router; a dedicated minimal unprivileged Debian LXC on the main PVE Proxmox node now advertises the same subnet as the secondary router. Configured `/dev/net/tun` passthrough, IPv4 forwarding, `--accept-dns=false`, `--accept-routes=false`, and automatic LXC startup. Failover was tested successfully: after disabling/unavailable Asus Tailscale, remote Tailscale clients retained LAN access through the LXC and could SSH to the Asus at `192.168.68.1`. Direct Asus WAN administration/SSH remains intentionally disabled.

- **2026-09-17**: Main Proxmox `pve` node maintenance completed after upgrade to **Proxmox VE 9.2.20**, running kernel `7.0.14-17-pve`. Removed obsolete accumulated 6.8 and older 6.17 kernels plus orphaned packages, cleaned the APT cache, and retained fallback kernels `7.0.12-1-pve` and `6.17.13-21-pve`. Root filesystem usage dropped from approximately **43 GB / 80 GB (57%)** to **30 GB / 80 GB (40%)**, reclaiming approximately **13 GB** without removing required data. `/boot` reduced from approximately 1.8 GB to ~500 MB. Required local vzdump backups for LXCs 103, 111 and 117 remain intentionally retained at approximately 22 GB. `local-lvm` is ~31.3% used. Main ZFS `Zpool` is ONLINE at ~78.1% usage with zero scrub errors and no known data errors. `Cold-Backups` remains intentionally inactive when not mounted. Final `systemctl --failed` reports **0 failed units**.

- **2026-09-17**: Removed obsolete Spliit/MinIO storage configuration. Confirmed Spliit runs in LXC 117 (`docker2`) as `spliit_app` + PostgreSQL `spliit_db`, with receipt/object storage now using **Backblaze B2 via S3** (`spliit-receipts`) rather than the old TrueNAS NFS/MinIO path. `/mnt/nas-spliit` was empty and had no active cron, systemd, Docker or application references. Removed CT 117 `mp0` bind mount and deleted the stale `192.168.68.64:/mnt/Tank/media/spliit-minio` entry from `/etc/fstab`; reloaded systemd and cleared the failed mount state. CT 117 retains only active Paperless mounts `mp1`-`mp4`. Security follow-up: rotate the Backblaze B2 S3 application key exposed during troubleshooting.



- **2026-09-10**: Improved public Worker verification reliability. `scripts/verify_public.py` now retries the `/` and `/homelab-context-ai.md` checks for up to approximately 60 seconds after deployment, allowing for brief Cloudflare Worker propagation differences before declaring a mismatch. Private/internal Worker paths continue to be checked for HTTP 404 exposure.
- **2026-09-10**: Work mode successfully edited the canonical homelab context file through code-server.

- **2026-09-10**: Hardened the Trilium context publishing path. Existing `trilium-relay` on Docker LXC 111 was changed from `0.0.0.0:5000` to localhost-only `127.0.0.1:5000`, removing LAN/Internet exposure of the relay write endpoint. Relay continues to update the fixed Trilium `Homelab Context` note via ETAPI on Docker2 LXC 117 (`192.168.68.57:8081`). Verified the canonical `homelab-context.md` can be pushed through the relay and retrieved from Trilium with an identical SHA256 hash. `publish.sh` now publishes the canonical context to private GitHub and Trilium, while also verifying the Cloudflare Worker deployment.

- **2026-09-10**: Proxmox PVE boot/storage cleanup completed. Extended logical volume `pve/root` by 12 GiB from <69.37 GiB to <81.37 GiB using previously unallocated VG space, then grew the ext4 root filesystem online. Root filesystem is now approximately 80 GiB with substantially improved free space, while 4 GiB remains unallocated in the `pve` VG as emergency headroom. `local-lvm` / the `pve-data` thin pool was intentionally left unchanged. APT cache and systemd journal cleanup reclaimed several GiB. Existing local vzdump job was verified to already use `keep-last=1` for VMIDs 103, 111 and 117, so no local backup retention change was required. `Cold-Backups` remains inactive/unmounted and Tuxis retention remains a separate follow-up item.

- **2026-09-10**: Completed Git-backed homelab context publishing workflow. Private repository `********/homelab-context` is now the canonical source of truth. `homelab-context.md` is automatically deployed on push to `main` using GitHub Actions, `cloudflare/wrangler-action@v4`, Wrangler v4, and scoped Cloudflare Actions secrets. Existing read endpoint `https://homelab-context.youssef123.workers.dev/` successfully serves the repository version as `text/markdown`. SSH authentication from Docker LXC 111 to GitHub configured for repository pushes. New operating rule: confirmed infrastructure changes are not complete until the canonical context is updated and pushed. Legacy Trilium update relay retained temporarily as fallback.

- **2026-09-08**: Reworked direct-public NPM routing for large-file/streaming services. Added DNS-only `origin.youssefbouanani.com` → `********`; root and wildcard remain Cloudflare-proxied. Moved `photos`, `photodrop`, `nextcloud`, and `media` to DNS-only CNAMEs pointing at `origin`. Cloudflare DDNS now maintains root + origin with `PROXIED=is(youssefbouanani.com)` and IPv6 DDNS disabled. Removed router-wide `CF_FILTER` Cloudflare-only iptables chain because it blocked direct clients; WAN 80/443 continue forwarding to NPM at 192.168.68.36. Verified direct NPM paths for Immich (********:30041), PhotoDrop (********:9002), Nextcloud (********:30027), and Jellyfin (********:8096), all terminating with Let's Encrypt/OpenResty rather than Cloudflare. PhotoDrop handled a 140 MB upload as a duplicate with zero errors. Nextcloud PHP limits verified at 3G upload/post, 512M memory, unlimited execution time. Documented AdGuard stale-DNS cache behavior after Cloudflare proxy-status changes. Created private Git repository `********/homelab-context` as the new canonical context source; Cloudflare Worker deployment automation was still pending at this point and was completed on 2026-09-10. Next security task: classify NPM hosts as direct-public / Cloudflare-only / internal-only and enforce Cloudflare source ranges per virtual host rather than globally at the router.

- **2026-04-19**: Backup & DR plan fully resolved. LXC 109 (ai-stack) added to PBS Local (VM-110), Tuxis (PBS NL), and RemoteBackups (PBS DE) — now 3-2-1 compliant. Zorin OS (VM 104) intentionally left at single-copy backup — test/disposable VM, no active purpose. Spliit receipts alerting intentionally skipped — low stakes. At that time, TrueNAS config backup was intentionally kept manual because upgrades were infrequent; this was superseded on 2026-10-06 by the automated Cold-Backups TrueNAS configuration export. Only remaining open item: create `ai.youssefbouanani.com` Cloudflare tunnel route for Open WebUI.
- **2026-04-17**: Deployed local AI stack on NAS node as LXC 109 (ai-stack, 192.168.68.40, 4c/16GB/40GB on local-lvm MSI SSD, nesting enabled). Docker Compose stack: Ollama (:11434) + Open WebUI (:3000) + SearXNG (:8081). Pulled 4 chat models (qwen3:14b primary, gemma4:e4b research 32k ctx, qwen3:4b fast, phi4-mini coding) + nomic-embed-text for RAG embeddings. Each model given custom system prompt enforcing inline citations and preferring retrieved sources, with tuned temp/top_p/num_ctx and web search default ON. Open WebUI admin hardened: default role user, sign-ups OFF, community sharing OFF. Web search wired to SearXNG (result count 8, concurrency 10, timeout 20). Document RAG via Ollama + nomic-embed-text (chunk 1500, overlap 150, top K 5). NAS node now at 2/2 VMs + 1 LXC, ~85% RAM. Moved "Deploy local AI stack" from Planned → Active/Done. Added Service→IP entry `ai.youssefbouanani.com` (pending) → 192.168.68.40:3000. Follow-ups: create Cloudflare route for ai.youssefbouanani.com and add LXC 109 to backup/replication plan (currently not 3-2-1).
- **2026-04-16**: Created comprehensive Backup & DR Bible document (42K chars, 10 parts). Covers full backup architecture (4 layers), service-to-backup quick reference matrix, step-by-step recovery procedures for every VM/LXC/service, 5 major disaster playbooks (PVE loss, NAS loss, both nodes, internet outage, Cloudflare compromise), 6 DR exercises with quarterly/bi-annual schedule, 9 improvement recommendations, and printable emergency quick reference card. Integrated DR Bible as new tab in Homelab Visualizer — renders dr-bible.md with marked.js, auto-generated TOC, live search with highlighting, print/PDF support. Keyboard shortcut: 6. Updated Cloudflare Pages deployment to include dr-bible.md alongside index.html and homelab.json.
- **2026-04-16**: Backup strategy task list review and corrections. Confirmed Vaultwarden (LXC 107) and MeshCentral (LXC 106) fully covered by PBS local + remote — 3-2-1 compliant. Confirmed Home Assistant Google Drive backup addon running daily at 04:00 with 21 generational retention and HA sensor alerting. B2 storage monitoring deferred (nice-to-have, ~3.3 GB of 10 GB). Added full 3-2-1 coverage matrix and Layer 3 application-level backup details to context doc. Noted remaining gaps: Zorin OS (VM 104) not 3-2-1 compliant, Spliit receipts has no alerting, TrueNAS config backup is manual only. VM-102 boot disk confirmed migrated to local-lvm (MSI SSD) — no longer on KIOXIA Zpool. VM-110 (ProxmoxBackup) corrected to Running (local PBS instance, not stopped/to-delete). KIOXIA NVMe replacement drive on order — priority lowered. Bolt pool mirroring deferred to full homelab revamp — priority lowered. VM backup lock issue marked resolved (Apr 5). VM-102 backup reliability marked resolved (Apr 5). Uptime Kuma DB retention set to 90 days. TrueNAS snapshots confirmed documented. Removed orphaned cloudflared (distracted\_goldberg) from .57 LXC.
- **2026-04-11**: Implemented R3 Docker DB backups to Backblaze B2. Created B2 bucket `youssef-docker-db-backups`. Built backup scripts for .36 (Authentik, TeslaMate, NPM, AdGuard, Uptime Kuma, Gotify — 6 services, ~438MB/day gzipped) and .57 (Dawarich, Trilium, Mealie — 3 services, ~16MB/day). Both run daily at 02:30 via cron with 7-day rotation and Gotify alerts. Total B2 usage ~3.3GB/10GB free tier. Full container audit performed on both LXCs. Cleaned up: removed stale mealie from .36 (112KB test instance), removed teslamate-database-old-pg13 from .36 (PG13→PG17 migration leftover). Added Homelab Visualizer and Homelab Hub — both exposed via Cloudflare tunnel.
- **2026-04-09**: Corrected NAS node boot drive documentation — MSI S270 240GB (/dev/sda) is the Proxmox boot drive (ext4 + local-lvm), NOT the KIOXIA. KIOXIA (/dev/nvme0n1) hosts only the "Zpool" ZFS data storage (VM-102 TrueNAS boot disk 32.5GB + replication targets for LXCs 103/106/111 + VM-110). Confirmed both nodes use "Zpool" as storage backend name for seamless cross-node migration. Revised NVMe replacement plan: no Proxmox reinstall needed — just create new Zpool on new NVMe, move data, rename pool, retire KIOXIA. VM-104 (Zorin) was documented at that time as being on local-lvm; current placement was re-verified on 2026-10-09 as `Zpool:vm-104-disk-0` on the NAS-node KIOXIA.
- **2026-04-08**: Set up automated router backup (custom Dropbear SCP script replacing BACKUPMON — CIFS unavailable on Gnuton's Merlin). Backs up NVRAM + JFFS + Entware to TrueNAS Bolt/configs/router-backups daily at 02:30 with 30-day retention. Enabled SSH on TrueNAS for youssef user. Configured Dropbear RSA key auth. Persisted cron job in services-start.
- **2026-04-05**: Resolved VM backup lock issue. TrueNAS VM 102 backups now working reliably. MeshCentral updated to fix Windows 11 24H2 agent install issue.
## Public publishing architecture

- Canonical source: private GitHub repository, homelab-context.md.
- Full private mirror: Trilium through the localhost-only relay on Docker LXC 111, with SHA256 verification.
- Public AI bootstrap: homelab-context-ai.md preserves the full canonical document structure and operational infrastructure context while masking personal/family data, email and phone information, credential-like values, private-key material, MAC/device identifiers, credential-bearing URLs, and private repository ownership.
- Worker serves / and /homelab-context-ai.md only. The former /homelab-context.md route returns 404.
- 2026-09-10: Split private and public publication. GitHub Actions generates the sanitized copy and deploys from an isolated directory containing only Worker code, configuration, and sanitized text. Public SHA256 is checked against the generated file; Trilium SHA256 is checked against the canonical file.

---


## RustDesk - GCP VM

RustDesk is self-hosted on the Google Cloud Platform VM and is independent of the home Nginx Proxy Manager / Cloudflare reverse-proxy path.

### Server
- Current GCP public IPv4: `********`
- Previous IP `35.211.112.177` is obsolete.
- Docker Compose file: `/home/youssef123/rustdesk/compose.yml`
- Persistent data: `/home/youssef123/rustdesk/data`
- Both RustDesk containers mount `/home/youssef123/rustdesk/data` to `/root`
- Restart policy: `unless-stopped`

### hbbs
- Container: `hbbs`
- Image: `rustdesk/rustdesk-server:latest`
- Command: `hbbs -r 35.211.62.198:21117`
- TCP ports: `21115`, `21116`, `21118`
- UDP port: `21116`

### hbbr
- Container: `hbbr`
- Image: `rustdesk/rustdesk-server:latest`
- Command: `hbbr`
- TCP ports: `21117`, `21119`

### Clients
- ID server: `35.211.62.198`
- Relay server: `35.211.62.198`
- API server: blank
- Existing RustDesk server public key remains unchanged.
- BMAX Windows desktop and Android phone are configured against this server.

### Backup
Preserve:
- `/home/youssef123/rustdesk/compose.yml`
- `/home/youssef123/rustdesk/data`

The persistent data directory contains the RustDesk server identity and key material.


## Dawarich Bluetooth motorcycle labeling — deployed 2026-10-14

- DEPLOYED after explicit user approval. App and worker run yb/dawarich:1.15.3-bluetooth-20261014, image sha256:18079dfbdfbb13524c131bcf3e2239d5c74475d028d002603444132f280b3230. Both healthy. Original 2,358 runtime files preserved; seven new files and three detector/feature/routes integrations. Regression baseline: 28 Bluetooth and 13 Geoapify tests passed.
- Active Compose: original eight files plus /opt/docker/Dawarich/optimization/dawarich-1.15.3/optimization/yb-bluetooth-tests/activate.yml (ninth). Preserve the eighth worker reactivate.yml so recent/historic geocoding stays active. Existing env values, mounts and commands verified unchanged except new Bluetooth flag; DB and Redis containers not recreated.
- Fresh production backup verified before migration: optimization/yb-bluetooth-tests/production-backup-20261014T115529Z/dawarich.dump (296826534 bytes), restore listing and SHA256 recorded. New migration 20261014080000 applied; YB_BT_MOTORCYCLE_LABELS=1 on app and worker. rollback.py restores original eight-file Compose/image baseline while retaining the event table and durable Geoapify ledger.
- Authenticated POST /api/v1/owntracks/vehicle_events accepts immutable start/heartbeat/stop events scoped to current API user and OwnTracks tracker_id. Whole covered cycling/driving windows convert to motorcycle; walking/stops/boat/flight and manual corrections retained. Heartbeat 120s, coverage TTL 300s, sessions max 18h; offline original timestamps/idempotent retries supported. API checks: unauthenticated 401, authenticated invalid payload 422, no fake events written; public HTTPS 401. Low-priority and geocoding queues verified active.
- Geoapify guard and persistent journeys preserved. Initialized budget-state fields and reservation ledger verified retained across restart; no ledger reset or Geoapify calls from Bluetooth. Existing rolling-24h cap 2500 (recent 1000 / historical 1500) remains below the user daily allowance of 3000.
- FREE phone flow: OwnTracks-Free-Motorcycle-v2.flo uses 28 blocks and 14 parsed-flow simulations. User confirmed v2 imports successfully and both API key and OwnTracks tid were entered privately in block 6. Earlier download had HTTP saveResponse incorrectly boxed; fixed to numeric expression matching the working export, with strict expression-slot audit. Use v2 only.
- Configure block 6 bt_config privately: existing Dawarich api_key, exact OwnTracks tracker_id/tid and unchanged endpoint. Stop original controller before starting replacement; free limit applies across all running flows. Activity recognition runs in independent fiber; 30s control loop handles Tesla priority, bike ICC6.5in and three-minute loss grace, duplicate monitoring-command suppression and persistent event retries. Repeated logs/pop-ups and disabled activity sender removed.
- Atomic event queue/session survive restart/reboot but edits/reimports clear them: drain before changing flow. For long ferries stop controller and manually select Significant Changes; restart before riding. Backend leaves boat/walking classifier modes unchanged. No historical GPS regeneration or label rebuild performed in this deployment.
- Remaining phone validation: start/runtime/upload review, real ICC6.5in Bluetooth connection and Move trigger on bike pickup 2026-10-21, automatic motorcycle Track segments and Insights, walking/Tesla exclusion, grace reconnect and offline backlog recovery. Continue daily Geoapify budget review and natural journey-boundary observation.


## Dawarich follow-up tracker — stable numbering (2026-10-14)

Use these numbers in future sessions; retain them when an item is completed.

1. Geoapify budget and historical recovery — IN PROGRESS. Read-only monitor at 2026-10-14 12:36 UTC: rolling-24h ledger 1121/2500 accounted, 1379 remaining; recent bucket 1000/1000, historical 1/1500. Bootstrap baseline 120 included 24 provider credits plus 96 legacy reservations; activation/probe 121 at 2026-10-13 23:17 UTC. Since activation 995 points received formatted geodata, all marine locations (city/country blank is expected); last completion 2026-10-13 23:33:58 UTC, none today. Queue 57437 at activation vs 9846 in monitor, but 76995 points still have no reverse-geocoded timestamp (76683 pre-activation / 312 newer). Scheduled/retry sets and recovery queue empty. Native ReverseGeocodingJob assigns historical bucket only to reverse_geocoding_recovery queue; all other jobs use recent bucket. All 13 point jobs in a 30-job sample were older than activation. Queue shrinkage is not a completion metric. NEXT: tested bounded historical recovery/routing and retention/requeue of credit-blocked work, preserve recent priority and existing global rolling cap; audit both configured/default-provider budget-exceeded paths. No queue moves, provider calls or production changes during this monitoring check. Evidence: optimization/yb-geoapify-tests/monitor-20261014T123652Z.json.
2. OwnTracks/Automate vehicle validation — OPEN. Free 28-block v2 import and private API key/tid setup confirmed; fresh location point visible. User will test Tesla this afternoon and ICC6.5in motorcycle connection/Move trigger on bike pickup 2026-10-21; review motorcycle Track segments and Insights, Tesla exclusion and three-minute fallback.
3. Offline tracking and ride-event recovery — OPEN. Validate airplane/offline period, reconnect, immutable event retries, no duplicates, no lost sessions and ferry manual monitoring policy.
4. Natural journey boundaries — OPEN. Observe overnight splits across new journeys without splitting ordinary short stops. Existing patch/boundaries deployed; no broad regeneration.
5. Historical road/ferry representation — OPEN. Complete September 18–19 Casablanca–Tangier road and overnight ferry representation; review incomplete ferry replay.
6. Performance and availability — OPEN. Review map/trip/replay loading and longer Cloudflare/Uptime Kuma stability; use measured resource/response evidence.
7. Upgrade readiness — OPEN before any upstream upgrade. Preserve image/source patches, all nine Compose files, custom migrations and durable ledgers; fresh backup, isolated compatibility tests and documented rollback.

### 2026-10-14 — Dawarich Geoapify recovery deployed (tracker #1)
- Approved recovery patch active: image yb/dawarich:1.15.3-georecovery-20261014 extends the Bluetooth image. Existing motorcycle/journey/performance patches retained.
- Point age >48 hours determines historical credit bucket, regardless of old queue name. Budget-blocked work is scheduled again after 15 minutes; explicit quota exhaustion propagates in both search entry points.
- Worker now listens reverse_geocoding_recent with weight 5, alongside existing legacy/recovery queues and all prior application queues.
- Bounded recurring historical sweep: 100 pending points per five minutes, stops adding at 200 queued recovery jobs; existing point claims, rotating Redis ID cursor, restart restoration of scheduled sweep. Pending database rows remain authoritative.
- PostgreSQL budget and rolling24h limits unchanged: global2500, recent1000, historical1500. No ledger reset, GPS regeneration or migration.
- Eight isolated recovery tests plus thirteen durable quota tests passed. Fresh PostgreSQL dump verified by SHA256 and pg_restore listing. App/worker healthy; existing DB/Redis containers preserved.
- Initial production observation: 162 points geocoded after deployment; historical reservations rose from 1 to163, total1283/2500. Recent queue subscription verified; scheduled recurring sweep present. Further monitoring is required; queue drain is not proof of completed geocoding.
- Operational files: /opt/docker/Dawarich/optimization/dawarich-1.15.3/optimization/yb-georecovery-tests/{README.md,deploy.py,deployed.json,verified.json,activate.yml,sidekiq.yml}. Full active Compose chain now TEN files: prior nine plus yb-georecovery-tests/activate.yml last. Preserve this override and candidate patch when upgrading; do not use stock image without reapplying/verifying patches.
- Tracker #1 implementation complete, monitoring pending; tracker #2–#7 unchanged. Check provider credits and successful point geodata over the next 24–48h.


### 2026-10-14 23:52 UTC - Dawarich pre-trip readiness audit (trackers #1, #4, #6)

- User authorized continued work on #1, #4 and #6, with fresh production backups before changes and documented results. This audit changed no production application, configuration or GPS data; no new production database backup was needed for read-only checks.
- #1: at 23:48 UTC durable rolling-24h budget used 1501/2500 (recent 1/1000, historical 1500/1500), 999 remaining. Historical completions continued after earlier shared credits expired; pending reverse_geocoded_at=nil count 75612 versus 75636 at 22:36 UTC. All three geocoding ready queues empty, one scheduled job, retries=0, dead=0. Historical ceiling is reached and recent budget is available. Do not mistake empty queues for a cleared historical backlog. Keep cap unchanged; reconcile with provider dashboard and monitor next historical renewal.
- #2: user confirmed Tesla Bluetooth switched OwnTracks to Move and disconnect returned to Significant Changes; two drives recorded. Correct block-6 keys are api_key, tracker_id, endpoint; tracker_id is yb. Never publish the configured API key or configured flow. Uploaded revised flow has 29 blocks and both Delay blocks have wakeup disabled. Phone sleep/heartbeat delivery needs validation.
- Motorcycle backend simulation: repeated existing isolated API/session/detector suite against georecovery image with existing Bluetooth test mounts, isolated dawarich_test database; 28 examples, 0 failures. Log: optimization/yb-bluetooth-tests/overnight-20261014-tests.log. No synthetic production events. This does not validate physical Bluetooth, Android background execution, or the real phone credential. A spare Bluetooth device can rehearse the phone branch using a test copy while the original controller is stopped; restore ICC6.5in afterwards and avoid labeling real Tesla drives as motorcycle. Physical bike test remains open for Oct 21.
- #4: production journey flag enabled, exactly nine validated/high-confidence overnight_rest boundaries remain. Eleven rebuilt tracks contain all 271614 expected points; school track retains 237. IMPORTANT: boundary ingestion explicitly leaves validated=false and detection does not automatically approve new boundaries. Existing reviewed boundary enforcement is implemented; automatic approval/splitting of future overnight rests is not established and must not be marked complete. Preserve this review gate until an isolated, tested future-boundary policy is ready.
- #6: all four production containers healthy; app/worker uptime about 10h. VM load 0.49/0.46/0.39, available RAM 6.2GiB, swap used 919MiB. At idle app CPU 0.05%, worker 0.10%, database 0.06%; one public timeline GET returned HTTP200, TTFB0.1646s,total0.2036s. This snapshot does not establish long-term Cloudflare/Uptime Kuma stability or large-trip/replay performance.
- #6 disk follow-up: root filesystem 59G, 50G used, 5.7G available (90%). Docker reports images28.8GB, volumes10.25GB, build cache5.901GB but only61.67MB cache reclaimable. Dawarich directory3.2G includes2.5G rollback backups. Do not prune rollback images, volumes or backups blindly. Investigate safe capacity expansion/retention before trip. No cleanup or expansion performed in this audit.
- Upgrade readiness #7: preserve all TEN active Compose files, custom image/source patches, migrations and durable credit/event ledgers. Earlier nine-file tracker text is superseded.
- Remaining priorities: long-running provider/availability verification; future overnight boundary policy and natural-use test; disk headroom; large-trip/replay profiling; screen-off/offline motorcycle event delivery; ferry mode handling. Trackers remain numbered 1-7.

### 2026-10-15 — Dawarich #4 overnight splitting deployed; verification completed

This entry supersedes the earlier staged-only checkpoint. #4 implementation is deployed; real overnight field acceptance remains pending.

- Active image on app and worker: yb/dawarich:1.15.3-overnight-20261015. Deployment completed 2026-10-15T16:43:11.123737+00:00; automatic scope begins 2026-10-15T16:41:57.573668+00:00. Flags: YB_AUTO_JOURNEY_BOUNDARIES=1 plus existing journey policy; YB_AUTO_JOURNEY_FROM is the fixed cutoff. Keep this cutoff when recreating containers. No historical rebuild was launched.
- Source/release directory on Docker-Apps VM123: /opt/docker/Dawarich/optimization/dawarich-1.15.3/optimization/yb-overnight-tests. Four patch files: app/services/tracks/{auto_journey_boundaries,overnight_boundary_detector,incremental_generator,parallel_generator}.rb. Image layers extend the existing georecovery image. All TEN previous Compose files remain, followed by this directory's activate.yml (ELEVEN total). Existing source mounts, queues, Geoapify limits, Bluetooth configuration, settings, database and volumes are preserved. Configuration comparison and deployed source hashes passed on both services.
- Detection runs under the existing per-user generation lock before incremental and parallel generation. It scans a bounded window (normally 36h, max72h and 150000 points) within the cutoff, separately for each tracker. Requires a stationary stop >=2h, >=1h overlap with configured user-local 23:00–05:00, and confirmed outward departure. Sparse Significant Changes support requires >=4 accurate stationary fixes across >=2h near a 50m seed, no intervening reliable excursion, max4h observation gap. Accuracy <=50m and speed <=0.5m/s. Departure requires three reliable outward points >=150m away with time/radial progression. Missing GPS alone never establishes an overnight rest. Uses configured user timezone, not geographic timezone inferred from coordinates.
- Saves validated auto-overnight-v1 boundaries idempotently and repairs eligible crossing tracks transactionally with a savepoint. Replacement tracks must conserve original point identities and GPS attributes; only track membership/optimistic lock version change. Pre-cutoff, shared and manually corrected tracks are skipped; reviewed boundaries are preserved. Existing segmentation/merge policy prevents reconnection across validated boundaries. Only affected Insights months are refreshed after commit. No external geocoding/API calls are needed by the detector/splitter. Overnight splitting does not classify ferry travel as motorcycle.
- Validation: 52 isolated examples passed (28 Bluetooth +24 overnight), including sparse/dense cases, Casablanca/Madrid/DST, rejection cases, database split/conservation, idempotency, cutoff, savepoint rollback, shared/manual protections, reviewed boundaries, disabled flag and real detection-to-split. Shared/manual association checks use mocks; conservation and detection-to-split use actual isolated database rows. Test logs/spec/runner remain in this directory. Tests cannot replace a physical overnight trial.
- Production verification: app/worker healthy with matching four-file hashes and Bluetooth enabled. Follow-up read-only Rails smoke passed for 3 users /9 existing boundaries /0 candidates. All previous environment values preserved on app/worker/database. Logs from 16:45 UTC to the follow-up check show zero JSONB-container errors or segmentation faults and zero overnight events. No natural overnight split is claimed. Root filesystem at follow-up: 91% used, 5.4G available.

Backup and database incident:

- Deployment-time logical pg_dump failed while copying points with 'unknown type of jsonb container'. A read-only follow-up returned a geodata JSONB error; a motion_data text scan caused a PostgreSQL process segmentation fault at 16:38:18 UTC. PostgreSQL automatically recovered and accepted connections at 16:38:22. This occurred BEFORE deploying the overnight patch. Root cause and affected rows remain unknown; no bad values were nulled or GPS rows removed. Avoid repeating broad JSONB scans against production. Investigate on an isolated restored copy first.
- A physical pg_basebackup tar including WAL completed before deployment: physical-backup-20261015T163643Z/base.tar.gz in this release directory; 1008069715 bytes; SHA256 02b824bb4e01350613b6ad0e9696c0079e56d8a09f20198560c0ca6a05c5553a. Complete archive read plus backup_label/PG_VERSION/global/pg_control checks passed. Actual restore has NOT been tested; physical backup may preserve the unreadable data and is not proof of database integrity. physical-backup.json records details. Failed/incomplete logical dump must not be used as a verified backup.
- Earlier 08:52 backup: backup-20261015T085256Z/dawarich.dump, 297104683 bytes, SHA256 99aa917a5645f6111b5d09a8e3926b30296ae2f74c6bca0b4f8fd48788b97329. SHA/TOC listing checked at deployment; full restore subsequently passed (see item 8 recovery below).
- Prior cleanup remains complete: four superseded dumps removed, 1331624976 bytes freed (cleanup-manifest.json). Retained pre-journey/final pre-rebuild/pre-Geoapify/pre-recovery/current backups and small configuration/source/membership snapshots. No further indiscriminate pruning while database integrity is unresolved.

Operating and upgrade instructions:

- Read release.json, deploy.log, smoke.log, verification-summary.log, post-deploy-checks.log, tests.log and physical-backup.json in the release directory. release.json contains the exact active ordered Compose chain, previous chain, cutoff and verification metadata. base.json, inspect.json and resolved Compose files contain secrets: do not paste or publish them.
- To reverse ONLY this application release on Docker-Apps: run sh /opt/docker/Dawarich/optimization/dawarich-1.15.3/optimization/yb-overnight-tests/rollback.sh. It recreates app/worker with the saved TEN-file chain and prior georecovery image; database/volumes remain. This does not undo any already-completed track splits or boundary rows. Do not run a database restore to roll back application code.
- Before any Dawarich upgrade: resolve/assess the database integrity issue, validate restore on isolated storage, retain current image and all source/migrations, compare upstream changes against every custom patch, and test the complete stack in isolation. Preserve ALL ELEVEN Compose files (including four overnight bind mounts), flags/cutoff, Bluetooth endpoint/classifier, journey policies and Geoapify ledger/budget/recovery queue controls. Never upgrade using the base Compose file alone or assume replacing the image retains custom mounted code. Re-run regression tests and verify app/worker health, settings, queue behavior and motorcycle/overnight operation before accepting an upgrade.
- Acceptance next morning: after a well-observed stationary night and a new drive, check Tracks for separate before/after-night tracks; review endpoints, distance and transport labels, then Insights after jobs finish. Watch for overnight.split log events and errors/retries. Poor overnight fixes or absent departure confirmation can conservatively leave a track unsplit. A blank split count is not evidence of failure before a qualifying overnight.

Stable follow-up tracker:

1. Geoapify cap/recovery deployed; continue monitoring provider usage and recent/historical queue progress. Keep 2500 rolling24h budget (recent1000/historical1500) below provider3000. Do not raise cap.
2. Tesla mode switching/recording validated; actual ICC6.5 motorcycle Bluetooth test pending Oct21. Automate flow was not changed by #4.
3. Screen-off/battery and offline vehicle-event/GPS delivery validation remains open.
4. Overnight implementation deployed and startup/read-only checks passed; next qualifying overnight field acceptance remains open.
5. Historical Casablanca–Tangier road/ferry and anomalous travel repairs remain open; no historical rebuild in this release.
6. Superseded-backup cleanup complete; large-trip/replay raw-point pagination and Cloudflare/Uptime Kuma/resource correlation remain open. Overall #6 is not closed.
7. Upgrade preservation/runbook updated here; actual upstream upgrade has not been performed.
8. NEW urgent: investigate points JSONB read errors / PostgreSQL crash and validate backup restoration on an isolated copy before invasive production repairs. Preserve GPS and backups; do not erase unreadable records speculatively.

### Dawarich item 8 — production data repaired, 2026-10-16

- **Status:** the five confirmed corrupt geodata values were repaired in production at 12:45:51 UTC. Full production logical export and an isolated restore of the new backup succeeded. Data recovery/export blocker resolved; corruption root cause and historical physical-backup hash discrepancy remain open. Do not describe these results as proof that the underlying hardware or every database index is fault-free.
- A complete physical-range scan covered all 377,168 heap blocks of the diagnostic points table and serialized raw_data, geodata and motion_data. Together with the four earlier isolated repairs, it identified exactly five geodata defects: point IDs 474273, 632508, 632509, 632534 and 632537. No raw_data or motion_data serialization defects were found in that scan. The last two geodata values caused backend crashes only during isolated diagnosis. Known defects were independently reproduced in a newer manifest-verified production snapshot.
- Recovery values came from the fully restored 08:52 logical backup. GPS identifiers/timestamps/coordinates/accuracy/speed/altitude/tracker/source fields matched exactly. Production targets also matched the newer snapshot including CTID, update timestamp, lock version and trip associations. Repair used one transaction, ordered row locks and metadata guards; changed only geodata plus optimistic lock_version. Recovered values were checked against the source, and GPS fields/track/visit/external-track associations remained unchanged. Counts before/after repair: 1,135,342 points, 2,199 tracks, 9 journey boundaries. No GPS rows were deleted or restored wholesale, and no extra Geoapify calls were requested.
- App, Sidekiq, Redis and PostgreSQL remained healthy on existing images; no application deployment/restart or Compose/environment/queue-policy changes were made by this repair. Existing Geoapify budget, Bluetooth classification and overnight splitting remain in place. Post-repair PostgreSQL log check showed no JSONB errors, backend crashes or recovery events. Natural overnight and physical ICC6.5 motorcycle validation remain separate acceptance tasks.
- **New recovery backup:** Docker-Infra /home/youssef/dawarich-integrity-20261015/production-after-repair-20261016.dump. Full pg_dump exit 0, 423,013,064 bytes; SHA256 bd88eb8536988fdbd698c558b36c3741a7dfe4351a57ee9bceaff703e4ddc777. Restore used the exact PostgreSQL 17.11/PostGIS image in a network-isolated, resource-limited container; pg_restore exited 0 and restored point/track/boundary counts matched, with zero invalid indexes and all five repaired values readable. This is the preferred tested logical recovery backup for this incident.
- The earlier 08:52 source backup also passed an actual isolated restore: 1,135,197 points, 2,198 tracks, 9 boundaries, zero invalid indexes. SHA256 remains 99aa917a5645f6111b5d09a8e3926b30296ae2f74c6bca0b4f8fd48788b97329. Schema matched apart from equivalent deparser cast rewriting in one legacy-tracker index predicate. Its disposable restored database was recycled to make space for the new backup test; the original archive, hash, validation evidence and recovered payload were retained.
- **Correction to the old physical backup:** physical-backup-20261015T163643Z/base.tar.gz is NOT a verified recovery backup. Its current SHA256 on both hosts is 4686280839b2fbb35626dfbd1b8ec38e07aa3ec1a93aed463d0f77ad1358cdcf, differing from the originally recorded 02b824bb4e01350613b6ad0e9696c0079e56d8a09f20198560c0ca6a05c5553a. Full pg_verifybackup failed for base/22401/171629 (index_points_on_lonlat). Keep the archive and original metadata as evidence; a readable gzip archive alone did not establish backup validity.
- A fresh pre-repair physical archive was streamed to Docker-Infra at 2026-10-15T22:30:17Z: production-before-repair-20261015T223017Z/base.tar.gz, 1,034,638,206 bytes, SHA256 4fb38f54f4a9e86b342cf7bbbc7f493ce4e335b6c67feeaca51acc737e3a810e. Full PostgreSQL file/manifest/WAL verification passed; the extracted copy booted in isolation and reproduced all five defects before diagnostic repair. It is a consistent incident preimage, not a logically clean replacement database. Production data-page checksums are disabled.
- Private scripts, raw validation reports, retained archives and precise-location recovery payloads: /home/youssef/dawarich-integrity-20261015 on Docker-Infra. A sanitized incident assessment and repair/backup/restore reports are also copied to the release directory's integrity-20261016 folder on Docker-Apps. Never publish the private payloads. Diagnostic containers are stopped after verification; retain forensic archives/volumes until follow-up review, and avoid indiscriminate pruning or blind reindexing.
- **Still open under item 8:** establish the corruption/hash-drift cause with host/storage/RAM review; verify subsequent routine logical backups continue to succeed; plan further integrity/index checks as needed. PVE zpool status reported all pools healthy; this does not rule out past storage or memory problems. No hardware cause or relationship to the overnight patch has been established. Before upgrading, retain this tested backup and complete the custom-patch/eleven-file-Compose upgrade checks already documented above.

<!-- yb-change:homelab-viz-hub-v2-initial-20261016 -->

## Homelab Viz & Project Hub v2 — October 2026

- Production dashboard: https://homelab.youssefbouanani.com
- Project Hub ID: 10; phases: 19–23.
- Homelab Visualizer and Project Hub v2 deployed.
- Unified publishing and recovery implementation committed as c037484 and pushed to GitHub.
- Automated regression suite passed (124 tests).
- Legacy Project Hub data archived and reset; SQLite integrity OK.
- First live unified publication pending acceptance.

<!-- yb-change:homelab-viz-hub-v2-reconciliation-20261016 -->

## Homelab Viz & Project Hub v2 — production acceptance and reconciliation (2026-10-16)

This entry supersedes the earlier statement that first live unified publication acceptance was pending.

- The first unified publication was accepted across GitHub, Trilium, the sanitized Cloudflare Worker context and Project Hub. Original publication ID: `7282296f9fd250fcf38c210599826d41c51889bd92d1a9bc65eb6564dbc34422`; its production receipt was reverified read-only.
- Project 10 (`yb-homelab-viz-hub-v2`), phases 19–23: original tasks 112–117 are completed. Their identities, mappings and original receipt remain intact; no tasks were reset or recreated.
- Production preview now uses one authoritative read-only SQLite snapshot for task mappings, last-published title/status baselines and live task values. The legacy local sync database is no longer the default source for production validation or preview.
- Read-only production acceptance: six tasks resolved to IDs 112–117; five UNCHANGED, task 117 (`first-publication`) PRESERVE_MANUAL for status; zero creates, updates or conflicts; zero production database writes. Task 117 retains live completed status with the original in_progress publication baseline.
- Complete isolated regression suite: 146 tests passed, including new-publication/subsequent-preview identity, manual title/status preservation, completed-task reopen protection, publication authorization and stable recovery-plan identity after task IDs are assigned.
- Follow-up work belongs to existing phase 23 (Future Improvements): record production acceptance completion; verify manual task changes survive reconciliation; safely clean temporary publishing development files. Manual-change reconciliation verification has passed. Cleanup remains pending explicit approval.
- The untracked `project-hub-v2/sync/ssh_publish.py.project10-work` was verified byte-for-byte identical to the pre-fix committed source at `156700c`; it contains no unique changes. It has not been deleted.
- Preserve explicit publication confirmations, pre-write verified database backups, immutable packages, change-ID bindings and journal recovery. Do not replay the original successful package as a new change.

<!-- yb-change:infrastructure-recovery-20261017T112859762069Z -->

## October 16, 2026 infrastructure recovery — authoritative current-state update

This section supersedes conflicting historical hardware, pool-health, local-PBS, backup-storage, snapshot and replication descriptions above. It records recovery verified in the October 16 handoff plus live October 17 Proxmox and authenticated PBS checks. Historical entries remain as history. Work explicitly listed as outstanding is not completed.

### Hardware and storage recovery

- The infrastructure instability was attributed to faulty Corsair DDR4 memory. The defective 16 GB module was removed and replaced with a compatible SK hynix 8 GB module. The NAS Proxmox host now has 48 GB RAM. One full MemTest86+ pass completed with zero errors.
- Bolt is ONLINE with no known permanent ZFS data errors after targeted remediation. Corrupted Docker image layers and an Immich database backup were addressed; a new Immich database backup was validated and copies independently verified on OneDrive. Bolt remains a single-device pool with no disk redundancy.
- Tank is a mirror of two 12 TB Seagate HDDs. Both members are ONLINE; READ/WRITE/CKSUM counters were zero and native SMART tests had passed. There are still 78 historical ZFS permanent data-error records. Every referenced file was fully read successfully without I/O errors. Successful reads do not repair or clear those error records.
- Review the next scheduled monthly Tank scrub on November 1, 2026 before deciding whether remaining error records can be cleared. No immediate additional scrub is required absent new evidence. Do not clear errors merely to obtain a clean display.
- The obsolete Tank/backups dataset and its three snapshots were destroyed after recovery and validation. Media data was preserved; four damaged historical Books/TV_Series snapshots were removed.
- Eight October 15 crash dumps involved PostgreSQL, ZFS event daemon, Python, Sonarr, Readarr and other processes; they were consistent with the RAM incident and no newer dumps were identified during that review. The user dismissed the TrueNAS alert. Archiving or deletion of dumps is not verified. This incident does not establish a separately proven causal link for every previously documented Dawarich defect or hash discrepancy.

### Local PBS migration

- Local PBS VM110 remains on the main Proxmox node at 192.168.68.71; PBS version reported in recovery was 4.2.8.
- Active datastore: backups-pbs-new; TrueNAS dataset: Tank/pbs-datastore; SMB share: pbs-datastore; PBS mount: /mnt/pbs-datastore-new; Proxmox storage: backupsOnNasNew; guest namespace: VMs.
- The corrupted original backups-pbs datastore and old backupsOnNas Proxmox storage were removed. Seven standalone legacy files were preserved privately under /mnt/Bolt/configs/legacy-backups-files. Those files include sensitive recovery information; their contents must never be published.
- CT108 manual backup, backup verification, configuration extraction and restore-point listing succeeded. These checks do not replace a full isolated guest restore or first complete scheduled guest batch, both still outstanding.
- Tank/pbs-datastore has atime=on and relatime=on. A read test from the actual PBS SMB mount confirmed access timestamps advance. The first successful PBS GC must still confirm its built-in timestamp-safety check.

### Backup and maintenance policies

The October 17 live Proxmox check verified backup job backup-5b19c154-4177 is enabled at daily 09:30, targeting backupsOnNasNew. Its guest list is 100,103,104,105,106,107,108,112,113,114,115,121,122. VM102 and VM110 are not in this local job. There is no job-level prune-backups setting; the storage uses prune-backups keep-all=1, leaving local guest retention to PBS. The obsolete backupsOnNas storage is absent from the live storage configuration. This does not change other destinations' pruning policies.

Final policies below were verified from live Proxmox and PBS CLI output on October 17 after operator authentication. No schedule or retention settings were changed. PBS guest backup and verification tasks were still active at inspection; the first complete scheduled batch remains pending.

| Operation | Verified schedule | Verified retention/policy | Validation status |
|---|---|---|---|
| Local guest backups | Daily 09:30 | PBS manages retention | Live Proxmox job verified October 17 |
| Guest pruning, VMs | Sunday 15:00 | Last 2 + yearly 1 | Live PBS configuration verified October 17 |
| Host pruning, Proxmox_Nodes | Sunday 15:30 | Last 2 | Live PBS configuration verified October 17 |
| Garbage collection | Monday 16:30 | Weekly | Monday schedule saved; first GC safety acceptance pending |
| Verification | Saturday 18:00 | Reverify after 30 days | Live policy verified; first weekly run pending |
| Host configs, Tuxis to local PBS | Daily 09:15 | Transfer last 2 | Live PBS configuration verified October 17 |

Cold-Backups remains intentionally offline between monthly manual cycles. The October 17 live Proxmox check confirmed its backup job backup-8a13334d-46c2 is disabled, preserving keep-last=6 and keep-yearly=2. Do not mount it or change its policies as part of documentation publication.

### Snapshots, replication and remaining backup coverage

- Bolt/configs: four local snapshots per day, two-day retention. Local recursive replication task 11 copies Bolt/configs to Tank/configs with two-week destination retention.
- Remote replication task 16, Youssef_to_********, copies Bolt/configs to vault/Youssef_Backups with one-week destination retention. This is config replication; it must not be described as offsite protection of Tank/media.
- Tank/media uses daily recursive snapshot task 17 at 14:00 with seven-day retention. No TrueNAS replication task protecting Tank/media itself was identified in the recovery review.
- Independent protection of unique Tank/media photos, motorcycle footage and personal documents remains unverified. Local snapshots and a disk mirror are not evidence of an independent offsite copy.
- Preserve and audit Tuxis PBS, RemoteBackups PBS, monthly offline Cold-Backups USB, OneDrive Immich copies, Backblaze B2 application backups, Home Assistant Google Drive backups, NAS/main-PVE configuration backups, TrueNAS exports and router backups. Current quotas/capacity and complete coverage require evidence; historical percentage values are not current measurements.
- Backup monitoring still requires review for references to retired backupsOnNas/backups-pbs storage and for compatibility with the new weekly verification schedule. No monitoring policy was changed during this publication preparation.

### Publisher repair and follow-up project

- Header maintenance now runs during immutable package preparation, before hashing proposed context. The original Generated date is preserved; Last updated uses the actual UTC preparation date. The manifest freezes that date and exact before/after header. Retrying publication consumes the same package bytes and change ID, without redating.
- Malformed or duplicate headers, invalid dates and date rollback are rejected; existing headerless fixtures remain supported. Preview leaves canonical context untouched. The reviewed publisher suite executed 167 tests successfully, including 13 new header/package regressions and 8 scoped-authorization regressions, plus existing integration and recovery coverage.
- Approved project setup only created Project Hub project 11, October 2026 Infrastructure Recovery, with five empty phases. Recovery tasks remain unpublished until explicit publication approval. Existing project 10, identities, manual task completions, mappings, prior packages, receipts and journals are preserved.
- Outstanding tasks: first scheduled guest batch and ongoing stability; first GC timestamp-safety acceptance; first weekly verification; full isolated guest restore; November 1 Tank scrub review; residual ZFS-error reconciliation; backup/snapshot/replication and capacity audit; independent unique-media protection; monitoring updates; authorized unified publication and all destination/receipt verification.

<!-- yb-change:toprr-security-review-implementation-20261017 -->

### Toprr — Security Review and Implementation (2026-10-17)

- **Project Hub:** Project 12, `Toprr Security Review and Implementation`, key `toprr-security-review-implementation`. Phases: Security Review (29), TrueNAS Deployment (30), Media Integration (31), Validation & Monitoring (32).
- **Purpose:** Evaluate and deploy Toprr as a self-hosted interface for discovering streaming Top 10 titles and selectively requesting movies and series through the existing media automation stack.
- **Verified progress:** Preliminary source-level security research and deployment planning completed. The Project Hub project and four phases were created and publisher enrollment verified. The initial five-task publication passed read-only identity validation and reconciliation with five proposed creations and no conflicts.
- **Deployment state:** Toprr installation, independent security testing, Jellyseerr connectivity, operational testing, and monitoring are not verified as completed.
- **Planned architecture:** Deploy Toprr independently as a TrueNAS SCALE Custom App alongside the existing media stack, initially integrating with Jellyseerr rather than granting unnecessary direct Radarr/Sonarr API access. Preserve existing media libraries and application configurations.
- **Security requirements:** Local-network-only access initially, no public reverse-proxy exposure, non-root container, restricted filesystem and capabilities, dedicated persistent configuration storage, resource limits, and a verified pinned container image. Protect API credentials and configuration backups. Complete initial administrator setup promptly.
- **Known risks:** Toprr is a relatively young application. The preliminary review identified API credential exposure, first-run network request behavior, dependency provenance, and the absence of independently verified security testing as areas requiring additional validation. These are assessment findings, not evidence of an active compromise.
- **Operational policy:** Begin with manually reviewed requests and no automatic downloads. Confirm metadata accuracy, duplicate handling, request routing, credentials, backup/restore, and Uptime Kuma monitoring before considering scheduled operation.
- **Outstanding work:** Independent security validation; hardened TrueNAS installation; Jellyseerr integration; controlled request testing; backup coverage and monitoring verification. Verify live endpoints, application versions, and storage paths before deployment.

<!-- yb-change:hermes-telegram-discovery-20261018 -->

## Hermes Telegram agent — discovery and architecture (2026-10-18)

### Scope, decisions and deployment state

- Read-only discovery and architecture design completed using the live public context, Docker-Infra/code-server SSH aliases, Proxmox and Docker-Apps read commands, authenticated Home Assistant inspection, and current primary product documentation.
- Owner selected **Telegram** as the control interface. Owner confirms **SolaX** is the solar inverter, unused PV cannot be injected into the utility, and existing **Tesla Fleet** integration already supports car commands including charging-current adjustment. The existing **Tesla Wall Connector** integration is also in use.
- These facts supersede older suggestions that Tesla/solar integrations still need to be introduced. Solar optimization, agent deployment and automated remediation remain planned, not operational.
- No Hermes agent, VM, Telegram bot, new model-provider grant, observer service, HA configuration change or Tesla command was created/executed during discovery. Local architecture, installation-command and manifest drafts were prepared; they have not been validated in a running Hermes installation.
- Approved documentation setup subsequently created Project Hub project **13**, `YB Homelab Hermes Agent`, stable key `yb-hermes-telegram-agent`, with five verified phases: Discovery and Architecture (33), Secure Agent Deployment (34), Subscription and Quota Validation (35), Home Assistant Solar and Tesla (36), Operations and Acceptance (37). Project creation was verified with zero tasks. Publisher enrollment and context/task publication are separate scopes; setup approval does not authorize deploying the agent or changing HA.

### Verified placement and resource snapshot

- October 18 live checks: `pve` at `192.168.68.122` runs Proxmox 9.2.20, has six logical CPUs, approximately 31.2 GiB RAM and 14.4 GiB available. Occupied swap was about 4.2 GiB; this alone does not establish active memory pressure.
- NAS at `192.168.68.123` has approximately 46.8 GiB usable RAM, only 1.86 GiB available and 2.92 GiB swap occupied. TrueNAS VM102 is configured with approximately 32 GiB and Docker-Apps VM121 with 12 GiB. NAS is not the preferred placement for another always-on agent in this observed state.
- VM100 Home Assistant is running on `pve`, with two vCPU, 6112 MiB fixed RAM, 32 GiB Zpool disk, guest agent and USB passthrough. VM105 Win11, VM112 Ubuntu and VM104 Zorin were stopped at inspection; capacity must be reconsidered before starting these guests.
- Proposed agent placement, **not deployment approval**: dedicated Debian 13 VM on `pve`, two vCPU, 4 GiB RAM, initially 24 GiB local-lvm disk, no GPU/local model. Live local-lvm thin pool had approximately 60.9 GiB unallocated physical capacity. Underlying drive layout/wear, growth, backup windows, host swapping and concurrent guest starts require a final preflight. Candidate VMID109 was returned by Proxmox but is not reserved. No IP was selected or reserved.
- Existing backup constraints: RemoteBackups reported 100% used and Tuxis 92.20%; backupsOnNasNew reported 1.35%. These are October 18 observations, not retention changes or proof of restore coverage. Cold-Backups remained intentionally unmounted. New VM backup inclusion needs separate approval and must depend on the existing recovery/capacity work rather than duplicating that project.

### Verified Home Assistant and energy observations

- Installed versions: HA Core 2026.9.2, Supervisor 2026.10.2, HA OS 18.2, Frontend 20260826.7. Available updates were not installed.
- SolaX Inverter Modbus custom integration version 2026.09.2 identifies `SolaX_PV Inverter` as **X1-Boost, Gen4**. Its inverter and synthetic Energy Dashboard devices expose 55 entities. Forecast.Solar, Tesla Fleet and Tesla Wall Connector integrations are configured.
- Candidate measured PV sources: `sensor.solax_pv_measured_power` (AC power in W), `sensor.solax_pv_pv_power_total` (DC PV power), and `sensor.solax_pv_total_yield` (kWh, total_increasing). DC and AC readings must not be treated as identical whole-house power.
- Important calibration finding: `sensor.active_power`, named WiFi power Meter Active Power, reports **kWh** with device class **energy**, whereas the enabled `automation.solar_smart_water_heater_high_grid_demand_shutoff` treats its numeric value above 2 for ten minutes as **2 kW**. Raw datapoint meaning, scale and direction are not validated. Do not silently relabel/multiply it or use it for new controls before calibration.
- SolaX CT power read 0 W while producing; `sensor.solax_pv_house_load` was negative and approximately inverse to inverter output; synthetic grid/export sensors appeared to track inverter production. These are **not validated utility import/export measurements**. The owner's no-export constraint remains authoritative. Unknown synthetic battery entities do not establish a stationary battery.
- Forecast.Solar entities include `sensor.energy_production_today_remaining_2`, `sensor.energy_production_tomorrow_2` and `sensor.power_production_now_2`. Array rating, orientation, horizon and forecast bias still need review.
- Existing Tesla Fleet entities include `number.tessy_the_beast_charge_current`, `switch.tessy_the_beast_charge`, `number.tessy_the_beast_charge_limit_2`, battery level and charging state. Current entity advertised 0–30 A with 1 A steps; this does not prove safe circuit limits or minimum stable charging current. User confirms current adjustment works; discovery did not test a vehicle command or wake the car.
- Wall Connector exposes vehicle-connected, contactor, status, power, energy and voltage/current sensors. `sensor.tesla_wall_connector_total_power` is in kW; standby reading 0.0023 kW agreed with the separate Tesla circuit meter at about 2.3 W. `sensor.tesla_charging` reported a differing value and needs derivation review. Phase configuration and electrical limits must be checked during ordinary charging; idle phase entities do not establish three-phase wiring.
- Water heater uses `switch.water_heater_switch` and `sensor.water_heater_power`. Power was approximately 1.58 kW and later zero while switch remained on; water temperature/thermostat details and relay limits are not established.
- Morning water-heater automation is enabled and visually triggers at 10:15 in HA local time despite a 09:30 description. Evening automation is enabled at 18:30. High-grid shutoff is enabled and limited to 11:30–18:30. Evening-comfort and night-shutoff entities are restored/unavailable; do not describe them as working safeguards. Tesla battery-below-25 and charging-power-over-2.5kW automations remain disabled; remaining-charge-time automation is enabled. No automation was saved or toggled.
- State timestamps and retained MQTT data are not by themselves proof of fresh polling. Samples were collected over several minutes, not an atomic power-balance measurement.

### TeslaMate telemetry

- Live on Docker-Apps `192.168.68.57`: TeslaMate and Grafana 4.3.0, PostgreSQL17 and Mosquitto2. Core containers were running with zero restarts since October16. TeslaMate uses `MQTT_HOST=mosquitto` on Docker network `teslamate_default`; MQTT1883 and DB5432 are not published to the host.
- Read-only SQL verified car ID1 and existing records through October18. No VIN, location history, Tesla credentials or direct car API request was retrieved. Database timestamps do not imply a sleeping vehicle should be woken.
- HA MQTT presence does not prove it receives TeslaMate telemetry. MQTT authentication, effective config includes and discovery behavior are not fully established. Reuse HA sensors initially; any later read-only collector/one-way bridge must forward only necessary non-location topics with scoped ACLs and freshness metadata. Do not expose an unauthenticated broker or use TeslaMate as the charging command plane.

### Proposed agent and energy architecture

- Private Telegram bot with owner numeric-ID allowlist and outbound long polling; no new public reverse-proxy route or webhook. Disable bot group joining and verify unauthorized/group access rejection. Telegram bot messages must exclude secrets and precise location.
- Hermes runs without sudo, Docker socket/group, administrative SSH keys, direct HA/Tesla tokens or publisher/registry access. The existing code-server management identity is only an operator discovery path and must not be copied to the agent.
- Proposed independent observation service provides fixed inventory/health reads and exact allowlisted HA states/history, retaining upstream credentials outside the Hermes account. This service remains **unimplemented**. HA long-lived tokens are not inherently read-only. Enforce restrictions through credentials, API routes and network isolation; prompts and Hermes dangerous-command approval alone are insufficient.
- Separate approval/executor boundary for any future named maintenance action. Bind approval to authenticated owner, exact target/arguments, fresh preconditions, nonce, expiry and payload hash; deny replay. Exclude destructive storage/backup actions, security/publisher changes, locks and inverter-register writes.
- HA, rather than an LLM loop, should execute a deterministic owner-approved energy policy coordinating EV and water heater for **self-consumption with no export**. Confirm whether unused production is curtailed: measured production can understate available PV. Do not assume a zero-import reading or forecast quantifies unused capacity.
- Commission whole-house import measurement, PV AC power, EV power, phase count, charging limits, departure requirement, hot-water comfort and actual tariff first. Then run 7–14 days of shadow recommendations with manual override, hysteresis, dwell times and stale-data handling. Any bounded amperage probe/start-stop experiment needs separate approval. Do not cycle the Tesla supply breaker as a charging actuator or promise a Fleet-controlled hard import cap during WAN loss.

### Subscription research and remaining gates

- Owner reports ChatGPT Plus, GitHub Education/Copilot and Google AI Pro subscriptions. Connected Codex account confirmed Plus. Treat allowances independently; no transferable combined token pool or guaranteed zero-cost autonomous service.
- Hermes documents ChatGPT/Codex OAuth, but its provider documentation leaves plan-quota semantics unspecified. A later explicitly approved small authentication/inference test must establish entitlement and charging path. Native Codex access here is not proof of third-party eligibility. No login/grant was created in this research.
- Current GitHub documentation describes AI credits and automatic model selection for Copilot Student; do not assume historical premium-request quotas or unrestricted named-model access. Activated account tier, remaining balance and Hermes/Copilot CLI ACP behavior remain unverified.
- Hermes has no documented direct consumer Google AI Pro login path. Google advertises a $10/month developer credit for AI Pro; redemption, eligible billing account/SKUs, availability and remaining balance are unverified. Vertex is a documented Hermes integration; Gemini API usage is separate from consumer chat allowance. Budget alerts are not hard spending caps.
- Candidate software pin researched: Hermes v0.22.2, released 2026-10-15, commit `d923a5eb487a17c0a68801bba9ef0f56c81040a8`. Draft installer flags were checked against that version. Website docs may cover newer code; effective tools/configuration/provider behavior still require staging tests. No Hermes software was installed.
- Pending work: final VM/network/storage approval; restricted observer implementation; Telegram/provider enrollment approval; account quota tests; HA sensor calibration and automation reconciliation; read-only pilot; backup/restore coverage; shadow energy policy; separately approved bounded controls and acceptance. No production deployment or control approval is implied by publishing these findings.

Primary research: [Hermes providers](https://hermes-agent.nousresearch.com/docs/integrations/providers), [Hermes security](https://hermes-agent.nousresearch.com/docs/user-guide/security/), [Hermes v0.22.2](https://github.com/NousResearch/hermes-agent/releases/tag/v0.22.2), [OpenAI authentication](https://learn.chatgpt.com/docs/auth), [Copilot billing](https://docs.github.com/en/copilot/concepts/billing-and-usage/individuals/billing), [Google developer benefits](https://developers.google.com/profile/help/benefits?hl=en), [Tesla Fleet](https://www.home-assistant.io/integrations/tesla_fleet/), [Wall Connector](https://www.home-assistant.io/integrations/tesla_wall_connector/), [TeslaMate MQTT](https://docs.teslamate.org/docs/integrations/mqtt/).

<!-- yb-change:hermes-planning-reconciliation-20261019 -->

## Hermes agent planning and HA measurement reconciliation (2026-10-19)

### Evidence and scope

- This update records the owner's verified October 19 findings from the continued Homelab AI Agent Planning conversation. These are dated observations supplied by the owner; this publication preparation does not repeat account inference or electrical tests. The retrieved conversation excerpt independently contains the installed SolaX integration's active/export-limit source definitions. Older October 18 discovery remains historical; the corrections below supersede its unresolved account and meter-identification statements where specified.
- Main objective remains a private Telegram interface to a restricted Hermes homelab observation agent, followed by better Home Assistant utilization and separately approved deterministic automations. Provider investigation and energy measurement diagnosis are preparation, not deployment.
- No HA configuration, automation, inverter register, Tesla control, VM or Hermes production change was made in this October 19 work. The observed newer SolaX integration version is not evidence that this thread performed an upgrade. Existing local architecture, observer, installation and HA shadow-policy drafts remain unvalidated drafts.

### Verified account and provider findings

- ChatGPT Plus account quotas and paid reload controls were reviewed on October 19. Treat native ChatGPT/Codex allowances separately from any proposed Hermes OAuth path. No paid reload or automatic paid fallback is authorized by this publication. Exact remaining quota percentages, reset times and reload-toggle values are not preserved in the supplied continuation, so they are not invented here. Actual Hermes entitlement, quota consumption and failure behavior remain pending an approved test.
- GitHub Copilot Student account inspection showed **193/200 AI credits** and **no overages**. This is the October 19 account snapshot, not a transferable token balance or guaranteed future allowance. Hermes/Copilot CLI ACP compatibility and consumption still need validation; the existing Copilot task remains pending for those checks.
- Antigravity CLI **1.4.2** exposed **six models** using **two quota pools**. Headless Gemini and Claude inference succeeded in the October 19 tests. This establishes those CLI paths only. A Hermes provider bridge is **proposed, unimplemented and unvalidated**; pool balances, unattended behavior, model identifiers and a tested Hermes integration are not inferred from model count.
- Antigravity results do not establish Google AI Pro developer-credit redemption, eligible API billing or a hard spending cap. Preserve the separate pending Google developer-credit task. Do not combine ChatGPT, Copilot and Antigravity quotas into one budget.

### Verified HA configuration and physical meter distinctions

- LocalTuya grid active-power configuration uses **DP101 with multiplier 0.001**, while the entity is incorrectly tagged **kWh / energy**. Direction reports **FORWARD / REVERSE**. The Tuya meter is installed in the incoming grid path. Preserve the raw datapoint, scaling and direction evidence; validate physical units and direction under a known load before relabeling or using it for controls. FORWARD/REVERSE polarity is not assumed to mean import/export without that validation.
- The **CHINT DDSU666** is a separate meter used for SolaX feedback. Do not conflate its measurements or Modbus path with the incoming-grid Tuya/LocalTuya meter.
- October 19 inspection observed **SolaX Modbus 2026.10.1** and a **MIC/Gen4 measured_power versus CT mismatch**. Derived **House Load, Grid Import and Grid Export** are unreliable and must not be treated as calibrated whole-house energy measurements or control inputs. This supersedes the October 18 installed-version snapshot without claiming a thread-performed upgrade.
- Source inspection found MIC/Gen4 Active Power Limit write definition at register **0x669**, with an internal read definition at **0x381**. An Export Power Limit definition at **0x65C** in the shown source is gated for **MIC/GEN2/X3**. These source definitions establish neither applicability to this inverter's export control nor its current register values. Active Power Limit must not be equated with verified zero-export control. No register was written.

### Hypotheses and remaining validation

- **Zero-export operation is likely, but its actual configuration and enforcement are unverified.** The owner's no-export requirement remains a design constraint, not evidence of commissioned inverter settings. The CT/measured_power mismatch does not by itself identify wiring, polarity, register interpretation or firmware as the root cause.
- Pending measurement work: validate DP101 instantaneous units, physical import/export direction and freshness; independently reconcile Tuya incoming-grid readings, CHINT/SolaX feedback and PV AC production; inspect the inverter's actual export-control settings read-only. Preserve the unresolved Wall Connector phase count, circuit limits and safe charging-current checks.
- Existing heater automation unit/schedule/unavailable-safeguard issues remain pending. Do not repair them or deploy shadow/control packages as part of context publication. No-export energy policy needs calibrated inputs and a separately approved shadow trial before any EV/heater control.
- Next Hermes planning gates after publication: refresh VM capacity/storage/backup and network placement; approve the exact VM/install/Telegram/observer scope separately; choose a verified provider path with quota exhaustion and paid-fallback behavior; test a restricted read-only pilot. The Antigravity bridge remains a candidate requiring its own compatibility and failure tests. No installation approval is implied.

### Project Hub reconciliation

- Reuse Project **13**, stable project key **yb-hermes-telegram-agent**, and enrolled phases **33-37**. Preserve all 16 existing stable task keys and statuses. Refine four pending task titles for the remaining ChatGPT, Copilot, calibration and no-export validation; add one pending Antigravity bridge task in Subscription and Quota Validation. Do not mark broad validation tasks complete based only on account inspection or successful standalone CLI inference.

<!-- yb-change:hermes-deployment-20261020 -->

## Hermes VM109 — deployed status and remaining gates (2026-10-20)

This verified deployment update supersedes the October 18–19 planning statements above concerning VM placement, installation, firewall activation, Copilot compatibility and Telegram enrollment. Those sections retain their historical discovery and HA research evidence; their undeployed descriptions are not current deployment status. The retired NAS LXC109 ai-stack is distinct from the new pve QEMU VM109. No local model inference stack was restored.

### Completed and verified

- VM109 `hermes-agent` on pve: Debian 13, 192.168.68.230, 2 vCPU, 4 GiB RAM and 24 GiB disk. It is running, with Proxmox autostart disabled. Reboot health and QEMU guest agent were validated. Administration is key-only SSH as youssef from Docker-Infra; password/root login is disabled. The hermes service account has no sudo, Docker access or administrative SSH keys.
- Hermes v0.22.2 is installed at pinned commit d923a5eb487a17c0a68801bba9ef0f56c81040a8. Browser/computer-use components are excluded. The private Telegram gateway is enabled and running as hermes with protected configuration, dependency/source hashes and a startup policy guard.
- Cluster firewall activation and VM connection/start were completed only after the approved safety gates. Existing host firewall settings/backend and other guest policies were preserved; pve/NAS host filtering remains disabled. Existing guest and service connectivity checks passed. VM109 uses default DROP, explicit IPv6 ingress/egress DROP and guest IPv6 disabled, DNS TCP/UDP53 only to AdGuard .10/.11, private/reserved IPv4 destination denial and SSH only from Docker-Infra. Temporary bootstrap HTTP/HTTPS/NTP exceptions were removed. Reviewed firewall SHA256: 5d865c9ff5c4a72538bc585c27995f7cda0a02c6e542bb9ffd15a4a0bb42de8d.
- Restricted egress uses two enabled Docker-Infra services, hermes-egress-proxy and hermes-egress-tunnel. An exact-host CONNECT proxy on a protected Unix socket is reached through a dedicated restricted SSH reverse forward at VM loopback 127.0.0.1:43891. Allowed TLS hosts: github.com, api.github.com, api.githubcopilot.com, api.individual.githubcopilot.com, copilot-proxy.githubusercontent.com and api.telegram.org. No public proxy listener or TLS interception. Direct guest LAN/public access, unapproved hosts, private/metadata destinations and wrong ports were denied. Proxy failure closes access; restart recovery passed. Temporary package-install host exceptions were removed.
- Copilot Student is the primary active inference route via copilot-acp with model selection auto and official Copilot CLI v1.0.100. Private device authentication completed; CLI and Telegram inference passed. A protected CLI wrapper and a no-tools custom agent restrict tool use. Hermes and CLI toolsets are empty; automatic external-login adoption, updates and auxiliary title generation are disabled. Maximum agent turns 2 and concurrent sessions 1.
- The October 19–20 account inspection showed 7 of 200 included AI credits used (193 remaining), reset November 1, with additional usage disabled and a zero additional-spending budget. This is a dated observation, not a live balance. ACP zero usage fields do not establish zero credit consumption. Exact consumption and quota-exhaustion behavior remain pending; no paid or automatic provider fallback is enabled.
- Dedicated Telegram bot @yb_homelab_bot is activated for its enrolled owner in private chat, polling through restricted egress. Group joining is disabled, privacy enabled and no webhook configured. Actual adapter tests rejected unknown/missing identities, empty allowlists, groups/forums/channels and unauthorized callbacks. Guest access, group observation, speech transcription and multiplexing are disabled. Owner IDs, bot tokens and private enrollment proofs are excluded from publication.
- Owner confirmed the actual private reply HERMES_TELEGRAM_OK through Copilot. Controlled gateway restart/reconnection passed, with zero automatic restarts at final acceptance. Service sandbox checks and changed-hash rejection passed, protected files matched the reviewed manifest, no gateway-owned public listener was present and the bot token was absent from the service journal. /sethome is optional for future default notification delivery and was left unset; normal private chat works.

### Approved design and pending work

- Four-route design: Copilot Student primary for routine work; ChatGPT/Codex as a future complex-task/quota fallback; isolated Antigravity Gemini CLI research; separate Antigravity Claude/GPT CLI analysis. Only Copilot is connected to Hermes. Other routes remain unconfigured or unvalidated in Hermes; earlier standalone Antigravity tests do not validate a bridge.
- Next priority is separately approved VM109 backup coverage and an isolated restore test, including gateway/provider-state recovery and duplicate-bot prevention. Existing backup coverage for the retired LXC109 does not establish protection for this VM.
- Then implement a narrowly scoped read-only observation service with credentials outside Hermes, validate access/redaction/failure behavior, and run a limited read-only pilot. No observer credentials, HA/Tesla tools or autonomous controls are deployed. Broader unattended acceptance remains pending.
- Preserve pending ChatGPT entitlement, Copilot consumption/quota safeguards, Google developer-credit eligibility and Antigravity bridge validation. No paid API usage or paid fallback is authorized.
- Preserve the existing HA/Tuya DP101 calibration, separate CHINT/SolaX measurements, Wall Connector checks, heater automation review and actual zero-export validation tasks. Energy control requires calibrated data, a separately approved shadow trial and explicit bounded-control approval. No HA, inverter, EV or heater controls were changed by this deployment.
- Project Hub 13 / yb-hermes-telegram-agent retains all 17 stable task keys and phases 33–37. VM placement, pinned installation and Telegram hardening are now complete. Copilot consumption validation remains pending despite working ACP integration. Backup/restore, observer and pilot tasks remain pending.

<!-- yb-change:hermes-observer-backup-20261020 -->

## Hermes VM109 — current observer and backup status (2026-10-20)

This verified update supersedes the earlier deployment section's pending observer, zero-tool configuration, and proposed restore-test scope. Other deployment safeguards and provider plans remain unchanged.

### Deployed and validated
- Docker-Infra runs a protected root collector every five minutes. Dedicated SSH access is restricted to its source address and exact source/receiver commands; arbitrary commands and forwarding were rejected. Upstream credentials remain outside Hermes. VM109 receives atomic root-owned snapshots; no new network listener or VM firewall permission was added.
- Hermes CLI and owner-only Telegram expose exactly three empty-argument read tools: inventory, health_summary and ha_energy_snapshot. Lazy tool search is disabled so the three fixed schemas are exposed directly. MCP resources, prompts and sampling are disabled. Snapshot age over ten minutes fails closed; source failures are explicit. Configuration and MCP source match the protected startup policy. Copilot remains primary.
- Six fixture tests, source/receiver restriction checks, native Hermes discovery/dispatch of all three tools, integrity/startup gates and gateway restart passed. All three owner-run Telegram paths were matched to recorded native tool calls/results. Inventory and HA acceptance used snapshot 2026-10-20T22:56:32.776592+00:00: 19 guests, 47 containers (33 Apps, 14 Infra), VM109 running on pve, all three sources OK.
- HA observation is limited to sensor.solax_pv_pv_power_total, sensor.solax_inverter_communication_health, sensor.tesla_wall_connector_total_power, binary_sensor.tesla_wall_connector_vehicle_connected, sensor.tessy_the_beast_battery_level and sensor.water_heater_power. Battery state remained unknown. The measurement caveat was retained; these readings are not calibrated control inputs. No controls or new HA token enrollment were introduced.
- Deployment source, timer/service definitions, validation evidence and recovery instructions are saved under docs/hermes-observer in the homelab repository. Private credentials, owner identifiers and root recovery backups are excluded.

### Backup coverage and pending work
- VM109 is enrolled only in enabled BackupOnNAS job backup-5b19c154-4177, actual storage backupsOnNasNew, daily 09:30 Africa/Casablanca, snapshot mode. Existing guest selections and other job settings were preserved. At 22:54 UTC on October 20, no VM109 NAS backup or recent VM109 backup task existed. Verify the first successful scheduled backup; enrollment alone is not backup success. No immediate backup was started.
- The owner waived an isolated restore test; none was performed, and restore capability is not claimed. Gateway/provider-state recovery and duplicate-bot precautions remain documented operational considerations.
- Restricted observer deployment and its three-tool Telegram pilot are complete. Copilot credit consumption/quota-exhaustion safeguards, other provider routes, broader unattended acceptance, HA calibration, automation review, zero-export/shadow validation and separately approved bounded controls remain pending. No paid fallback or autonomous energy/control scope is authorized.
- Project Hub 13 retains all 17 stable task keys and phases 33–37: observer and limited pilot become complete; backup verification remains in progress with the restore waiver reflected in its title. All unrelated task states are preserved.

<!-- yb-change:hermes-providers-backup-20261021 -->

## Hermes VM109 — Copilot measurement, Gemini route and first NAS backup (2026-10-21)

This update supersedes earlier pending status for the first NAS backup, initial Copilot consumption measurement and Gemini route deployment. Historical records remain preserved.

### Completed and verified
- Copilot ACP with model auto remains the global primary provider. The owner restored the Telegram session using /model auto --provider copilot-acp and received explicit GitHub Copilot ACP confirmation. No automatic fallback is configured.
- One controlled owner Telegram probe returned COPILOT_USAGE_PROBE_20261021 without tools. GitHub's account-wide counter increased from 9/200 to 10/200 AI credits during the observation window. This is an observed one-credit increase, not a fixed per-message price; counters can be delayed or rounded and other clients share the allowance. ACP zero token counters do not prove free inference. Paid additional usage remained disabled with a zero budget.
- Protected Hermes limits are max_turns=2, api_max_retries=1 and auto_recovery_cycles=0. Three synthetic quota/error cases reached terminal failure without external provider calls. Live quota exhaustion and long-term consumption remain unverified; no exhaustion was induced.
- Antigravity Gemini is deployed as a manually selected, isolated text route using official Antigravity CLI 1.4.4 and the dedicated hermes-gemini account on Docker-Infra. Google OAuth was completed privately; the native account displayed Google AI Pro. No developer API key, Cloud billing or developer-credit redemption was enrolled. This subscription CLI path is separate from the pending Google developer-credit eligibility task.
- Provider antigravity-gemini exposes only gemini-3.8-flash-high through authenticated loopback port 43892 and a restricted dedicated SSH reverse tunnel to VM109. Only the latest user text, capped at 12000 characters, is sent. History, system prompts, observer/tool results and tool schemas are excluded. One request runs at a time with deadlines, output caps and process cleanup. Service hardening and integrity checks protect the adapter and policy files; no public listener or guest network/firewall change was introduced.
- Native Gemini uses a finish-only custom agent, strict permission denies and a loaded blanket PreToolUse deny hook. Registered CLI tool inventory still exists; do not interpret this as an empty tool list. The harmless command probe was refused with zero tool steps; hook loading was verified separately, not actual hook invocation. Native Use AI Credits, telemetry and non-workspace access were visually off. Account preference state is not pinned by the file integrity manifest and must be rechecked after account or CLI changes.
- Boundary tests, authentication/model rejection, transport streaming, native Hermes resolver integration and owner Telegram acceptance passed. Telegram returned GEMINI_TELEGRAM_OK at 09:40:58 UTC with zero tool steps. The corrected return command above restored Copilot; the earlier copilot-acp:auto syntax selected an unintended model name on the custom provider and must not be reused. No inference was requested on that mistaken selection.
- The scheduled BackupOnNAS job completed successfully on October 21. VM109 archive vm/109/2026-10-21T09:33:56Z exists on backupsOnNasNew and reports PBS verification state ok. Task log confirms VM109 finished in 00:11:22 and overall TASK OK. First successful scheduled backup verification is complete. The owner waived an isolated restore test; none was run and restore capability is not claimed. The observed scheduled epoch corresponded to 09:30 UTC; no timezone or schedule changes were made.
- Deployment, measurement, safety and recovery records are in docs/hermes-observer. Repository branch project-hub-v2 is clean and synchronized through f8262bab8d6c41ea7ece1913b45a37a191660854. Credentials, owner identifiers and private root recovery contents are excluded. Gemini can be suspended by stopping its two dedicated Infra services without changing Copilot.

### Pending and separate issues
- Continue observational Copilot usage and provider quota/failure validation. Gemini native credit preferences need periodic review; broader two-pool exhaustion/failure behavior and unattended operation are not accepted. ChatGPT/Codex and other Antigravity Claude/GPT routes remain planned and unconfigured.
- Observer acceptance remains complete. HA measurement calibration, heater automation reconciliation, zero-export/shadow validation and separately approved bounded controls remain pending. No autonomous controls or paid fallback are authorized.
- A separate later offsite backup job, which did not include VM109, failed with disk quota exceeded. This is separate from the successful NAS job; no offsite storage, retention or backup settings were changed during this verification.
- Proposed Project Hub reconciliation preserves all 17 stable keys: complete first NAS backup verification; mark Copilot measurement and Antigravity bridge validation in progress while retaining outstanding validation. Preserve the Google developer-credit task and all unrelated statuses.

<!-- yb-change:hermes-observer-acceptance-20261026 -->

## Hermes VM109 — natural Telegram observer acceptance and pinned patch (2026-10-26)

This update supersedes earlier pristine-source and observer-acceptance statements where they conflict. Historical deployments and failed tests remain recorded.

### Deployed and verified
- Copilot ACP auto remains primary; Antigravity Gemini remains a manually selected isolated text route. No automatic fallback, paid developer API, or autonomous controls are enabled.
- Telegram interim assistant messages and streaming are disabled for final-only presentation. Earlier solar and Docker attempts sometimes repeated observer calls, gave premature unavailable responses, or exhausted the two-iteration budget despite fresh data. These were failures, not accepted behavior.
- A fresh-session owner solar test on October 21 passed with one ha_energy_snapshot call and a final response of 498 W, with healthy inverter communication and a current source update. Home Assistant readings remain observation-only and uncalibrated; this was a historical test reading, not today's solar production.
- A reviewed Copilot ACP formatter patch preserves assistant tool-call metadata and tool-result identifiers that the upstream text transcript discarded. Nine offline checks passed. The first local-file deployment was rejected by the existing clean-source startup gate and automatically rolled back. The subsequent authorized deployment recorded only this patch as local commit 196a8396209691c97c8d6392ac247527d7860acc on base d923a5eb487a17c0a68801bba9ef0f56c81040a8 and repinned the protected policy. The guard was not disabled or modified; all prior hash entries and other policy fields were preserved.
- Patched agent/copilot_acp_client.py SHA256 is 9a04146e720516918f1acd7841b22c4cd52455faa991fb2fa91071be8200f79a. This is a locally patched installation, not pristine upstream. Future Hermes upgrades must reconcile the patch and revision policy. Private rollback material is retained on VM109; it is not published.
- Native bounded Docker acceptance passed October 26: one inventory read, two model calls, normal text_response(finish_reason=stop), no iteration-cap summary. The owner Telegram question then passed in the existing session at 10:09 UTC: one inventory request, snapshot age 216 seconds, all three sources OK, and one final response ending with stop. It correctly listed six exited containers and distinguished missing healthchecks from unhealthy status. These tests establish the recorded paths, not universal reliability.
- After deployment and checks, the protected startup gate passed and the gateway was active/running with Result=success and NRestarts=0. Existing max_turns=2, api_max_retries=1, auto_recovery_cycles=0, three fixed read-only observer tools, credential isolation and network protections remain in place. No guest networking, firewall or backup configuration changed.

### Measurement closeout and remaining scope
- The initial controlled Copilot measurement is complete: the October 21 account counter rose from 9/200 to 10/200 during a tool-free Telegram probe. It is an account-wide, possibly delayed or rounded observation, not a fixed per-message price or today's allowance. No additional inference was generated merely to repeat it. Live exhaustion and long-term quota/failure validation remain open; paid additional usage was disabled at the recorded account inspection.
- Snapshot observation supports ordinary Docker, VM inventory and allowlisted HA energy questions. Historical container uptime, stop reasons and arbitrary web/weather access are not implemented. Gemini broader quota/failure validation, ChatGPT/Codex and other planned routes remain pending. HA calibration, shadow-policy validation and separately approved controls remain pending. The first NAS backup remains verified historically; no restore test was run, as waived by the owner.

<!-- yb-change:hermes-subject-routing-acceptance-20261026 -->

## Hermes VM109 — automatic subject routing accepted (2026-10-26 UTC)
This update supersedes earlier statements that subject routing is only planned. The protected local source now includes conservative subject routing, accepted through private Telegram without manual model selection.

- Copilot ACP remains primary for live/personal homelab observations, contextual followups and ambiguous or unmatched requests. Standalone English explanations, comparisons, calculations and explicitly supplied text analysis can use the existing isolated Antigravity Gemini route. This is a local rule policy with no classifier inference call; unsupported formulations default to Copilot. Explicit non-Copilot manual selections remain respected.
- Owner acceptance: a photovoltaic explanation selected Gemini with no tools and normal completion; the following Docker question automatically returned to Copilot with exactly one inventory read and normal completion. The snapshot was about 4.5 minutes old; exited containers, explicitly unhealthy containers and missing health-check status were correctly distinguished. Timestamp-correlated gateway logs and recorded turns establish the route selections.
- Seven offline behavior methods (including a 26-question matrix), two actual native TurnRunner integration methods and two bounded real native provider checks passed. Nineteen earlier synthetic Gemini failure checks passed; these do not establish live quota/authentication failure behavior.
- Startup integrity checking remains enforced. The source checkout was clean and gateway active/running with zero restarts at deployment verification. An initial verification-envelope parser error triggered successful rollback; the same frozen candidate and original backups were reused after decoder correction. Deployment records and tests are committed and synchronized in the homelab repository (9e0d7f5). The protected VM source revision is intentionally local.
- Gemini retains current eligible user text only, excluding prior history, observer results and tool schemas. No automatic quota/error fallback, paid fallback, new credentials, tool grants, autonomous controls or network/firewall changes were introduced. Provider switches may reduce cache reuse.
- Remaining: controlled live quota exhaustion/authentication-expiry, hung-process cleanup and Telegram failure-presentation acceptance. Backup quota work remains deferred by the owner; isolated restore testing remains waived. Existing energy-control plans remain separately scoped and unactivated.

<!-- yb-change:hermes-operations-skills-acceptance-20261027 -->

## Hermes VM109 — diagnostics, briefing and starter skills accepted (2026-10-27 UTC)
This update reconciles the work completed after the October 26 subject-routing publication. It supersedes earlier statements that controlled native/Telegram failure delivery, real disposable-process cleanup, Docker diagnostic fields or starter skills are still unimplemented. Earlier failed attempts remain historical failures, not accepted tests. The usable product is an owner-only, on-demand, read-only Telegram homelab assistant; autonomous operation and device controls remain separate unactivated plans.

### Deployed and verified
- Copilot ACP remains primary for live/personal homelab requests. The accepted conservative subject router still sends eligible standalone analysis to isolated Antigravity Gemini, with current eligible user text only and no observer/history/tool disclosure. No automatic quota/error fallback, paid developer API, paid fallback, new provider enrollment or autonomous controls were enabled.
- Controlled Gemini failure handling is now accepted. The 22 focused adapter checks include actual disposable quota/auth-exit fixtures and a stalled parent/child process-group cleanup check; the timeout clock was accelerated. Five installed native cases (HTTP 502, 429, 401, 408 and a closed local connection) each produced one terminal failure, one completion request and no fallback. Two named-Gemini retry defects were corrected: a hidden streaming-to-nonstreaming probe and a final primary-client rebuild after connection failures. Other providers retain their existing branches.
- Private Telegram owner acceptance covered three loopback fixture replies: generic failure, busy route and local authorization check, explicitly stating that no other provider was tried. The fixture did not contact Gemini or retain prompt bodies/headers, and the real route restored automatically. A separately pasted uncorrelated custom diagnostic was not attributed, so this does not establish that every possible progress diagnostic is absent. Genuine account quota exhaustion and OAuth expiry remain unobserved; generic upstream HTTP 502 cannot safely classify them.
- The protected VM source revision is local commit 6bd3aaa936f6272ee22c9a76decc4e62c318fec3, incorporating the earlier reviewed transcript/routing/failure fixes. Its clean checkout and startup gate were verified. This is an intentionally locally patched installation, not pristine upstream; future upgrades must reconcile source patches and integrity bindings. Native source revisions remain local to VM109; deployment records/tests are synchronized in the homelab repository.
- Docker-Infra and Docker-Apps now publish narrow per-container diagnostics through the existing inventory observer: restart_count, exit_code for exited/dead containers, oom_killed, started_at, last_finished_at and diagnostics_available, alongside state/health. Installed collection verified all 47 containers at acceptance. A fixed inspect projection excludes environment, command, labels, mounts, ports and health logs; inspection failure preserves basic inventory and unknown diagnostics. Eight focused diagnostic tests and six existing boundary tests passed. No arbitrary log or container-control access was added.
- Snapshot delivery initially failed because VM109's unsynchronized clock lagged the collector. The owner separately approved a permanent VM109-only outbound IPv4 UDP/123 exception after the reserved/private-address deny. Exact order and firewall compilation were verified; the cluster firewall was already enabled/running before this change, and cluster settings/other guests were preserved. Existing time synchronization was restarted and reached NTPSynchronized=yes. Receiver future-time checks and the observer ten-minute freshness gate were retained.
- Docker diagnostic owner acceptance passed with one fresh inventory read and normal completion. Recorded counters are not a restart rate or event history; a nonzero exit code alone does not establish cause, zero exit does not establish intended state/job type, and missing health checks remain unknown. The observer has no logs explaining the recorded Redis exit 255; no remediation was performed.
- The on-demand homelab briefing is accepted through Telegram: five labelled sections cover sources/time, Docker/VMs, hosts/storage, VM109 NAS backups and solar/energy. The verified October 27 turn made one batch of the three existing observers, each once with empty arguments, using a 156-second-old snapshot and a normal final stop. Unknown health/storage, untested restore success and measurement limitations were preserved. Storage availability alone does not establish filesystem free capacity.
- Three operator-directed instruction-only native skills are installed: yb-docker-triage, yb-backup-readiness and yb-energy-interpretation. Native skills.auto_load preloads them without skill/model commands, arbitrary skill-loading tools, scripts, new credentials or new runtime permissions. Files are root-owned/read-only and hash-bound by the existing startup policy. The selected skills add about 11.5k characters of prompt context; their procedures apply when relevant. Gemini's existing disclosure boundary remains unchanged.
- Initial briefing/skills Telegram attempts reused historical chat data and were rejected. Supported per-turn trusted guidance was corrected to require relevant same-turn observers for every live Docker, backup and energy question, including investigation requests without current/latest wording; combined requests batch each required observer once. Replay tests included the actual old owner conversation and retained the two-iteration limit. No session reset or guard bypass was required.
- Final starter-skills Telegram acceptance on October 27 used exactly one three-observer batch, all empty arguments, successful sources, a 175-second-old snapshot and finish_reason=stop. Docker priority was supported by exit/OOM/finish evidence without an invented cause or completed-job claim; NAS archive evidence was distinguished from untested recovery; solar power was distinguished from daily energy and a degraded inverter warning was preserved. This is evidence for the recorded path, not a guarantee of universal future model accuracy.
- The runtime remains limited to inventory, health_summary and ha_energy_snapshot. max_turns=2, api_max_retries=1, auto_recovery_cycles=0, owner-only Telegram access, provider isolation and startup integrity remain enforced. No host/guest/container control, new observation source, energy actuation, automatic alert or new scheduled job was enabled. Private rollback artifacts remain on their hosts. Final accepted deployment records are synchronized through homelab repository commit c815d54868b3644d30738c565723d19667a601e0.

### Remaining work and explicit deferrals
- On-demand snapshot change tracking is planned and deferred: newly stopped/restarted containers, VM state, storage/source status and new VM109 archive comparisons require comparable prior snapshots. Current restart counters alone do not provide this history.
- Genuine account quota exhaustion/OAuth expiry and dependable quota-based routing signals remain unobserved. Controlled failures do not establish real account behavior, and ordinary bot use does not require deliberately exhausting accounts or revoking authentication. Automatic quota fallback remains disabled and deferred.
- ChatGPT/Codex integration and direct Google developer-credit/API billing remain deferred. The working Google route is the accepted Antigravity Gemini subscription route; no paid API activation is implied by this context/Hub update.
- Backup quota remediation remains deferred by the owner. NAS archive presence is observed evidence, not proof of recoverability; the isolated restore test remains explicitly waived rather than an outstanding compulsory gate.
- HA unit/direction calibration, heater automation reconciliation, no-export shadow policy, bounded EV/heater controls and autonomous-operation acceptance remain separately scoped, pending and unactivated. They do not block ordinary read-only Telegram observations. No new permission for those activities is granted by this publication.

<!-- yb-change:cloudflared-security-maintenance-20261027 -->

## Cloudflared security maintenance — 2026-10-27

Security advisory remediation completed across all three documented Cloudflare Tunnel connectors.

- **Docker-Infra (192.168.68.36):** Upgraded `cloudflared` from `2026.10.0` to `2026.10.3` using a pinned Docker image digest. Four QUIC connections registered successfully.
- **TrueNAS (192.168.68.64):** Verified the existing connector was already running `cloudflared 2026.10.3`; no upgrade required.
- **GCP-US (35.211.62.198):** Upgraded the standalone Docker connector from `2026.3.0` to `2026.10.3` using a pinned image digest. Four QUIC connections registered successfully.
- **GCP cleanup:** Removed the obsolete container, rollback container, vulnerable Docker image and temporary configuration backup. The replacement `cloudflared-gcp` container remains running with restart policy `unless-stopped`.

**Verification scope:** Connector versions, running containers and successful QUIC registrations were confirmed. Comprehensive authenticated application checks and Cloudflare dashboard health verification were not performed.

<!-- yb-change:tailscale-security-upgrade-20261027 -->

### Tailscale security upgrades — 2026-10-27

**Completed:** Upgraded five Tailscale installations to version 1.104.2:
- Home ASUS RT-AX58U v2 primary subnet router, previously 1.92.3.
- Home backup subnet router CT113, previously 1.102.4.
- ******** primary subnet router VM103, previously 1.102.2.
- ******** backup subnet router CT100, previously 1.92.3.
- GCP exit node, previously 1.102.2.

**ASUS verification:** Official signed ARMv7 binaries installed and Entware daemon restarted. Client and daemon both report 1.104.2. The router continues advertising `192.168.68.0/24`. Policy-routing priority 2500, route to `192.168.50.0/24`, home-to-******** MASQUERADE, and TrueNAS SSH replication NAT remain present. Original binaries and startup script were backed up under `/opt/backup/tailscale-pre-1042/`.

**Cross-site verification:** ASUS successfully pinged ******** router `192.168.50.43` (3/3 replies, average 6.6 ms) and established a direct Tailscale connection to `100.91.148.126`. Windows home LAN client `192.168.68.182` successfully connected over TCP/22 to ******** router `192.168.50.43`, Proxmox `192.168.50.45`, and replication target `192.168.50.50`.

**Other nodes:** ******** primary and both backup subnet routers were verified running after their upgrades. On ******** backup CT100, a broken systemd override referencing missing `/usr/local/bin/tailscale-routes.sh` was disabled and backed up under `/root/tailscale-service-backup/`. GCP exit-node advertisement remained configured. Tailscale SSH was disabled (`RunSSH:false`) on all five nodes.

**Security follow-up:** Version 1.104.2 must not be treated as confirmed remediation for all Tailworm vulnerabilities. Verify the official patched release and update affected nodes when available. TAILMON is a separate ASUS management script and was not upgraded.

**Pending validation:** Post-upgrade primary/backup subnet-router failover, actual GCP exit-node traffic, and a TrueNAS replication job. Historical successful home subnet-router failover testing on 2026-10-05 remains valid as a historical result, not as proof of post-upgrade failover.

<!-- yb-change:hermes-diagnostics-opencode-roadmap-20261027 -->

## Hermes — restricted diagnostics and two-agent roadmap (2026-10-27 UTC)

### Completed and verified
- Hermes VM109 remains the owner-only, read-only Telegram operations assistant, with Copilot ACP primary and isolated Antigravity Gemini subject routing. No automatic provider fallback or paid overage was enabled.
- The October 27 restricted diagnostics phase added dedicated forced-command hermes-diagnostics accounts on pve, NAS, Docker-Infra and Docker-Apps. Other guest operating systems are not enrolled.
- Eight observer tools are enabled: inventory, health_summary, ha_energy_snapshot, backup_diagnostics, docker_diagnostics, host_diagnostics, guest_diagnostics and approved_read.
- Approved reads cover restricted host resources, selected service states, bounded classified service-log signals and PVE NAS backup configuration. There is no general shell, arbitrary file or URL access, forwarding, self-approval or control operation.
- Validation recorded 36 software/transport tests, 13 live read probes, 12 SSH denial checks, four unrestricted-sudo denial targets, four actual broker target routes, two native scenarios and successful owner Telegram acceptance.
- Latest feature commit: d7d746bb3d9830d0667eaf72e2fff680c3289fa4. Native Hermes remains pinned to clean revision 6bd3aaa936f6272ee22c9a76decc4e62c318fec3.

### Approved architecture — not yet deployed
- Hermes remains the operations intelligence agent for on-demand observation, monitoring evidence, guided troubleshooting, investigation, research and recommendations.
- Extend existing troubleshooting skills to distinguish fresh evidence, classified signals, hypotheses and unknowns. Proposed fixes must include risks, rollback and verification, without execution.
- Plan bounded public technical web research with source citations, official-documentation prioritization, community cross-checking, public HTTPS isolation, SSRF/redirect protection, output and request limits, and prompt-injection defenses. No unrestricted browser or general network access is authorized.
- Plan a separate OpenCode engineering agent, initially accessed through existing code-server and Termius, in an isolated development workspace without production credentials. Evaluate supported Copilot and ChatGPT subscription authentication without extra paid developer APIs.
- Future integration may transfer sanitized Hermes diagnostic reports to OpenCode for proposed code/configuration patches, tests and human review. No automatic operational authority transfer. An OpenCode Telegram interface is deferred.

### Pending and deferred
- Continue read-only Home Assistant discovery of SolaX grid import/export, household demand, battery metadata if applicable, Tesla charging measurements, SOC, electrical/current limits, actual supported controls, tariffs, departure requirements and existing automations. Produce dry-run proposals before any control approval.
- Autonomous remediation, charging controls, proactive notifications and agent-scheduled jobs remain disabled. ChatGPT provider enrollment in Hermes remains deferred.
- Backup quota remediation remains deferred, independent PBS pruning policy/history remains unverified, and isolated restore testing was waived.
- Preserve owner restrictions, provider isolation, startup guards, existing networking, stable Hub task mappings and manual task statuses. Project context and Hub publication require separate reviewed approval.

<!-- yb-change:nintendo-switch-v1-upgrade-20261027 -->

## Nintendo Switch V1 — upgrade and recovery (2026-10-26–27)

### Completed and verified
- Switch V1 with partition-based SD RAW emuMMC. Upgraded emuMMC firmware from 20.3.0 to 22.5.0 using Daybreak; sysNAND was not upgraded.
- Upgraded Atmosphère from 1.9.4 to 1.12.1, Hekate from 6.3.1 to 6.5.4 and Nyx to 1.9.4. Confirmed successful boot as `22.5.0 | AMS 1.12.1 | E`; restored Hekate autoboot into Atmosphère.
- Homebrew Menu 3.6.1 works through Album without holding R, accommodating the broken right Joy-Con R button. DBI 921-en installed; duplicate older DBI applications archived.
- Existing games launch successfully. EA SPORTS FC27 base game was installed using DBIbackend over USB and successfully launched. Windows DBI MTP recognition was repaired by selecting the native MTP USB Device driver; DBIbackend succeeded after repeated MTP transfer interruptions.
- sys-patch 1.6.2.3 and sys-con 1.7.0 were installed and tested during troubleshooting. 8BitDo controller operation over USB was confirmed.
- Legacy Atmosphère sysmodules and ExeFS patches were isolated for compatibility rather than permanently deleted.

### TrueNAS backup and recovery
- Original full backup dated 2026-10-26 preserved: visible SD data, emuMMC RAW GPP and BOOT0/BOOT1, and sysNAND recovery images.
- Incremental backup dated 2026-10-27: 499 new/modified visible-SD files totaling 34.35 GiB, zero copy failures and zero missing/size mismatches. Recovery manifest records 156 baseline-only file paths for correct reconstruction.
- Updated emuMMC BOOT0/BOOT1 backed up to TrueNAS and verified by SHA-256 against the source files.
- Updated emuMMC RAW GPP imaged directly through Hekate USB to TrueNAS: 12,892,241,920 bytes; SHA-256 `2612856D18F921409AE6EB4B0674EC76AD2F6FEF3BD168746D18F7F617291FC0`. Image size verified and checksum recorded in recovery manifest.
- Recovery root: `\\192.168.68.64\media\games\SwitchBackups\Switch-V1\2026-10-27-Incremental`.
- No complete restoration test has been performed; file-size checks and calculated hashes must not be described as a tested restore.

### Pending
- Consider upgrading the nearly full 128 GB microSD card to 512 GB, preserving the existing emuMMC, games and saves. No migration has been performed.

<!-- yb-change:hermes-truenas-web-acceptance-20261028 -->

## Hermes — TrueNAS diagnostics and public research accepted (2026-10-28 UTC)

### Completed and verified

- Hermes VM109 remains the owner-only Telegram operations assistant. GitHub Copilot ACP is primary; the isolated Antigravity Gemini route remains available. No automatic provider fallback, paid developer API or autonomous remediation was enabled.
- Guided troubleshooting is deployed with four instruction-only skills, fresh-evidence requirements, hypotheses distinguished from observations, operator-reviewed fixes, rollback guidance and exact host/guest/application matching. Telegram acceptance verified that TrueNAS Immich is not confused with Docker-Apps Immich Kiosk.
- TrueNAS SCALE 25.10.7 VM102 is enrolled through restricted read-only diagnostics. Five profiles cover applications, storage, system, snapshots and replication. Deployment and acceptance records are in the repository under `docs/hermes-observer/truenas/`. Observations do not establish full application health, complete replication or tested recoverability without supporting evidence.
- Bounded public technical research is deployed using a private SearXNG instance and a separate search gateway on Docker-Infra. Only `127.0.0.1:48889` is published locally. The core network is internal-only, with enforced approved search-engine domains, public-address validation, HTTPS and redirect boundaries.
- The `public_web_search` tool accepts only twenty approved public products and fourteen topics. It permits one generated query per call, three searches per minute and at most six projected result snippets. No arbitrary query text, URLs, private diagnostics or result-page fetching is supported.
- Hermes now exposes fourteen tools. Public web-search validation passed sixteen focused tests and seven production network rejection checks. Native MCP search and owner Telegram acceptance succeeded on 2026-10-28. The response distinguished official from community evidence and disclosed incomplete upstream coverage.
- The Hermes startup integrity guard passed after deployment. Twenty-six protected integrity bindings remain. Native Hermes revision is pinned to `6bd3aaa936f6272ee22c9a76decc4e62c318fec3`.
- Verified GitHub repository synchronization: TrueNAS integration commit `8fb44b1`; public web-search source and acceptance commit `58ade145baf7c3fd7c85a57fe2c096bcb130daf0`, branch `project-hub-v2`, with clean working tree and zero remote divergence.

### Remaining roadmap

- Pilot an isolated OpenCode engineering agent through code-server and Termius, with human review and no production credentials or additional paid APIs.
- Design a sanitized Hermes-to-OpenCode diagnostic handoff. No automatic execution or authority transfer is approved.
- Continue read-only Home Assistant, SolaX, Tuya, Tesla Fleet, tariffs and automation discovery; calibrate measurements and evaluate shadow-mode self-consumption proposals before any control approval.
- Preserve deferred quota-exhaustion validation, on-demand historical changes, independent PBS pruning verification and waived restore-testing status.
- Keep owner-only access, provider separation, read-only permissions, startup protections and existing guest network rules intact.

This section supersedes the earlier October 27 roadmap status for guided troubleshooting, TrueNAS enrollment and bounded public research. Context and Project Hub publication are separate from the already completed service deployments.

<!-- yb-change:hermes-opencode-progress-20261030 -->

## Hermes and OpenCode engineering progress — 2026-10-30 UTC

### OpenCode VM123 — deployed

- OpenCode 1.19.5 deployed in isolated VM123 (192.168.68.58).
- Existing web access, authentication, reverse proxy and owner restrictions retained.
- ChatGPT Plus authentication configured and live inference accepted without a separate paid developer API.
- Model configuration and execution limits were tuned to avoid unnecessary subscription consumption.
- The Python command-execution permission issue was resolved. OpenCode successfully generated, executed and tested Python code; six Python tests passed.
- Existing configuration and credential isolation preserved. No unrestricted production credentials or automatic remediation authority granted.

### Hermes to OpenCode — Docker reporting

- A Docker reporting engineering workflow was implemented and validated.
- The workflow uses sanitized diagnostic data for engineering analysis and proposed code changes, rather than granting OpenCode operational authority.
- Nineteen focused checks passed in the reported acceptance run.
- Implementation Git commit c0b8ee7 was reported with a clean working tree. Current repository synchronization must still be checked independently.
- A reusable operator handoff command remains a follow-up; do not interpret the workflow as autonomous remediation.

### VM123 backup

- VM123 was added to the existing daily 09:30 NAS backup job and a backup run was initiated.
- Completion of that run was not awaited or verified in the source work session.
- Backup integrity and recovery testing remain unverified.

### Remaining work

- Verify the actual VM123 backup result and coverage.
- Verify live ChatGPT OAuth renewal before/around the recorded 2026-11-09 token expiry. Earlier refresh tests passed, but unattended renewal was not proven.
- Complete or explicitly waive an isolated recovery test.
- Improve the reusable manual Hermes-to-OpenCode handoff.
- Preserve Hermes VM109 read-only operation, owner-only Telegram access, protected diagnostics and provider isolation.
- Keep autonomous remediation, uncontrolled shell access, additional paid APIs and automatic production changes disabled.

This section supersedes the October 28 OpenCode pilot roadmap where subsequent work was completed. Earlier historical records remain intact.

<!-- yb-change:opencode-kaggle-ollama-20261030 -->

## OpenCode — Kaggle Ollama secure inference integration (2026-10-30 UTC)

### Completed and verified

- Existing OpenCode VM123 (192.168.68.58) retains ChatGPT Plus as its default provider. No changes to Hermes VM109, Telegram operation, or autonomous remediation authority were made in this work.
- Kaggle notebook runs Ollama with `qwen3.6:35b` on two NVIDIA Tesla T4 GPUs. Both the Ollama process and Cloudflare connector were verified running. Kaggle is session-dependent, not an always-on VPS.
- Dedicated Cloudflare Tunnel `kaggle-ollama` and proxied hostname `ollama.youssefbouanani.com` are configured. The tunnel was observed healthy with one active connector.
- Cloudflare Access protects the endpoint using an owner browser policy and the `opencode-kaggle-ollama` Service Auth token. The token is configured to expire on 2027-10-30. Credentials remain private.
- An HTTP 403 issue was reproduced with Ollama receiving the public hostname. Configuring the existing tunnel's HTTP Host header as `localhost:11434` resolved the issue. The origin remains `http://127.0.0.1:11434`.
- VM123 runs the enabled `opencode-kaggle.service` under `opencode-relay`. Its restricted Unix socket is `/run/opencode-kaggle/provider.sock`; Cloudflare credentials are delivered through systemd LoadCredential rather than exposed in the OpenCode workspace.
- Authenticated `GET /v1/models` through the relay returned HTTP 200 and identified `qwen3.6:35b`.
- Initial local inference with default thinking took 178.8 seconds and exhausted a 100-token reasoning budget without producing a final answer. A subsequent warm-model native Ollama test with thinking disabled returned the correct answer in 0.56 seconds.
- An OpenAI-compatible `POST /v1/chat/completions` through the VM123 relay using `reasoning_effort: none` returned HTTP 200, the expected answer, and `finish_reason: stop` in approximately 1.15 seconds.

### Pending and operational limitations

- Inspect and validate the existing OpenCode Kaggle provider candidate, then add Qwen as an optional selectable model without replacing ChatGPT Plus as default.
- Verify OpenCode's effective reasoning configuration, streaming responses, tool calling and coding-agent compatibility before declaring the provider integration complete.
- Document and test Kaggle session expiration, restart/recovery and cold model loading. The successful warm-model timings are not an availability or sustained-performance guarantee.
- Preserve existing security policies, credential isolation, Hermes read-only permissions and human review requirements. No production write or autonomous action authority is granted to Qwen.

<!-- yb-change:opencode-reliability-production-20261031 -->

## OpenCode production reliability and container identity — verified 2026-10-31

This update supersedes the earlier pending OpenCode provider-selection and pilot runtime notes where stated below. Historical Kaggle benchmark results remain historical observations, not current availability.

### Deployed and verified
- VM123 (192.168.68.58) runs OpenCode 1.19.5 in the container named opencode. The approved container-name migration from opencode-pilot completed on 2026-10-31; the launcher checksum is c96b97059eb98ffa2415d4d44c7798c2df53a3b4c257d6cf727cf28d05098fcd. Legacy installation paths and the existing agent identifier remain unchanged.
- The launcher no longer starts, stops or restarts provider services. OpenCode has Wants/After ordering for both provider relays, automatic failure recovery, and a bounded 30-second connectivity check executed as UID/GID 1000 before container creation.
- ChatGPT now uses a read-only runtime-directory bind mount at /run/chatgpt-provider instead of an individual socket-file mount. Both provider directories persist across systemd stop/start cycles; runtime directories are 0750 and sockets 0660, owned by opencode-relay:youssef. Only an owned stale Unix socket returning ECONNREFUSED is removed at provider startup; live sockets and unexpected preimages are preserved.
- ChatGPT directory and socket group ownership is assigned inside the main relay process because systemd resets runtime-directory ownership between startup commands. RestrictSUIDSGID=yes and existing credential-directory ownership/modes remain unchanged. No credentials were published.
- Acceptance passed: each relay was restarted while the OpenCode container remained the same instance; both sockets remained connectable from the container. OpenCode restart, API /config and /provider, provider registration, effective UID1000 socket access, hashes, permissions and unchanged model configuration were verified. The later container rename passed API/socket checks and preserved both relay process IDs.
- ChatGPT Plus remains the default provider, openai/gpt-6-luna. A post-reliability inference smoke test returned the expected answer in 3.2 seconds. kaggle-ollama/qwen3.6:35b is configured and registered as an optional model; its current upstream outage is recorded below.
- Existing Docker bridge networking, writable root, unprivileged UID/GID 1000, dropped capabilities, no-new-privileges, 1 CPU/1 GiB limits and private proxy/auth access remain in place. No new public listener, credential access or autonomous production authority was introduced.
- The coordinated reliability package was deployed successfully as opencode-reliability-20261031-v1 amendment 2. The original package and amendment 1 failed acceptance and were rolled back; amendment 1 recovery completed without errors. Historical packages, backups and receipts are retained privately on VM123. The approved rename package opencode-container-rename-20261031 also has a verified receipt.

### Current limitation and pending work
- Qwen inference through OpenCode failed with the local Kaggle relay returning HTTP 502. A direct authenticated upstream check returned Cloudflare HTTP 530 with error 1033. The Kaggle tunnel connector/session must be recovered before Qwen can be considered available; this is distinct from the verified local Unix-socket restart resilience. No provider fallback was attempted for the Qwen smoke test.
- Recover the Kaggle notebook/Ollama/cloudflared session, then repeat optional-model inference. Effective reasoning options, streaming, tool calling, coding-agent compatibility, cold loading and session-expiry recovery remain pending.
- Container naming is now production-oriented; installation directories, command labels and the pilot agent identifier are legacy names retained for compatibility. Further renaming or resource-limit changes require a separate reviewed scope.

<!-- yb-change:opencode-kaggle-recovery-acceptance-20261031 -->

## OpenCode — Kaggle recovery and Qwen acceptance (2026-10-31 UTC)

This entry supersedes the earlier same-day Kaggle error 1033 availability limitation.

### Verified implementation
- The existing private Kaggle notebook was resumed with two T4 GPUs and the attached private Qwen model dataset. Ollama and cloudflared were restored; all 22,621,315,909 model-blob bytes were copied successfully. Notebook version 4 saves a repeatable Run All startup flow.
- Startup installs missing binaries, skips model files already present at the expected size, uses a lock against duplicate restore runs, waits for Ollama readiness and runs a bounded synthetic inference check. A fresh Kaggle runtime still needs rebuilding; saved code and dataset persistence do not keep processes alive.
- The managed Cloudflare connector uses the existing enabled Kaggle Secret CF_KAGGLE_CONNECTOR through a private token file. No tunnel token was placed in notebook source or context. The existing hostname and Cloudflare Access boundary are retained.
- Authenticated VM123 upstream model listing and chat completion returned HTTP 200; the synthetic arithmetic answer was 4. Local inference also passed. Observed local cold-start inference took 230.55 seconds; a subsequent check took 124.49 seconds. These are observations, not a latency guarantee.
- Through the existing VM123 Unix-socket relay, streaming returned 4 and the terminal DONE event. Forced tool calling returned add with integer arguments a=2 and b=2.
- An isolated OpenCode coding task created convert.py and test_convert.py and executed three passing unittest cases: 0 C, 100 C and -40 C. The exported session reports only kaggle-ollama/qwen3.6:35b for assistant messages; no provider fallback was used for this acceptance task.
- OpenCode retains openai/gpt-6-luna as its default; Qwen is an optional provider. Existing container/socket reliability changes remain in place.

### Remaining work
- Unattended Kaggle session recreation and code execution are not deployed. The official Kaggle CLI 2.2.5 is installed in an isolated VM123 environment. A syntax-checked OAuth helper requests notebook read/update scopes instead of the CLI default account-wide administrative scope; it has not authenticated.
- Complete notebook-scoped Kaggle authorization, validate supported session creation, GPU selection, dataset/secret retention and notebook execution, then test bounded on-demand recovery with quota-aware backoff. Do not claim an API-created session has executed bootstrap cells without evidence.
- Restart/expiry acceptance, failure reporting and model-store copy optimization remain pending. Kaggle runtime/quota limits still apply; no keepalive, continuous relaunch loop, scheduler or 24/7 availability was enabled.

<!-- yb-change:opencode-kaggle-oauth-scope-blocker-20261031 -->

## OpenCode — Kaggle OAuth connected; API authorization blocker (2026-10-31 UTC)

### Verified progress
- VM123 now holds saved Kaggle OAuth credentials for the expected owner account. Token introspection reports active notebook read, update and execute scopes plus user-profile read restricted to that owner's account ID. No credential values are included in this context.
- The documented Kaggle OAuth token endpoint succeeded after the SDK RPC exchange failed. The helper uses PKCE, hidden verification-code input, account/scope checks and the SDK credential store; it preserves existing credentials on a failed exchange. The PKCE self-test and official endpoint-discovery checks passed.
- Real notebook access is still denied. Kaggle CLI 2.2.5 and a direct authenticated GetKernel request both returned HTTP 403: Required permission users.get was not satisfied, despite the account-specific users.get scope being present in the token.
- Official Kaggle MCP initialization and tool discovery returned HTTP 200. Its get_notebook_info call for the owner's existing Qwen notebook returned Permission kernels.get was denied. Successful OAuth and tool discovery are therefore not evidence of working notebook access.
- The read-only recovery preflight now checks actual notebook metadata access after checking token identity and scope coverage. It reports API_PERMISSION_DENIED with notebook_api_http 403 and stops before any session creation. Focused scope-coverage tests passed.

### Remaining work and authorization boundary
- Autonomous Kaggle resuming remains pending; no session was created, notebook executed, scheduler installed or keepalive enabled by this OAuth phase.
- A candidate request for users.get:* is prepared but has not been authorized or activated. It would broaden profile lookup beyond the previously approved own-account scope. The API's owner lookup appears to need an unscoped users.get check, but that explanation remains an inference until validated with an approved grant or confirmed by Kaggle.
- Obtain explicit approval before broadening this permission. Then validate real notebook access, GPU/session creation, attached dataset and secret retention, execution and bounded expiry recovery. Keep the current OAuth credentials and one-click notebook recovery available meanwhile.
- The previously verified Qwen streaming, tool-calling and three-case OpenCode coding acceptance remain historical successes; this OAuth blocker does not undo them or prove current Kaggle runtime availability.

<!-- yb-change:nas-ram-zfs-recovery-20261101-v2 -->

## November 1, 2026 — NAS memory replacement and ZFS recovery verification

This update supersedes the October 17 recovery section's statements that the NAS has 48 GB RAM, that 78 Tank permanent-error records remain, and that the November 1 scrub and error reconciliation are pending. The earlier incident and remediation history is retained.

### Verified hardware recovery
- NAS Proxmox host: HP EliteDesk 800 G4 SFF, motherboard 83E1. The Corsair warranty replacement kit (2 × 16 GB DDR4, CMK32GX4M2E3200C16) was installed in DIMM1 and DIMM3. Existing SK hynix 8 GB in DIMM2 and Samsung 16 GB in DIMM4 were retained.
- Installed RAM: 56 GB, operating at 2133 MT/s without XMP. MemTest86+ v7.20 completed three full passes with zero errors on the complete mixed-DIMM configuration.
- NAS Proxmox restarted successfully. TrueNAS VM102, Docker-Apps VM121 and secondary AdGuard CT115 were confirmed running. AdGuardHome service was active.
- At the initial post-reboot check, Linux reported approximately 54 GiB usable RAM, 24 GiB available and zero swap in use. These are point-in-time observations, not guarantees of ongoing resource utilization.
- NAS kernel reported `EDAC ie31200: No ECC support`, not a detected memory fault. Continued production stability monitoring remains advisable.

### Verified November 1 ZFS results
- Bolt remained ONLINE with zero device errors and no known data errors.
- Tank, a two-disk 12 TB mirror, remained ONLINE with zero READ/WRITE/CKSUM device counters.
- The scheduled full Tank scrub completed November 1, 2026, in 10 hours 21 minutes 45 seconds, repairing 0 B and reporting zero scrub errors.
- The 78 previously recorded permanent ZFS data errors remained after the full scrub and `zpool clear Tank`. Successful file reads had previously been verified but did not clear those records.
- OpenZFS 2.3.9 with `feature@head_errlog=active` supported a targeted error scrub. `zpool scrub -e Tank` checked 324 recorded error blocks in five seconds on November 1, 2026.
- Final `zpool status -p Tank`: ONLINE; both mirror members reporting zero device errors; `errors: No known data errors`. The 78 persistent records are now cleared. No snapshots, datasets or media files were deleted for this final cleanup.
- This confirms the current ZFS-reported health and removal of known error records; it does not prove byte-for-byte fidelity to original copies of all affected media.

### Remaining work
- Return both original Corsair kit modules under the warranty RMA. Support authorized proceeding with the quoted 850 MAD DHL return; shipment, PayPal reimbursement and final deposit refund remain unverified.
- Continue monitoring the NAS under normal load and retain scheduled storage scrubs.
- Existing outstanding PBS scheduled-run acceptance, first successful GC, weekly verification, isolated guest restore, independent media backup protection, capacity audit and backup-monitoring review remain pending unless separately verified.

<!-- yb-change:backup-schedule-reconciliation-20261104 -->

## November 4, 2026 — Verified backup infrastructure and schedules

This section supersedes conflicting earlier backup schedules and guest selections.
All local schedules use Africa/Casablanca; UTC+0 on November 4, 2026.
Configured schedules were verified after modification; successful execution
of every new daily cycle remains pending.

### Proxmox VE scheduled guest backups

| Storage | Schedule | Guest IDs | Retention | State |
| --- | --- | --- | --- | --- |
| local (local Proxmox Storage) | Daily 09:45 | 113, 114, 115, 121, 122 | keep-last=1 | Enabled |
| backupsOnNasNew (local PBS on NAS storage) | Daily 10:30 | 100, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 116, 121, 122, 123 | PBS-managed | Enabled |
| Tuxis (Cloud PBS) | Daily 12:30 | 100, 102, 103, 105, 106, 107, 108, 110, 111, 113, 114, 115, 116, 121, 122 | PBS-managed | Enabled |
| RemoteBackups, containers | Daily 13:30 | 103, 106, 107, 108, 111, 113, 114, 115, 116 | keep-last=2 | Enabled |
| RemoteBackups, VMs | Daily 14:30 | 102, 110, 121, 122 | keep-last=1 | Enabled |
| Cold-Backups (offline USB PBS) | First Saturday 17:00 | 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 121, 122, 123 | keep-last=6; keep-yearly=2 | Paused (job disabled) |

All listed PVE backup jobs use snapshot mode. Guest selections are
configured coverage, not proof of a successful restore point for every guest.
The disabled cold USB job remains available for deliberate manual operation.

### Host configuration backups

PVE and NAS root crontabs run /root/node_backup_configs.sh daily at 09:10.
The established host-recovery workflow uses the Tuxis Proxmox_Nodes
namespace and downstream synchronization to local PBS and RemoteBackups.
Actual upload completion and per-host recoverability require separate checks.

### Local PBS — backups-pbs-new

Local PBS VM110, datastore backups-pbs-new, backed by Tank/pbs-datastore:

- Daily 10:00: sync-tuxis-hosts pulls Proxmox_Nodes from Tuxis
  FL002594_HomeLab, transfer-last=2, remove-vanished=false.
- Sunday 15:00: prune VMs namespace, keep-last=2 per backup group.
- Sunday 15:30: prune Proxmox_Nodes, keep-last=2 per backup group.
- Monday 16:30: datastore-wide garbage collection; most recently
  verified successful November 2, reclaiming 32.526 GiB.
- Saturday 18:00: verification job, ignore recently verified,
  outdated-after=30 days.
- Sync, pruning, GC and verification are separate mechanisms.
  Pruning removes snapshots; GC later reclaims eligible unused chunks.

### Tuxis hosted Cloud PBS — FL002594_HomeLab

Provider-side prune policies observed November 4:
- VMs namespace: keep-last=2 and keep-yearly=1.
- Proxmox_Nodes namespace: keep-weekly=5, keep-monthly=4,
  keep-yearly=1.
- Both prune jobs run daily. Provider interface displayed 10:36 for
  hosts and 10:45 for guests; observed UTC executions were about
  09:36 and 09:45 respectively. Hosted server timezone needs
  independent confirmation before treating displayed times as UTC.
- Daily garbage collection: provider interface displayed 11:45,
  corresponding observed UTC execution approximately 10:45.
  Latest observed GC succeeded, reclaimed about 12.61 GB,
  with zero bytes pending.

### RemoteBackups hosted PBS — yb_datastore

100 GB free-tier Cloud PBS with direct guest backups in the VMs
namespace. PVE applies keep-last=2 for selected containers and
keep-last=1 for selected VMs. No separate provider-side prune jobs
were visible. Provider FAQ specifies centrally scheduled GC every
12 hours; exact slots are not exposed.

Provider-side Tuxis to RemoteBackups Proxmox_Nodes synchronization
is scheduled daily around 00:00 UTC and uses remove-vanished=true.
It is separate from the direct VMs namespace.

### TrueNAS ZFS snapshots and replication

TrueNAS timezone: Africa/Casablanca.

- Snapshot task 10: recursive Bolt/configs at 10:00, 12:00, 17:00,
  21:00 daily; lifetime 2 days.
- Snapshot task 14: recursive Bolt/configs at 05:30 daily;
  lifetime 2 weeks; replica-%Y%m%d-%H%M naming pattern.
- Snapshot task 17: recursive Tank/media at 14:00 daily;
  lifetime 1 week.
- Replication task 11: Bolt/configs to Tank/configs, local PUSH,
  daily 11:00.
- Replication task 16: Youssef_to_********, Bolt/configs to
  vault/Youssef_Backups over SSH, daily 16:00.
  Independent schedule now configured; snapshot task 14 remains
  unchanged. Matching replica snapshots preserved, destination
  custom retention 1 week. First scheduled 16:00 execution
  remains to be validated.
- TrueNAS cloudsync query returned no configured tasks.

### Cold-Backups USB datastore

Local PBS Cold-Backups datastore: no scheduled GC; last manual
GC on November 3 succeeded, with zero pending bytes.
Verify job exists but has no schedule. Cold-backup hooks are
present on both PVE and NAS. Established cold workflow also
covers recovery configuration bundles for Proxmox/PBS, TrueNAS,
ASUS router and context; those additional bundle operations
remain documented in the earlier cold-backup section.

### Quiet hours and outstanding validation

Desired quiet hours for resource-intensive local work:
22:00–09:00 Casablanca. Bolt NVMe snapshot at 05:30 intentionally
remains unchanged; heavier ******** replication was moved to 16:00.
Local backups and PBS maintenance were moved or retained in
daytime windows. Provider-managed operations are not locally
controllable. Scheduling alone cannot guarantee that slow jobs
will finish before quiet hours.

Pending: verify first complete cycles of all revised PVE jobs,
especially RemoteBackups VM110; verify independent 16:00 TrueNAS
replication, host backup/sync chain, weekly PBS verification,
capacity headroom and actual backup-to-restore recovery.
Existing completed recovery milestones remain completed.

<!-- yb-change:hermes-observer-scope-20261106 -->

## Hermes observer scope expansion — deployed November 5, verified November 6, 2026 (UTC)

This section supersedes earlier eight-/fourteen-tool catalog counts and text-only Gemini observer limitations where they conflict. It records only the November 5–6 observer/discovery work; other project milestones retain their existing history.

### Deployed read-only coverage
- The shared Copilot/Gemini observer catalog now contains 17 approved tools. Added fixed canonical-context lookup, bounded Home Assistant discovery and expanded operational diagnostics. Copilot ACP remains primary; no quota/error failover was enabled.
- The context reader exposes dated excerpts, source timestamp and SHA-256 from the fixed canonical file on Docker-Infra. Queries and pagination cannot select another file or URL. Reference context is not evidence of current infrastructure health.
- Home Assistant discovery covers safe entity states/attributes, device/entity/integration registries, automations and sanitized definitions, retained execution traces, bounded history/activity/hourly statistics, scripts/scenes/helpers, areas/floors/labels, relationships and health metadata. Health includes unavailable entities, repair issues, structured log metadata, core/Supervisor health and HA backup metadata. Exact entity IDs or unique friendly names resolve mechanically; ambiguous names return candidates. History windows are bounded to 1–168 hours. Credentials, integration options, trace variables, service parameters and live debugger controls are excluded.
- Expanded backup evidence covers configured PVE jobs/recent tasks, observed PBS copies and latest verification metadata, sync/verify/prune policies and permitted GC observations, TrueNAS snapshots/replication and Infra/Apps backup schedule/artifact metadata. A schedule, timestamp or existing artifact alone does not establish successful backup completion or recoverability.
- Storage evidence covers PVE/NAS disks and SMART, ZFS capacity/status/scrubs, mounts/replication and existing TrueNAS projections. Disk counter deltas require an earlier observation of the same disk identity.
- Application evidence covers Infra/Apps Docker state, health, image references, restart observations, capacity and bounded classified error signals. No container environment, docker exec or raw log access is exposed; restart rates need an actual comparison baseline.
- Network evidence combines fixed-source TCP observations and Kuma heartbeats with PVE/CT113 AdGuard DNS responses, Tailscale metadata and validated HTTPS hostname certificate expiry/peer-address observations. Broker sandbox restrictions must not be mistaken for global service failure. DNS answers do not prove application availability; certificate observations do not establish edge-versus-origin provenance.
- Observer self-health covers fixed gateway/broker/proxy/Gemini service state, accessible integrity bindings and scheduled source-check receipts. A five-minute local health timer checks integrity and real context/HA reads; it records results without model calls, repairs/restarts or outgoing alerts.

### Verification and source records
- Deployment identity: hermes-coverage-20261105-55acf4471e46. Transactional deployment and reconciliation receipts/backups remain protected on Docker-Infra, Docker-Apps, PVE and VM109. Source/runbook: docs/hermes-observer/discovery/ in Joe123-B/yb-homelab-viz, branch project-hub-v2.
- November 5 final acceptance recorded 40 focused tests (25 expansion boundary checks and 15 reader regressions) and successful native Copilot and Gemini investigations. Both providers fetched source evidence and generated final reports. Native acceptance uses the gateway identity/environment and sends no Telegram messages.
- November 6 revalidation: all 40 tests passed; composite installed-file verification passed across all four deployment targets with no drift. A fresh Copilot investigation discovered 17 tools, called HA discovery, observer diagnostics and canonical context once each, received successful source results and produced a final answer in approximately 62 seconds under the unchanged two-response limit. Gateway integrity checked 30 files with no mismatches; the service was active/running with zero restarts at that observation.
- Fresh November 6 network/observer requests returned HTTP 200 with successful PVE/Infra source results. Both AdGuard DNS probes passed, CT113 reported Tailscale Running and all three fixed hostname certificate checks succeeded. These are point-in-time observations.
- Source commits 6779a64 and be253ca were pushed normally on November 6. The repository was clean and synchronized with origin/project-hub-v2 (zero divergence). No restart or additional permission change was needed during November 6 verification.

### Remaining acceptance and limitations
- A fresh owner Telegram request exercising the expanded catalog remains unverified. Earlier Telegram acceptance of Hermes does not establish this new scope's user-to-bot round trip.
- Two false Copilot tool-unavailable replies remain preserved in the November 5 test record despite the tools reaching the provider. Subsequent native acceptance passed, including November 6; this does not prove universal model reliability. No automatic retries or quota changes were introduced.
- RemoteBackups GC access remains denied; inaccessible private/provider data stays unknown. Backup restore testing and complete service health are not established by these observer checks.
- Existing owner-only access, restricted readers, credential isolation, integrity checks and human review remain enforced. No arbitrary shell/API/file/URL access, HA/vehicle controls or autonomous remediation were added. This publication makes no Project Hub task changes.

<!-- yb-change:hermes-observer-audit-20261107 -->

## Hermes observer — integrity repair and remaining source audit (November 6–7, 2026 UTC)

This update supersedes conflicting November 5–6 statements about protected policy-file coverage, curtain workflow acceptance and pending automation-evidence repairs. Other historical records and safeguards remain.

### Deployed and verified November 6
- Automation discovery now resolves exact entity IDs and unique friendly names, preserves ambiguity, uses current request evidence instead of stale Telegram history, and returns sanitized retained trace/history evidence. Source fixes are committed through ad4c9ef. The owner's 14:14 UTC Telegram response correctly named Bedroom Curtains and reported the November 5 sunset service-call sequence; service calls do not prove physical motion. This validates that workflow, not all observer profiles.
- Fixed hash-only policy attestation was deployed as hermes-policy-attestation-20261106-9cbfa63c4c07, committed/pushed as ffa16da. Restricted broker verification at November 6 20:23 UTC passed gateway 30/30, diagnostics policy 33/33 and Gemini policy 21/21, with complete coverage and no mismatches/unreadable files. The fixed checker has no caller-controlled paths, no network access and no content output; protected file permissions and the broker's empty capability set remain unchanged. It refreshes a root-only result every 60 seconds; receipts older than 120 seconds, from a changed policy or with unsafe metadata cannot establish success. Ten integrity checks, 25 expansion tests and 12 root transaction tests passed; composite verification across Apps, Infra, PVE and VM109 found no drift. Rollback backups/journals were retained.
- Bedroom Curtains uses a 22-second timed position estimate, not measured percentage feedback. Command DP1 was removed from current/set position fields. Bedroom alone was disabled in LocalTuya at November 6 20:06 UTC for 24-hour observation; its HA controls and sunset close remain unavailable while disabled. Kids/******** configurations were preserved. Alexa/Tuya are independent possible command sources. No cause for the random short movements is proven; no automatic re-enable is scheduled.

### Read-only source audit November 7
- HA energy mapping at 00:12–00:13 UTC found the local Wall Connector integration in setup_retry because configured 192.168.68.39:80 could not be reached. sensor.tesla_charging depends on its voltage and phase-A-current sensors. Tesla Fleet is separately loaded with 94 registry entries (36 disabled); vehicle SOC/current/power readings were mostly unknown, while a separate Fleet energy-site power entity reported 0.0 kW. Loaded does not mean fresh vehicle telemetry; no vehicle wake/control was requested.
- Incoming-grid LocalTuya DP101 remains scaled 0.001 but configured kWh/energy despite its Active Power name; DP102 reports FORWARD. Unit and physical direction calibration remain pending. SolaX is loaded with read_pm false and battery support false; its exposed export-limit value of 0 W does not independently prove zero-export enforcement. Reconcile CHINT/SolaX, incoming-grid readings, configured inverter rating, circuit/phase limits, tariffs and departure requirements before shadow/control proposals. No HA configuration, statistics, charging or meter values were changed during this audit.
- Observer backup reads completed for PVE, Infra, Apps and TrueNAS snapshot/replication projections. PBS root groups/snapshots returned zero despite successful recent task evidence and namespace-specific policies: namespace coverage remains incomplete, not absent backups. RemoteBackups GC remains denied. Cold-Backups job is currently disabled. Current Docker-Apps is VM121 on NAS; Infra is VM122, both included in enabled guest backup jobs. Guest copies do not establish application-consistent database backups.
- Infra/Apps local projections mainly found OS backup metadata, without application completion/offsite receipts. Bounded /opt metadata inspection found rollback/config copies and a Paperless Redis dump, which do not establish full application recovery chains. Prioritize consistent database/export plus file coverage, completion, retention and destination receipts for Authentik/NPM/Kuma, Paperless, TeslaMate/Dawarich/Ghost and Trilium/Mealie/Spliit/Hub. Restore testing remains waived, not passed.
- Additional-source preflight: AdGuard web interfaces and router SSH TCP port were reachable; AdGuard primary CT114 service was active/running. GCP operator SSH alias was verified with tailscaled active and version 1.104.4. This is operator access, not a new Hermes reader. GCP needs a dedicated forced-command read-only transport; router identity/restricted access and Azure exact host/identity were not established from checked Infra SSH configurations. No new source credentials, permissions or reader endpoints were provisioned. Bounded AdGuard policy/service projections, GCP transport and router/Azure enrollment remain pending.

### Remaining observer work
- Validate energy source freshness/units/polarity and charger connectivity; physical calibration and electrical constraints still require owner evidence.
- Complete PBS namespace enumeration and application backup receipt/destination evidence without expanding arbitrary filesystem/API access.
- Implement/test bounded AdGuard projections and dedicated GCP transport; establish router/Azure access before enrolling those sources. Current operator admin credentials must not be delegated to Hermes.
- Broader historical comparisons and bounded full-page public research remain partial. OpenCode/Kaggle reliability work is separate and was not revalidated by this observer audit.
- Detailed reconciliation/runbook: docs/hermes-observer/discovery/SCOPE-RECONCILIATION-20261107.md. Private audit receipts remain on Docker-Infra, outside publication. This context-only scope preserves Project Hub tasks, phases, mappings and registry.

<!-- yb-change:hermes-opencode-quota-20261107 -->

## Hermes and OpenCode — model routing and quota visibility (2026-11-07)

- OpenCode on VM123 defaults to GPT-6 Luna via the ChatGPT subscription. The owner-only Telegram bot is restored. Groq GPT-OSS 120B is available by manual selection in Telegram and in the web model picker after enabling its visibility under Manage models. Telegram uses separate model histories in the same isolated workspace. The web agent is labeled Coding. OpenCode has no automatic provider fallback. Kaggle remains an optional route.
- Telegram smoke tests returned the expected response for both models. Both returned correct deduplication examples and reported passing three assertions. Execution of those assertions was not independently verified for the user runs. Broader ChatGPT coding continuity and unattended subscription renewal remain unverified.
- OpenCode Telegram /quota reports the selected model and the shared rolling-hour allowance of 10 prompt attempts with a remaining percentage. Both model selections showed 10/10 in user testing. Provider quota and reset are unknown. The Groq relay's separate 12-request service-lifetime cap is not shown by /quota. Recognized upstream quota errors are distinguished from rate limiting and ambiguous HTTP 429 responses.
- Hermes /quota reports GitHub Copilot ACP and Gemini CLI balances and reset times as unknown, as verified by the user in Telegram. The quota plugin passed the gateway startup integrity check after the exact changed file hashes were added to policy. Observer source coverage was unchanged by this work.
- Pending provider telemetry validation, in order: Groq rate-limit headers from an ordinary request, supported read-only ChatGPT/Codex subscription usage for the same account, supported Copilot usage data for the ACP account, and Gemini CLI quota evidence for the active login and model. Distinguish provider windows and balances from local counters. Show a percentage or reset only where the source provides enough data to calculate it, and mark unavailable values unknown. Do not deliberately exhaust provider quota to test alerts.

<!-- yb-change:regional-gateways-wifi-hub-20261126 -->

The Regional Gateways & Wifi project (Hub project 14) tracks the deployed regional Wi-Fi, gateway backup verification, and Regional Gateway Manager. The manager interface is planned as a dedicated tab on homelab.youssefbouanani.com. Its first stage is read-only gateway and exit visibility, followed by a one-device pilot for optional routing assignments.
