Commit Graph

721 Commits

Author SHA1 Message Date
Micha 5d1ae68705 fix(restore): nextcloud permissions on unraid shfs (no-new-privileges removal)
Zweiter Erstlauf 2026-06-03 scheiterte weiterhin mit 503, obwohl
config.php korrekt gepatcht war.

Ursache: Unraid's FUSE/shfs-Dateisystem auf User-Shares ignoriert
chown -R 33:33 still — Dateien bleiben bei sshd:sshd. Der
Nextcloud-Entrypoint versucht intern chmod/chown auf /var/www/html und
/var/www/html/data, was mit no-new-privileges:true blockiert wird.

Fix:
- no-new-privileges vom restoretest-nextcloud Container entfernt,
  damit der Entrypoint Rechte im Container selbst setzen kann
  (Test-Postgres und Test-Redis behalten no-new-privileges)
- Host-seitiger chown durch chmod a+rwX ersetzt (funktioniert auf shfs)
- Vertretbar im isolierten Smoke-Kontext (127.0.0.1, Wegwerf-Daten,
  kein Traefik)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 10:55:56 +02:00
Micha 2913e1005f fix(restore): nextcloud chown 33:33 for www-data after borg extract
Erstlauf 2026-06-03 scheiterte mit dauerhaft 503. config.php-Patching
(Redis-Host + trusted_domains) war korrekt, aber Nextcloud konnte die
restaurierten Dateien nicht lesen/schreiben: "chmod(): Operation not
permitted at OC_Util.php#486".

Ursache: Borg-Extract ueber den borg-ui Container legt Dateien mit dem
borg-ui-User (sshd o.ae.) an. Nextcloud im Container laeuft als
www-data (UID 33). Mit no-new-privileges:true scheitert jeder chmod/
chown-Versuch im Container.

Fix: chown -R 33:33 auf html/ und data/ nach dem Extract, bevor der
Nextcloud-Container startet.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 10:44:12 +02:00
Micha 6f0e6f0d5a fix(restore): nextcloud config.php patching for redis host and trusted_domains
Erstlauf 2026-06-03 scheiterte mit 503: Redis-Host war noch auf dem
produktiven 'nextcloud-redis' statt 'restoretest-nextcloud-redis', und
trusted_domains enthielt kein 127.0.0.1 (Nextcloud blockt mit
"Access through untrusted domain").

Ursache: das sed-Pattern fuer Redis versuchte den ganzen Array-Block
einzeilig zu ersetzen, traf aber das PHP-Mehrzeilenformat nicht. Und
das trusted_domains-sed fand das Schliessmuster nicht zuverlaessig.

Fix:
- Redis-Host separat per sed patchen (nur den 'host'-Wert im Block)
- trusted_domains per PHP-CLI rewrite (robuster als sed auf PHP-Arrays)
- Fallback auf sed fuer Hosts ohne php

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 10:34:30 +02:00
Micha f473fbaa8b feat(restore): nextcloud restore smoke test scaffold
Nextcloud-Restore-Test nach dem Muster der anderen Restore-Smokes:
- Borg-Extract von html (App-Code + config.php) und nextcloud.dump
- pg_restore in isoliertes Test-Postgres (mit Retry-Schleife)
- config.php wird im Restore-Lab auf Test-DB-Credentials gepatcht
  (produktive Secrets werden nicht gemountet)
- Nextcloud startet gegen restaurierte Daten + Test-Redis
- Smoke prueft HTTP /status.php und occ status (maintenance mode)
- Produktive Nutzdaten unter /mnt/user/documents/nextcloud-data
  werden bewusst NICHT gemountet (zu gross fuer regelmaessigen Smoke)

Erster Lauf steht aus und braucht Operator-Freigabe auf dem Host.

Dispatcher und ntfy-Wrapper um Nextcloud erweitert.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 10:05:10 +02:00
Micha c922d1f241 docs(restore): finalize audit - handbook update, reifegrad matrix, backlog
Schliesst das Restore-Skills-Audit 2026-06-02/03 ab:

- RESTORE_HANDBOOK.md auf Stand 2026-06-03: alle 6 verifizierten Tests
  (Vaultwarden, Gitea, Paperless, Immich, Authelia, Komodo-Bootstrap)
  dokumentiert, Frequenz-Tabelle aktualisiert, Betriebsmodus auf V1+
  (mit ntfy), Schnellstart um Immich/Authelia/Komodo ergaenzt,
  Report-Aufbewahrungsregel dokumentiert, Ausbaustufen priorisiert.

