Alerts
+ +Elysian
+ +Internet
+Power
+Household
+Today, weather and the house arrive with Home Assistant.
+diff --git a/docs/architecture.md b/docs/architecture.md index dddf4509..9ff556c1 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -207,7 +207,7 @@ hole from the monitoring VLAN into the monitored one. | `phoenix` (10.0.30.70) | ๐ข 30 | *(none โ a toolchain host, no Docker)* | The deployment host, built 2026-09-20: a Proxmox API token, an SSH key and a checkout, so that the Packer, OpenTofu and Ansible work after [#436](https://github.com/Gerrrt/HomeLab/issues/436) has somewhere to run from. A guest on `Saruman`, placed by [ADR-0043](adr/0043-keep-the-ca-on-prometheus-and-build-phoenix-as-the-deployment-host.md), which also decides that the estate's CA key stays on `prometheus` and does not follow the toolchain here. It holds no age key and runs no continuous convergence (what it configures, it configures on demand, below); it is the WireGuard endpoint of [ADR-0042](adr/0042-terminate-the-remote-path-on-the-lab-and-route-it.md), built 2026-09-22 ([#442](https://github.com/Gerrrt/HomeLab/issues/442)); the one thing it is meant to reach that no other guest does is `8006` on `Saruman`, by a single host-firewall rule โ written 2026-09-20, when [#566](https://github.com/Gerrrt/HomeLab/issues/566) enabled the firewall the build had found disabled and narrowed the `local_network` alias that was admitting the whole segment underneath it. Its Alloy pushes to `alexander`, never to VLAN 99; the build is [`build-the-jumpbox.md`](runbooks/build-the-jumpbox.md). The first toolchain on it is [`packer/`](../packer/README.md), the lab's VM templates at VMIDs 901โ912, with 903โ909 for the dotfiles OS layers ([ADR-0090](adr/0090-test-the-dotfiles-os-layers-on-on-demand-saruman-guests.md)) ([ADR-0074](adr/0074-build-the-lab-templates-with-packer-from-phoenix.md), [`build-the-lab-templates.md`](runbooks/build-the-lab-templates.md)). The second is [`ansible/`](../ansible/README.md), which configures ADR-0029's six over SSH and touches nothing else ([ADR-0077](adr/0077-configure-the-lab-domain-with-ansible-from-phoenix.md), [#448](https://github.com/Gerrrt/HomeLab/issues/448)). Its own way in is decided by [ADR-0117](adr/0117-give-phoenix-a-key-only-sshd-and-a-default-deny-inbound-policy.md): `sshd` takes keys only, and `ufw` admits `22` from Hicks and the tunnel's peers, the tunnel's port, and `8800` from VLAN 30 for the length of a Debian or Kali template build. Applying it on the host is [#1496](https://github.com/Gerrrt/HomeLab/issues/1496). Alloy agent (native package, `scripts/deploy-agent.sh`) | | `golem` (10.0.30.80) | ๐ข 30 | *(none โ an appliance, no Docker)* | Proxmox Backup Server 4.2, built 2026-10-03 by [`build-the-backup-guest.md`](runbooks/build-the-backup-guest.md) ([#485](https://github.com/Gerrrt/HomeLab/issues/485)): the lab's backups, placed by [ADR-0053](adr/0053-run-pbs-on-saruman-with-its-datastore-on-smaug-over-nfs.md). A guest on `Saruman`, VMID 180, whose only datastore, `erebor`, is `smaug`'s `erebor/pbs` over NFSv4 through one `2049` pass, with `atime` on because garbage collection depends on it, and the mountpoint made immutable so an unmounted share cannot fill the OS disk. Every backup is encrypted on `Saruman` before it leaves, with a key made on `Saruman` and copied, on 2026-10-03, into `secrets/lab.sops.yaml` and onto paper (the runbook's ยง7), so a lost `Saruman` does not take the backups' readability with it; `Saruman` writes through a token that can back up and cannot prune. PBS prunes (7 daily, 4 weekly, 3 monthly), collects garbage on Saturdays and verifies on Sundays; TrueNAS keeps fourteen daily snapshots of the dataset as the copy PBS cannot prune. The nightly job takes `odin`, `garuda` and the domain's six, the guests tagged `backup`; `alexander`, `phoenix`, `fenrir` and `golem` itself are rebuilt from this repository and stay out, and so does `eden`, whose graph is one collection run from rebuilt (the runbook's ยง8). `scripts/collect-pbs-task-state.py` publishes every job's last outcome and the snapshots' verify state hourly, and seven rules in `stacks/lab` read them; the first nightly run, 2026-10-03, was verified the next morning. Its Alloy pushes to `alexander`, never to VLAN 99, since 2026-10-03. Alloy agent (native package, `scripts/deploy-agent.sh`) | | `oracle` (10.0.99.30) | ๐ด 99 | [`stacks/wiki`](../stacks/wiki) | The Lemmiwinks wiki and its Postgres, since 2025-11-12 ([ADR-0011](adr/0011-keep-the-wiki-internal.md)), hand-run containers until [#251](https://github.com/Gerrrt/HomeLab/issues/251) wrote them down as a stack deployed by hand from `main`, like `smaug`'s. **Cut over 2026-10-07** ([#847](https://github.com/Gerrrt/HomeLab/issues/847), [ADR-0082](adr/0082-serve-the-wiki-over-tls-and-deploy-it-from-a-verified-checkout.md)): deployed by hand from a checkout whose signature is verified first, and served over https from a Caddy on a leaf from the estate's CA, with port 80 only redirecting ([`stacks/wiki/README.md`](../stacks/wiki/README.md#tls)); its database is pulled to `prometheus` nightly as a `pg_dump` (`make backup-wiki`, [ADR-0065](adr/0065-pull-the-wikis-database-to-prometheus-as-a-dump.md)); Alloy agent (Docker, `scripts/deploy-agent.sh`); the off-host copies of the firewall export (`make backup-firewall`), of the weekly volume sets (`make backup`, [#535](https://github.com/Gerrrt/HomeLab/issues/535)) of the media tier's state pulled off `smaug` (`make backup-nas`, [ADR-0045](adr/0045-pull-jellyfins-state-from-a-snapshot-over-ssh.md)), and of `trinity`'s nightly sensitive-tier volume sets and Immich's library ([ADR-0064](adr/0064-copy-immichs-library-to-oracle-until-the-off-estate-copy-exists.md)). The estate's host for small off-host jobs โ [ADR-0015](adr/0015-give-oracle-the-off-host-jobs.md) | -| `trinity` (10.0.99.40) | ๐ด 99 | [`stacks/sensitive`](../stacks/sensitive) | ADR-0008's sensitive tier on the ProDesk 600 G4 of [ADR-0034](adr/0034-run-the-sensitive-tier-on-the-prodesk-and-make-it-the-spare-hardware.md). **Built and deployed 2026-09-28** ([#404](https://github.com/Gerrrt/HomeLab/issues/404), [`build-the-sensitive-tier-host.md`](runbooks/build-the-sensitive-tier-host.md)): Ubuntu 26.04 with both disks LUKS-encrypted and the root unlocked by the TPM ([ADR-0054](adr/0054-encrypt-trinitys-disks-and-seal-the-root-key-to-the-tpm.md)), all twelve containers healthy, and since that day AdGuard is the one forwarder behind `morpheus`'s resolver ([ADR-0055](adr/0055-forward-to-adguard-alone.md)). Holding real data since 2026-09-28, Immich's first 615 photographs, which passed the #404 step 10 gate while most of it was open. The library is copied nightly to `oracle`, off-host and not off-estate, until [#455](https://github.com/Gerrrt/HomeLab/issues/455) ([ADR-0064](adr/0064-copy-immichs-library-to-oracle-until-the-off-estate-copy-exists.md)). The stack: Caddy as the published HTTPS port and step-ca issuing beneath the tier's own root rather than the estate's, which is left untouched ([#129](https://github.com/Gerrrt/HomeLab/issues/129), [#130](https://github.com/Gerrrt/HomeLab/issues/130), [ADR-0037](adr/0037-give-the-sensitive-tier-its-own-root-and-issue-beneath-it-over-acme.md)), with AdGuard Home behind Caddy and publishing 53 to the firewall's forwarder alone ([#135](https://github.com/Gerrrt/HomeLab/issues/135), [ADR-0010](adr/0010-keep-the-resolver-on-the-gateway.md)); Home Assistant ([#134](https://github.com/Gerrrt/HomeLab/issues/134)), Immich โ four containers behind Caddy with a memory limit on each ([#132](https://github.com/Gerrrt/HomeLab/issues/132)) โ Paperless-ngx with a Postgres and a Valkey of its own ([#133](https://github.com/Gerrrt/HomeLab/issues/133)) and Vaultwarden ([#131](https://github.com/Gerrrt/HomeLab/issues/131)) run beside them, with the household's page of links to them at `home.matrix.elysium` and its live numbers on read-only tokens ([#137](https://github.com/Gerrrt/HomeLab/issues/137)) โ Homepage until [ADR-0103](adr/0103-retire-homepage-and-serve-the-household-page-from-glance.md) made it a page of Glance's. ntfy ([#136](https://github.com/Gerrrt/HomeLab/issues/136)) is the in-house receiver for Alertmanager's three real channels, **deployed and cut over 2026-09-29** by [`verify-the-alert-path.md`](runbooks/verify-the-alert-path.md#cutting-over-to-the-in-house-ntfy), with `urgent` and `security` also sent to ntfy.sh for a phone away from home. Miniflux, a feed reader with a Postgres of its own, is the tier's first service beyond ADR-0008's nine, **deployed 2026-09-29** ([#147](https://github.com/Gerrrt/HomeLab/issues/147), [ADR-0057](adr/0057-add-miniflux-to-the-sensitive-tier-with-its-fetcher-kept-off-winterfell.md)): the one container here that reaches outward on a timer, with its fetcher refused every private address. Memos, the household's notes, is the second, decided by [ADR-0059](adr/0059-add-memos-to-the-sensitive-tier-for-notes-and-keep-documentation-in-docs.md) ([#145](https://github.com/Gerrrt/HomeLab/issues/145)) and deployed behind Caddy the same day, all sixteen containers healthy after that `make up`. Miniflux holds no real data; Memos holds the household's first real notes since 2026-10-22, ahead of ADR-0023's off-estate copy by the operator's accepted exception, with the nightly volume set on `oracle` its only copy off the host, since the household copy under [#455](https://github.com/Gerrrt/HomeLab/issues/455) does not carry `memos-data` yet. Mealie, the household's recipes at `recipes.matrix.elysium`, is the third, **deployed 2026-09-29** ([#146](https://github.com/Gerrrt/HomeLab/issues/146), [ADR-0060](adr/0060-add-mealie-to-the-sensitive-tier-as-recipes.md)), behind the same Caddy with no new rule, its URL import refused every private address. linkding, a bookmark manager, is the fourth, **deployed 2026-09-29** ([#144](https://github.com/Gerrrt/HomeLab/issues/144), [ADR-0061](adr/0061-add-linkding-to-the-sensitive-tier-behind-one-factor.md)). Actual ([#142](https://github.com/Gerrrt/HomeLab/issues/142)), the household's budget, is the fifth beyond ADR-0008's nine, **deployed 2026-09-29** ([ADR-0062](adr/0062-add-actual-to-the-sensitive-tier.md)), claimed from SOPS before its first start. It holds no real budget before #404 step 10. Stirling-PDF, the household's PDF editor at `pdf.matrix.elysium`, is the sixth, **deployed 2026-09-29** ([#143](https://github.com/Gerrrt/HomeLab/issues/143), [ADR-0063](adr/0063-add-stirling-pdf-to-the-sensitive-tier-and-keep-its-documents-in-memory.md)): its documents live on a tmpfs and never reach a disk. Glance, the operator's browser start page at `start.matrix.elysium`, is **deployed 2026-10-21** ([#1223](https://github.com/Gerrrt/HomeLab/issues/1223), [ADR-0098](adr/0098-add-glance-as-the-operators-start-page-beside-homepage.md)): the estate's alerts, probes and targets read from `prometheus` with the reader token, and feeds read from a Miniflux user of its own. Since [ADR-0100](adr/0100-grow-glance-into-a-homelab-page-and-keep-the-operators-lists-in-sops.md) it has a page per subject โ Home, Read, Watch, Sports & Markets, Homelab, Network & Storage and Maintenance โ the estate's read from `prometheus`, and the operator's own lists come from SOPS. It also serves the household's page at `home.matrix.elysium` ([ADR-0103](adr/0103-retire-homepage-and-serve-the-household-page-from-glance.md)), which took over from Homepage. Mosquitto and ring-mqtt bring the Ring Alarm into Home Assistant, the broker on an internal network that only those two join, **deployed 2026-10-22** ([ADR-0104](adr/0104-bring-the-ring-alarm-into-home-assistant-through-ring-mqtt.md)). Alloy agent (Docker, `scripts/deploy-agent.sh`), pushing to `prometheus` like `oracle`'s | +| `trinity` (10.0.99.40) | ๐ด 99 | [`stacks/sensitive`](../stacks/sensitive) | ADR-0008's sensitive tier on the ProDesk 600 G4 of [ADR-0034](adr/0034-run-the-sensitive-tier-on-the-prodesk-and-make-it-the-spare-hardware.md). **Built and deployed 2026-09-28** ([#404](https://github.com/Gerrrt/HomeLab/issues/404), [`build-the-sensitive-tier-host.md`](runbooks/build-the-sensitive-tier-host.md)): Ubuntu 26.04 with both disks LUKS-encrypted and the root unlocked by the TPM ([ADR-0054](adr/0054-encrypt-trinitys-disks-and-seal-the-root-key-to-the-tpm.md)), all twelve containers healthy, and since that day AdGuard is the one forwarder behind `morpheus`'s resolver ([ADR-0055](adr/0055-forward-to-adguard-alone.md)). Holding real data since 2026-09-28, Immich's first 615 photographs, which passed the #404 step 10 gate while most of it was open. The library is copied nightly to `oracle`, off-host and not off-estate, until [#455](https://github.com/Gerrrt/HomeLab/issues/455) ([ADR-0064](adr/0064-copy-immichs-library-to-oracle-until-the-off-estate-copy-exists.md)). The stack: Caddy as the published HTTPS port and step-ca issuing beneath the tier's own root rather than the estate's, which is left untouched ([#129](https://github.com/Gerrrt/HomeLab/issues/129), [#130](https://github.com/Gerrrt/HomeLab/issues/130), [ADR-0037](adr/0037-give-the-sensitive-tier-its-own-root-and-issue-beneath-it-over-acme.md)), with AdGuard Home behind Caddy and publishing 53 to the firewall's forwarder alone ([#135](https://github.com/Gerrrt/HomeLab/issues/135), [ADR-0010](adr/0010-keep-the-resolver-on-the-gateway.md)); Home Assistant ([#134](https://github.com/Gerrrt/HomeLab/issues/134)), Immich โ four containers behind Caddy with a memory limit on each ([#132](https://github.com/Gerrrt/HomeLab/issues/132)) โ Paperless-ngx with a Postgres and a Valkey of its own ([#133](https://github.com/Gerrrt/HomeLab/issues/133)) and Vaultwarden ([#131](https://github.com/Gerrrt/HomeLab/issues/131)) run beside them, with the household's page of links to them at `home.matrix.elysium` and its live numbers on read-only tokens ([#137](https://github.com/Gerrrt/HomeLab/issues/137)) โ Homepage until [ADR-0103](adr/0103-retire-homepage-and-serve-the-household-page-from-glance.md) made it a page of Glance's. ntfy ([#136](https://github.com/Gerrrt/HomeLab/issues/136)) is the in-house receiver for Alertmanager's three real channels, **deployed and cut over 2026-09-29** by [`verify-the-alert-path.md`](runbooks/verify-the-alert-path.md#cutting-over-to-the-in-house-ntfy), with `urgent` and `security` also sent to ntfy.sh for a phone away from home. Miniflux, a feed reader with a Postgres of its own, is the tier's first service beyond ADR-0008's nine, **deployed 2026-09-29** ([#147](https://github.com/Gerrrt/HomeLab/issues/147), [ADR-0057](adr/0057-add-miniflux-to-the-sensitive-tier-with-its-fetcher-kept-off-winterfell.md)): the one container here that reaches outward on a timer, with its fetcher refused every private address. Memos, the household's notes, is the second, decided by [ADR-0059](adr/0059-add-memos-to-the-sensitive-tier-for-notes-and-keep-documentation-in-docs.md) ([#145](https://github.com/Gerrrt/HomeLab/issues/145)) and deployed behind Caddy the same day, all sixteen containers healthy after that `make up`. Miniflux holds no real data; Memos holds the household's first real notes since 2026-10-22, ahead of ADR-0023's off-estate copy by the operator's accepted exception, with the nightly volume set on `oracle` its only copy off the host, since the household copy under [#455](https://github.com/Gerrrt/HomeLab/issues/455) does not carry `memos-data` yet. Mealie, the household's recipes at `recipes.matrix.elysium`, is the third, **deployed 2026-09-29** ([#146](https://github.com/Gerrrt/HomeLab/issues/146), [ADR-0060](adr/0060-add-mealie-to-the-sensitive-tier-as-recipes.md)), behind the same Caddy with no new rule, its URL import refused every private address. linkding, a bookmark manager, is the fourth, **deployed 2026-09-29** ([#144](https://github.com/Gerrrt/HomeLab/issues/144), [ADR-0061](adr/0061-add-linkding-to-the-sensitive-tier-behind-one-factor.md)). Actual ([#142](https://github.com/Gerrrt/HomeLab/issues/142)), the household's budget, is the fifth beyond ADR-0008's nine, **deployed 2026-09-29** ([ADR-0062](adr/0062-add-actual-to-the-sensitive-tier.md)), claimed from SOPS before its first start. It holds no real budget before #404 step 10. Stirling-PDF, the household's PDF editor at `pdf.matrix.elysium`, is the sixth, **deployed 2026-09-29** ([#143](https://github.com/Gerrrt/HomeLab/issues/143), [ADR-0063](adr/0063-add-stirling-pdf-to-the-sensitive-tier-and-keep-its-documents-in-memory.md)): its documents live on a tmpfs and never reach a disk. Glance, the operator's browser start page at `start.matrix.elysium`, is **deployed 2026-10-21** ([#1223](https://github.com/Gerrrt/HomeLab/issues/1223), [ADR-0098](adr/0098-add-glance-as-the-operators-start-page-beside-homepage.md)): the estate's alerts, probes and targets read from `prometheus` with the reader token, and feeds read from a Miniflux user of its own. Since [ADR-0100](adr/0100-grow-glance-into-a-homelab-page-and-keep-the-operators-lists-in-sops.md) it has a page per subject โ Home, Read, Watch, Sports & Markets, Homelab, Network & Storage and Maintenance โ the estate's read from `prometheus`, and the operator's own lists come from SOPS. It also serves the household's page at `home.matrix.elysium` ([ADR-0103](adr/0103-retire-homepage-and-serve-the-household-page-from-glance.md)), which took over from Homepage. The office wall page, static files under `wall/` that Caddy serves at `wall.matrix.elysium` with eight fixed Prometheus questions behind it, is in the stack since 2026-11-17 for `heimdall`'s kiosk ([ADR-0119](adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md)); the name answers once `morpheus` has its host override. Mosquitto and ring-mqtt bring the Ring Alarm into Home Assistant, the broker on an internal network that only those two join, **deployed 2026-10-22** ([ADR-0104](adr/0104-bring-the-ring-alarm-into-home-assistant-through-ring-mqtt.md)). Alloy agent (Docker, `scripts/deploy-agent.sh`), pushing to `prometheus` like `oracle`'s | | `smaug` (10.0.40.30) | ๐ก 40 | [`stacks/media`](../stacks/media) | [ADR-0008](adr/0008-place-services-by-data-trust.md)'s media tier on the ThinkServer TS150 of [#413](https://github.com/Gerrrt/HomeLab/issues/413), placed and addressed by [ADR-0016](adr/0016-open-casabonita-inward-and-keep-it-terminal-outward.md) and running TrueNAS rather than Ubuntu Server by [ADR-0040](adr/0040-run-truenas-on-smaug-and-keep-the-media-stack-in-this-repository.md). **Built, pooled and deployed**: TrueNAS on its boot SSD, the static above since 2026-09-16, its inbound rules verified in position (four that day; [`network.md`](network.md#casabonita--vlan-40--media) counts them now), the mirror `erebor` since 2026-09-18 and this stack running on it since 2026-09-19 โ from a copy of the compose file on the pool, brought up with `docker compose` under TrueNAS's own Docker ([`build-the-nas.md`](runbooks/build-the-nas.md) ยง6). Jellyfin, publishing 8096 to the segment because the televisions reach it natively and no firewall rule is involved at all ([#138](https://github.com/Gerrrt/HomeLab/issues/138)); and Audiobookshelf on 13378, **deployed 2026-09-29**, whose clients are phones on Hicks and which therefore brought a fifth inbound rule by ADR-0050's count, the seventh to exist ([#140](https://github.com/Gerrrt/HomeLab/issues/140), [ADR-0050](adr/0050-add-audiobookshelf-to-the-media-tier-behind-a-fifth-hicks-pass.md)). And Navidrome on 4533 for music, **deployed 2026-09-30** on the same terms, whose Hicks pass was created 2026-09-22, ahead of the service and of Audiobookshelf's ([#141](https://github.com/Gerrrt/HomeLab/issues/141)). The `media` share gets a Hicks pass on `445` for workstations, used by a second SMB user, `samwise`, so the televisions' `bilbo` stays theirs; it was **created on 2026-09-23** ([#523](https://github.com/Gerrrt/HomeLab/issues/523), [ADR-0051](adr/0051-let-hicks-workstations-mount-the-media-share-as-a-user-of-their-own.md)). Scraped by `prometheus` on `9100`; it pushes nothing, and runs no Alloy โ the estate's first scraped host, and the reason [#256](https://github.com/Gerrrt/HomeLab/issues/256) was more than a line of YAML. That issue settled the fork TrueNAS opened in it: `node_exporter`, as a digest-pinned container in this stack rather than TrueNAS's own endpoint, so the existing `99 โ 40:9100` pass, the `host-overview` dashboard and seven rules in `host.rules.yaml` all keep working unchanged. MakeMKV, the disc ripper, is in the file behind the compose profile `rip` and is **not yet deployed**: it reads this host's DVD-RW and writes only into `erebor/media/rips`, runs only while someone is ripping, and is reached from Hicks on `5800` through a pass ยง6.11 creates ([ADR-0114](adr/0114-rip-discs-on-smaug-with-makemkv-started-only-to-rip.md)). The `node` job and `prometheus/targets/node.yaml` are live, and the target with them since 2026-09-19, once the exporter answered from the pool. SMART reaches the same scrape by [ADR-0047](adr/0047-collect-smaug-smart-through-a-root-cron-and-the-textfile-collector.md): a root cron job in TrueNAS's UI runs the estate's collector and the exporter serves the file โ still no agent, still nothing initiating from 40 โ and patch state is deliberately not collected on an appliance ([#483](https://github.com/Gerrrt/HomeLab/issues/483)) | | `bahamut` (10.0.30.50) | ๐ข 30 | *(none โ Windows)* | Windows Server 2025 domain controller, PDC emulator and DNS for `ad.matrix.elysium` โ Tier 0. Static, because every member finds a DC through DNS and the DCs *are* the DNS. Built by hand 2026-09-24 to 2026-09-25 ([#414](https://github.com/Gerrrt/HomeLab/issues/414)) and promoted for `ad.matrix.elysium`. Scraped by `alexander` on `9182`; it pushes nothing, and runs no Alloy ([ADR-0029](adr/0029-size-the-lab-domain-and-separate-its-namespace-and-clock.md)) | | `leviathan` (10.0.30.51) | ๐ข 30 | *(none โ Windows)* | Windows Server 2025 second domain controller and DNS โ Tier 0. Static, for the same reason. Built by hand 2026-09-24 to 2026-09-25 ([#414](https://github.com/Gerrrt/HomeLab/issues/414)) and promoted for `ad.matrix.elysium`. Scraped by `alexander` on `9182`; it pushes nothing, and runs no Alloy ([ADR-0029](adr/0029-size-the-lab-domain-and-separate-its-namespace-and-clock.md)) | diff --git a/docs/changelog.md b/docs/changelog.md index 3a833362..447d3952 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,24 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-17 +- **The office wall page is in the sensitive stack** + ([ADR-0119](adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md)). + `stacks/sensitive/wall/` holds static HTML, CSS and JS in the Tokyo Night + look of the operator's mockup, trimmed from about 18 cards to six panels + and sized for the office television at seven feet. + - **Behind it:** Caddy serves the page at `wall.matrix.elysium` and answers + eight fixed Prometheus questions with the reader token added + server-side. The page picks a name, never a query, and only GET and HEAD + pass. That was checked against the pinned Caddy and a stand-in upstream: + `?query=up` ignored, POST 405 before upstream, `/api/v1/query` 404. + - **When it does not know, it says so:** with Prometheus unreachable or + Watchdog silent it shows that in red instead of "All quiet", and each + source's age is in the status bar. + - **The household half** (calendar, weather, the house) comes through Home + Assistant in a later change. + - **Not live yet:** the name needs a host override on `morpheus`, and the + blackbox probe is committed commented out until it answers. + - **`heimdall`, the office wall dashboard, is on Hicks at `10.0.50.15`** ([ADR-0119](adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md), [`build-heimdall.md`](runbooks/build-heimdall.md)). A Raspberry Pi 5 drives diff --git a/docs/runbooks/build-heimdall.md b/docs/runbooks/build-heimdall.md index f20e56ca..67b7e093 100644 --- a/docs/runbooks/build-heimdall.md +++ b/docs/runbooks/build-heimdall.md @@ -152,8 +152,10 @@ sudo raspi-config nonint do_blanking 1 sudo reboot ``` -The page is Glance's Homelab page until the wall page exists. When it does, -this line's URL is the only change. `--password-store=basic` stops Chromium +The page is the wall page, `https://wall.matrix.elysium/`, once `morpheus` +has its host override (`stacks/sensitive/README.md`, *The wall page*). Until +then the line above shows Glance's Homelab page. Moving between them is this +line's URL and a reboot, nothing else. `--password-store=basic` stops Chromium asking for a keyring at boot, which would otherwise sit on the screen. Blanking off keeps the desktop from turning the screen off. ยง8 turns the television off instead. diff --git a/docs/security.md b/docs/security.md index 9ef2d705..9e0baee1 100644 --- a/docs/security.md +++ b/docs/security.md @@ -1131,6 +1131,17 @@ from Home Assistant with *not enough permissions*. that difference is accepted. It holds two credentials: the reader token, which can only query, and a Fever key that can only mark items read for a Miniflux user that follows public feeds. +- **The wall page answers eight fixed questions** + ([ADR-0119](adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md)): + `wall.matrix.elysium` on `trinity`'s Caddy. Each `/api/q/NAME` is one PromQL + query written in the Caddyfile, sent with the reader token, which Caddy + adds. The caller picks a name, never a query, and its own query string is + discarded. Only GET and HEAD are served, because Prometheus would take a + POST body's `query=` over the URL's. Like Glance it has no login, so + anything that reaches `trinity:443` can read those eight answers: the + firing alerts, per-host CPU, SNMP reachability, WAN traffic and latency, + the UPS and `heimdall`'s temperature. That is less than the Homelab page + already shows, and the page and the Pi hold no credential. - `snmp-exporter` is never published to a host interface โ it is reachable only on the compose network. - Alertmanager binds to `127.0.0.1` only. It is unauthenticated, and a silence diff --git a/scripts/check_caddyfile.sh b/scripts/check_caddyfile.sh index 9baeb20c..373b391f 100755 --- a/scripts/check_caddyfile.sh +++ b/scripts/check_caddyfile.sh @@ -83,7 +83,8 @@ for stack in "${STACKS[@]}"; do # a Caddyfile that loads its leaf from files rather than over ACME โ the # wiki's (#847) and the ingest proxy's (#764) โ since `caddy validate` loads # them and fails on a missing one. It proves the paths and the syntax, not - # the leaf. + # the leaf. It is offered as /etc/caddy/tls/ingest-ca.pem too, the trust pool + # of the sensitive tier's one off-host upstream (the wall page, ADR-0119). openssl req -x509 -newkey rsa:2048 -nodes -days 1 \ -subj '/CN=caddyfile-validation' \ -keyout "${work}/key.pem" -out "${work}/ca.pem" >/dev/null 2>&1 @@ -111,6 +112,7 @@ for stack in "${STACKS[@]}"; do --env-file "${work}/env" \ -v "${work}/Caddyfile:/etc/caddy/Caddyfile:ro" \ -v "${work}/ca.pem:/etc/caddy/tls/ca.pem:ro" \ + -v "${work}/ca.pem:/etc/caddy/tls/ingest-ca.pem:ro" \ -v "${work}/ca.pem:/etc/caddy/tls/cert.pem:ro" \ -v "${work}/key.pem:/etc/caddy/tls/key.pem:ro" \ "${image}") diff --git a/stacks/observability/prometheus/targets/blackbox.yaml b/stacks/observability/prometheus/targets/blackbox.yaml index db62e185..e88b6f54 100644 --- a/stacks/observability/prometheus/targets/blackbox.yaml +++ b/stacks/observability/prometheus/targets/blackbox.yaml @@ -292,6 +292,21 @@ renewal: acme tier: household +# The office wall page (ADR-0119), static files Caddy serves itself, so a +# 200 on `/` proves the site, its certificate and Caddy. COMMENTED OUT until +# morpheus has the `wall` host override (stacks/sensitive/README.md, "The +# wall page", step 5): before that the name does not resolve, and SiteDown +# would fire for a page nobody has been told about yet. +# - targets: ["https://wall.matrix.elysium/"] +# labels: +# module: http_2xx_tier_ca +# name: wall +# role: wall-dashboard +# host: trinity +# via: dns +# renewal: acme +# tier: household + # `/health` answers `{"status":"UP"}` without a session. - targets: ["https://actual.matrix.elysium/health"] labels: diff --git a/stacks/sensitive/Caddyfile b/stacks/sensitive/Caddyfile index 6da53d25..801a7732 100644 --- a/stacks/sensitive/Caddyfile +++ b/stacks/sensitive/Caddyfile @@ -264,6 +264,132 @@ start.matrix.elysium { } } +# The office wall dashboard (ADR-0119): a static page and the Prometheus +# answers it shows, served to `heimdall`'s kiosk and to anything else on a +# segment that reaches 443 here. Two halves, one rule between them: +# +# / the page, from stacks/sensitive/wall/, mounted read-only. +# /api/q/NAME a FIXED question. Each handle below rewrites to one PromQL +# query written in this file, and the reader token is added +# here, server-side. The browser chooses which question, never +# the query: the client's own query string is replaced by the +# rewrite, so /api/q/cpu?query=anything still asks the CPU +# question. Nothing else under /api/ answers. The reader token +# can query and nothing more (ADR-0067); this narrows it again, +# to eight answers. The page holds no credential, and neither +# does the Pi. +# +# The token is the one Glance already holds, GLANCE_PROMETHEUS_TOKEN, given +# to the caddy service in compose.yaml. It is the estate's READER, which +# Glance and Home Assistant already share, so rotating it is still the three +# edits secrets/sensitive.example.yaml lists. The upstream is the ingest proxy +# on `prometheus`, whose leaf the estate CA issued, so that CA is trusted for +# this one transport: the committed stacks/observability/alloy/ingest-ca.pem, +# mounted read-only, the same file render-trust-bundles.sh feeds Glance. +# +# Read-only by method as well: anything but GET or HEAD is refused before a +# handle runs. The CSP lets the page load only itself and fetch only itself, +# so a change to the page that reached for a CDN or a third-party API would +# fail in the browser rather than quietly leak a request. +(wall_prometheus) { + reverse_proxy https://10.0.99.20:9090 { + header_up Authorization "Bearer {$GLANCE_PROMETHEUS_TOKEN}" + header_up -Cookie + header_down -Set-Cookie + transport http { + tls_trust_pool file /etc/caddy/tls/ingest-ca.pem + } + } +} + +wall.matrix.elysium { + header { + Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self'; connect-src 'self'; img-src 'self'; font-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'" + X-Content-Type-Options nosniff + Referrer-Policy no-referrer + -Server + } + + # `route` keeps the order written: the method gate must run before any + # handle, and Caddy would otherwise sort `respond` after `handle`. It + # matters because Prometheus reads a POST body's `query=` ahead of the + # URL's, so a POST through a rewrite could still ask its own question. + route { + @unsafe not method GET HEAD + respond @unsafe 405 + + # Every firing alert, Watchdog included: its absence means rule evaluation has stopped. + # ALERTS{alertstate="firing"} + handle /api/q/alerts { + rewrite * /api/v1/query?query=ALERTS%7Balertstate%3D%22firing%22%7D + import wall_prometheus + } + + # CPU busy per node_exporter host; a host that stops reporting drops out. + # 100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m]))) + handle /api/q/cpu { + rewrite * /api/v1/query?query=100%20%2A%20%281%20-%20avg%20by%20%28instance%29%20%28rate%28node_cpu_seconds_total%7Bmode%3D%22idle%22%7D%5B5m%5D%29%29%29 + import wall_prometheus + } + + # Whether each SNMP device answered its last poll: morpheus, mjolnir, neo, shiva. + # max by (device) (up{job="snmp"}) + handle /api/q/snmp { + rewrite * /api/v1/query?query=max%20by%20%28device%29%20%28up%7Bjob%3D%22snmp%22%7D%29 + import wall_prometheus + } + + # WAN traffic now, both directions (rules/internet.rules.yaml). + # homelab_wan_bits_per_second + handle /api/q/wan { + rewrite * /api/v1/query?query=homelab_wan_bits_per_second + import wall_prometheus + } + + # The last hour of download, for the sparkline: a range vector, so a matrix. + # homelab_wan_bits_per_second{direction="receive"}[1h:2m] + handle /api/q/wan_hour { + rewrite * /api/v1/query?query=homelab_wan_bits_per_second%7Bdirection%3D%22receive%22%7D%5B1h%3A2m%5D + import wall_prometheus + } + + # TCP connect time to 1.1.1.1:443, the internet anchor. + # probe_duration_seconds{job="blackbox-latency",name="cloudflare"} + handle /api/q/rtt { + rewrite * /api/v1/query?query=probe_duration_seconds%7Bjob%3D%22blackbox-latency%22%2Cname%3D%22cloudflare%22%7D + import wall_prometheus + } + + # Mjolnir: charge, runtime, time on battery, load. + # {__name__=~"upsEstimatedChargeRemaining|upsEstimatedMinutesRemaining|upsSecondsOnBattery|upsOutputPercentLoad",instance="10.0.99.10"} + handle /api/q/ups { + rewrite * /api/v1/query?query=%7B__name__%3D~%22upsEstimatedChargeRemaining%7CupsEstimatedMinutesRemaining%7CupsSecondsOnBattery%7CupsOutputPercentLoad%22%2Cinstance%3D%2210.0.99.10%22%7D + import wall_prometheus + } + + # Heimdall's own SoC temperature, for the status bar. + # max(node_thermal_zone_temp{instance="heimdall"}) + handle /api/q/pi_temp { + rewrite * /api/v1/query?query=max%28node_thermal_zone_temp%7Binstance%3D%22heimdall%22%7D%29 + import wall_prometheus + } + + handle /api/* { + respond "no such question" 404 + } + + handle { + root * /srv/wall + file_server + } + } + + log { + output stdout + format json + } +} + # The host's own name: nothing is served under it yet. trinity.matrix.elysium { handle { diff --git a/stacks/sensitive/README.md b/stacks/sensitive/README.md index 795b29cc..ed4cfc10 100644 --- a/stacks/sensitive/README.md +++ b/stacks/sensitive/README.md @@ -142,6 +142,8 @@ adguard/AdGuardHome.yaml AdGuard Home's whole configuration, blocklists includ glance/ Glance's configuration: glance.yml and pages/, each mounted read-only, and assets/icons; validated in CI by its own binary +wall/ the office wall dashboard (ADR-0119): static HTML, + CSS and JS, served by Caddy at wall.matrix.elysium ntfy/server.yml ntfy's settings; its users and access list come from SOPS ntfy/templates/ message templates, mounted read-only stirling-pdf/smoke.sh proves the PDF engine works, not just its status endpoint; @@ -738,6 +740,58 @@ is a file under `pages/`, an `$include` line in `glance.yml` and a mount in the tier CA probed it from `trinity` (`probe_success 1`). It is live once `prometheus` pulls the merge; `probe_success{name="glance"}` then reads 1. +## The wall page + +The office wall dashboard, at `https://wall.matrix.elysium`, shown full-screen +by `heimdall`'s kiosk +([ADR-0119](../../docs/adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md), +[`build-heimdall.md`](../../docs/runbooks/build-heimdall.md)). It shows about +eight things at a size read from across the room: the time, the firing +alerts, eight hosts, the internet, the UPS, and how old each answer is. No +container of its own: Caddy serves `wall/` as static files. + +- **The page chooses the question, never the query.** Each `/api/q/NAME` is a + `handle` in the Caddyfile that rewrites to one PromQL query written there, + and Caddy adds the reader token on the way to the ingest proxy on + `prometheus`. A client's own query string is replaced, so + `/api/q/cpu?query=โฆ` still asks the CPU question. Anything else under + `/api/` is 404. Only GET and HEAD reach a handle: Prometheus reads a POST + body's `query=` ahead of the URL's, so the method gate runs first, inside a + `route` that keeps it there. Measured against the pinned Caddy with a + stand-in upstream on 2026-11-17: the question rewritten, `?query=up` + ignored, POST and DELETE 405 without reaching upstream, `/api/v1/query` + 404, the client's cookie stripped and the token added. +- **No credential in the page or on the Pi.** The token is + `GLANCE_PROMETHEUS_TOKEN`, the estate's reader that Glance and Home + Assistant already share, given to the caddy service. Its upstream's leaf + is the estate CA's, so Caddy trusts the committed + `stacks/observability/alloy/ingest-ca.pem` for that one transport. +- **It loads nothing from anywhere else.** The site's Content-Security-Policy + allows only itself. There are no web fonts; the stacks fall back to the + Pi's DejaVu. +- **It says when it does not know.** No answer from Prometheus, or a + Watchdog that is not firing, is shown in red as exactly that, never as + "All quiet". A host that stops reporting reads *no data*. The status bar + gives each source's age and turns amber at two and a half minutes. +- **The household half is not here yet.** The calendar, the weather and the + house come through Home Assistant in a later change, the same way: fixed + entities, a token added by Caddy. +- **Adding it to the running tier.** On `trinity`: + 1. Add `wall` to `trinity`'s *Additional Names for this Host* on `morpheus` + ([`add-a-host-override.md`](../../docs/runbooks/add-a-host-override.md)), + then check that `wall.matrix.elysium` answers `10.0.99.40`. + 2. `make up STACK=sensitive` (or wait for the converge timer). Caddy is + recreated for its alias, its mounts and the site block, and step-ca + issues the name's leaf on the first request. + 3. `curl -s https://wall.matrix.elysium/api/q/alerts | head -c 200` from a + Hicks host that trusts the tier's root: a JSON answer with + `"status":"success"`. + 4. On `heimdall`, change the URL in `~/.config/labwc/autostart` to + `https://wall.matrix.elysium/` and reboot (`build-heimdall.md` ยง7). + 5. Uncomment the `wall` probe in + `stacks/observability/prometheus/targets/blackbox.yaml`, in its own + change, once step 3 answers. + ## ntfy Where the estate's alerts are delivered since [#136], replacing ntfy.sh for diff --git a/stacks/sensitive/compose.yaml b/stacks/sensitive/compose.yaml index 76b3ab08..d34b63c7 100644 --- a/stacks/sensitive/compose.yaml +++ b/stacks/sensitive/compose.yaml @@ -143,6 +143,13 @@ services: - actual.matrix.elysium - pdf.matrix.elysium - start.matrix.elysium + - wall.matrix.elysium + # The reader token, for the wall page's fixed Prometheus questions only + # (the Caddyfile's wall.matrix.elysium block, ADR-0119). It is Glance's + # variable on purpose: one reader, so rotating it stays the three edits + # secrets/sensitive.example.yaml lists. + environment: + GLANCE_PROMETHEUS_TOKEN: ${GLANCE_PROMETHEUS_TOKEN:?set in secrets/sensitive.sops.yaml} mem_limit: 128m memswap_limit: 128m cap_drop: [ALL] @@ -178,6 +185,13 @@ services: # its message says so rather than naming `make certs`, which on this host # would mint a third CA nobody asked for. - ../../certificates/tier-ca.pem:/etc/caddy/tls/ca.pem:ro + # The estate CA, for the one upstream outside this host: the ingest + # proxy on `prometheus`, which the wall page's questions go to. The + # committed copy, the file render-trust-bundles.sh gives Glance, so it + # exists in every checkout and needs no render step. + - ../observability/alloy/ingest-ca.pem:/etc/caddy/tls/ingest-ca.pem:ro + # The wall page itself, static files served as they are (ADR-0119). + - ./wall:/srv/wall:ro ports: - "${BIND_ADDR:-0.0.0.0}:${HTTPS_PORT:-443}:443" depends_on: diff --git a/stacks/sensitive/wall/index.html b/stacks/sensitive/wall/index.html new file mode 100644 index 00000000..74ad0a29 --- /dev/null +++ b/stacks/sensitive/wall/index.html @@ -0,0 +1,79 @@ + + + +
+ + + + +Today, weather and the house arrive with Home Assistant.
+