- RESTORE_MATRIX.md: neue Sektion "Restore-Test-Reifegrad" mit
  Uebersichtstabelle (pro Dienst: Tier, letzter Test, Typ, naechster
  Lauf) und priorisierter Kandidatenliste fuer fehlende Tests.

- Gitea-Restore: SSH-Check im Report korrekt als "TCP connect only"
  benannt statt "SSH port open" (war Audit-Finding M3).

- AUDIT_2026-05-25_TODO.md: Restore-Audit-Backlog ergaenzt mit den
  verbleibenden 8 offenen Punkten (Nextcloud, Shared PG18, Komodo-Mongo,
  Mailarchiver, Mealie, Traefik, Negativ-Test, E2E-DR-Drill).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 09:31:19 +02:00
Micha ba3ef8fcfc docs(restore): mark authelia smoke successful and schedule 2026-06-03 08:55:04 +02:00
Micha 52fc007123 fix(restore): authelia smoke without dump-restore, drop bogus env, disable ntp
Erstlauf 2026-06-03 hat einen by-design-Konflikt offengelegt: pg_restore des
produktiven postgresql17-authelia.dump in eine Test-Instanz mit Wegwerf
AUTHELIA_STORAGE_ENCRYPTION_KEY scheitert im Authelia-Startup-Check mit
"the configured encryption key does not appear to be valid for this database".
Productive Storage-Werte werden mit dem produktiven Key verschluesselt; ein
Wegwerf-Key kann sie nicht entschluesseln. Smoke ist deshalb explizit auf
Config-Restore + Boot reduziert, nicht Daten-Decrypt.

Zwei Nebenbefunde aus demselben Lauf:
- AUTHELIA__SERVER__ADDRESS (Doppel-Underscore) wurde von Authelia 4.39
  abgelehnt ("configuration environment variable not expected"). ENV
  entfernt; server.address kommt eh aus der generierten configuration.yml.
- ntp-Startup-Check schlug fehl ("Could not determine the clock offset
  ... lookup time.cloudflare.com on 127.0.0.1:53: server misbehaving"),
  weil das isolierte Test-Compose-Netz keinen DNS-Resolver fuer NTP hat.
  Neuer Test-Config-Block setzt ntp.disable_startup_check: true.

Doku nachgezogen (Plan + Runbook): Encryption-Key-Konflikt ist explizit
als "nicht Teil dieses Smokes" dokumentiert; Fehler-Matrix hat Eintraege
fuer Doppel-Underscore-ENV und NTP-Lookup.

Frische des produktiven authelia-Dumps wird unveraendert ueber
check-restore-freshness.sh ueberwacht; Daten-Decrypt-Drill ist eine eigene
DR-Aufgabe mit kontrollierter Schluessel-Verwendung.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 08:27:40 +02:00
Micha 8d71dfb9ad fix(restore): authelia smoke default_policy two_factor (rules-less)
Authelia 4.39 verlangt: ohne access_control.rules muss default_policy
'two_factor' oder 'one_factor' sein. 'bypass' war nur historisch zulaessig,
mit 4.39 schlaegt config validate fehl mit "'default_policy' option
'bypass' is invalid: when no rules are specified it must be 'two_factor'
or 'one_factor'". /api/health ist public und laeuft nicht durch
access_control - die Smoke-Semantik bleibt unveraendert.

Beobachtet im Erstlauf 2026-06-03 nach Refactor auf Minimal-Testkonfig
(Commits 541c7be..440000c). Mit diesem Fix sollte 'authelia config
validate' durchlaufen; HTTP /api/health-Smoke ist der Folgeschritt.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 08:09:35 +02:00
Micha 440000c085 fix(restore): generate minimal authelia smoke config 2026-06-03 08:04:59 +02:00
Micha cacf77bfb0 fix(restore): avoid authelia smtp env in smoke test 2026-06-03 08:01:10 +02:00
Micha cd4dd178ed fix(restore): isolate authelia runtime config mount 2026-06-03 07:57:57 +02:00
Micha 541c7be853 fix(restore): generate sanitized authelia test config 2026-06-03 07:43:57 +02:00
Micha b1ae9f3c26 fix(restore): harden restore checks and add authelia smoke scaffold 2026-06-03 07:39:05 +02:00
Micha e2624796f0 fix: set vaultwarden DNS resolvers 2026-06-02 20:05:55 +02:00
Micha 9f63e6e3bc docs: archive rollback volumes after burn-in 2026-06-02 19:55:02 +02:00
Micha 8eb367f0b5 revert: remove social-to-mealie-plus stack 2026-06-02 19:44:35 +02:00
Micha 745761f518 feat: add social-to-mealie-plus stack 2026-06-02 19:17:59 +02:00
Micha ac637d30fb docs: record n8n encryption key restore source 2026-06-02 06:47:00 +02:00
Micha b0a6244e21 apps: pin super-productivity and n8n image digests 2026-06-02 06:44:03 +02:00
Micha 4fb17a09e6 apps: add n8n + mail-to-gitea-issue workflow (n8n.kaleschke.info) 2026-06-02 06:28:01 +02:00
Micha be5c68751f apps: add super-productivity stack (sp.kaleschke.info, Authelia) 2026-06-02 06:27:00 +02:00
Micha 3bfd065326 Update Scrutiny image digest 2026-06-01 16:42:31 +02:00
Micha eeebeec804 Switch Paperless GPT to OpenAI API 2026-06-01 16:18:58 +02:00
Micha 55fdb13532 Enable Vaultwarden SMTP invites 2026-06-01 15:52:31 +02:00
Micha 8709fe8239 Focus family onboarding on core apps 2026-06-01 15:25:48 +02:00
Micha 89114b1b12 Record append-only operator decision 2026-06-01 15:16:56 +02:00
Micha 3da19421d0 Document hetzner account hygiene 2026-06-01 15:09:37 +02:00
Micha 16e661be87 Document fritzbox config backup 2026-06-01 14:19:13 +02:00
Micha 12c05376d0 Close fritzbox service window docs 2026-06-01 13:02:03 +02:00
Micha dfd0ccbb9a Refine external IPv6 operator check 2026-06-01 12:51:16 +02:00
Micha ae5d4aedfc Prepare external operator checks 2026-06-01 12:48:00 +02:00
Micha 479eb291c4 Prepare final homelab cleanup gates 2026-06-01 12:19:17 +02:00
Micha c3222e800b Validate backup follow-up and harden nearline pull 2026-06-01 08:27:52 +02:00
Micha 4e34582008 Trim documentation to active runbooks 2026-05-31 23:26:12 +02:00
Micha ab8bfea7c8 Close documented backup follow-ups 2026-05-31 23:07:34 +02:00
Micha 92562dfc9c Archive stale documentation 2026-05-31 22:53:10 +02:00
Micha c9c8f9e7ce docs: add post migration burn-in check 2026-05-31 21:45:58 +02:00
Micha 1d98945a67 fix: make restore test scripts executable 2026-05-31 21:44:59 +02:00
Micha 9ffcb4e92e fix: dump active grafana database 2026-05-31 21:41:23 +02:00
Micha 99a0bfd60e docs: record grafana 13 renovate closure 2026-05-31 21:35:52 +02:00
Micha e835dfd6ed fix: let grafana read host secrets 2026-05-31 21:33:09 +02:00
Micha 6e928b6944 chore: harden grafana 13 provisioning 2026-05-31 21:31:58 +02:00
Micha 60015c1e2c chore: upgrade grafana to 13 2026-05-31 21:28:59 +02:00
Micha e1afd08bf3 docs: record closed renovate migration prs 2026-05-31 21:25:45 +02:00
Micha 268df30a13 chore: finish postgres redis stateful migrations 2026-05-31 20:32:25 +02:00
Micha 80a5ad24a2 Document closure of Mongo 8 PR 2026-05-31 14:34:46 +02:00
Micha 28406ae22b Constrain Komodo Mongo Renovate track 2026-05-31 14:33:19 +02:00
Micha 7b6c03b433 Document Komodo Mongo 8 upgrade 2026-05-31 14:31:47 +02:00
Micha 59b93924fb Update Komodo Mongo to 8.0 2026-05-31 14:23:30 +02:00
Micha aecf3b2807 Document Renovate cron follow-up 2026-05-31 13:26:40 +02:00