From 54d29d3afaf60ada1a4e8ee37a8df572b1e838eb Mon Sep 17 00:00:00 2001 From: Frank Schwenk Date: Thu, 11 Jun 2026 22:25:56 +0200 Subject: [PATCH] docs: initial project documentation for 0012.de webspace Document hosting setup, external monitoring architecture, landing page concept, env template, and phased todo checklist for the wint.global Classic 1.0 counterpart to boka. Co-authored-by: Cursor --- .env.example | 47 +++++++++ .gitignore | 5 + HOSTING.md | 99 +++++++++++++++++++ MONITORING.md | 158 ++++++++++++++++++++++++++++++ README.md | 72 ++++++++++++++ SITE.md | 53 ++++++++++ todo/01-bootstrap-env-deploy.md | 31 ++++++ todo/02-email-smtp.md | 45 +++++++++ todo/03-monitoring-pull-phase1.md | 48 +++++++++ todo/04-monitoring-push-boka.md | 55 +++++++++++ todo/05-plesk-cron.md | 41 ++++++++ todo/06-site-0012-landing.md | 30 ++++++ todo/07-mail-domains-external.md | 39 ++++++++ todo/08-monitoring-phase2.md | 26 +++++ todo/09-monitoring-phase3.md | 24 +++++ todo/README.md | 30 ++++++ 16 files changed, 803 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 HOSTING.md create mode 100644 MONITORING.md create mode 100644 README.md create mode 100644 SITE.md create mode 100644 todo/01-bootstrap-env-deploy.md create mode 100644 todo/02-email-smtp.md create mode 100644 todo/03-monitoring-pull-phase1.md create mode 100644 todo/04-monitoring-push-boka.md create mode 100644 todo/05-plesk-cron.md create mode 100644 todo/06-site-0012-landing.md create mode 100644 todo/07-mail-domains-external.md create mode 100644 todo/08-monitoring-phase2.md create mode 100644 todo/09-monitoring-phase3.md create mode 100644 todo/README.md diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..779bd6b --- /dev/null +++ b/.env.example @@ -0,0 +1,47 @@ +# Kopie nach .env — niemals committen. +# Alle Werte aus der wint.global Willkommens-Mail bzw. Plesk. + +# --- Hosting / Plesk (Classic 1.0, 0012.de) --- +PLESK_URL=https://ha01s019.org-dns.com:8443/ +PLESK_USER= +PLESK_PASSWORD= + +# FTP (gleiche Credentials wie Plesk laut Hoster) +FTP_HOST=ha01s019.org-dns.com +FTP_USER= +FTP_PASSWORD= +# Relativer Pfad zum Document Root (in Plesk prüfen, typisch httpdocs) +FTP_REMOTE_PATH=httpdocs + +# --- Domain & Server --- +DOMAIN=0012.de +HOSTING_SERVER=ha01s019.org-dns.com +HOSTING_SERVER_IP=62.108.32.139 +NAMESERVER_1=ns1.org-ns.com +NAMESERVER_2=ns2.org-ns.com + +# --- SMTP (Plesk-Mail auf diesem Webspace) --- +# Für Monitoring-Alerts und Skripte, die über 0012.de mailen +SMTP_HOST=ha01s019.org-dns.com +SMTP_PORT=587 +SMTP_ENCRYPTION=tls +SMTP_USER= +SMTP_PASSWORD= +# Absender für System-Mails (Monitoring, Cron-Fehler) +SMTP_FROM=monitor@0012.de +# Empfänger für Alarme +ALERT_EMAIL= + +# --- Monitoring: Push von boka → Webspace --- +# Token für ingest.php (stark, zufällig; identisch auf boka) +MONITOR_INGEST_TOKEN= +MONITOR_INGEST_URL=https://0012.de/ingest.php + +# --- Monitoring: optionale Telegram-Alerts --- +TELEGRAM_BOT_TOKEN= +TELEGRAM_CHAT_ID= + +# --- boka (vServer, Gegenstück) --- +BOKA_HOST=boka +BOKA_IP=89.163.231.180 +BOKA_SSH_USER= diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..63dcf96 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.env +*.log +/vendor/ +/node_modules/ +.DS_Store diff --git a/HOSTING.md b/HOSTING.md new file mode 100644 index 0000000..53e92a1 --- /dev/null +++ b/HOSTING.md @@ -0,0 +1,99 @@ +# Hosting — wint.global Classic 1.0 + +Stand: Willkommens-Mail vom 11.06.2026. Credentials **nicht** in diesem Repo — nur in `.env`. + +## Produkt + +| | | +|---|---| +| Paket | Classic 1.0 / 100% CO2-neutral | +| Speicher | 15 GB | +| Traffic | unlimitiert | +| Domain inkl. | `0012.de` | +| Abrechnung | jährlich, nächste Zahlung 11.06.2027 | +| Kundennummer | 26064 | +| Anbieter | [wint.global GmbH](https://wint.global) | + +## Zugang + +| Zweck | URL / Host | +|-------|------------| +| Plesk (direkt) | `https://ha01s019.org-dns.com:8443/` | +| Plesk (bequem) | Kundenbereich → Aktive Services → Produkt → „Weiter zur Plesk Administration“ | +| FTP | Host `ha01s019.org-dns.com`, gleicher User/Passwort wie Plesk | + +**Hinweis:** Port 8443 kann in Firmennetzwerken blockiert sein — alternativen Anschluss testen. + +## Server + +| | | +|---|---| +| Servername | `ha01s019.org-dns.com` | +| Server-IP | `62.108.32.139` | + +## DNS (Nameserver bei wint.global) + +| NS | IP | +|----|-----| +| `ns1.org-ns.com` | `62.108.32.9` | +| `ns2.org-ns.com` | `89.107.70.9` | + +DNS-Einträge nur für Domains mit Bezug zum Paket oder über wint.global bestellt. + +Domain-Delegation kann nach Registration bis zu **24 Stunden** dauern. Bis dahin ggf. temporäre URL aus dem Kundenbereich nutzen. + +## E-Mail (Plesk) + +| | | +|---|---| +| POP3/IMAP | `ha01s019.org-dns.com` | +| SMTP | `ha01s019.org-dns.com` | +| Benutzername | vollständige E-Mail-Adresse | +| Passwort | bei Einrichtung des Postfachs gesetzt | + +**Sicherheit:** Nach 5 fehlgeschlagenen Login-Versuchen wird die Client-IP für 10 Minuten gesperrt (FTP, Webmail, E-Mail). + +### Geplante Nutzung + +1. **Monitoring-Alerts** — z. B. `monitor@0012.de` → persönliche Adresse +2. **SMTP für Skripte** — boka und andere Hosts senden über TLS/587 (Relay nur für autorisierte Absender konfigurieren) +3. **Mail-Hosting** — Postfächer für Domains ohne eigenen Mailserver (MX auf 0012.de bzw. wint-NS) + +## Geplante Aufgaben (Cron) + +Plesk: **Websites & Domains → Geplante Aufgaben → Aufgabe planen** + +| Einstellung | Empfehlung | +|-------------|------------| +| Aufgabentyp | PHP-Skript ausführen | +| Skriptpfad | `httpdocs/monitor.php` (nach Deployment) | +| PHP-Version | aktuelle verfügbare (z. B. 8.5.x) | +| Ausführen | Cron-Stil | +| Schedule Pull-Checks | `*/10 * * * *` (alle 10 Min) | +| Schedule Heartbeat-Check | `*/5 * * * *` (Push-Stale-Prüfung, ggf. in monitor.php) | +| Benachrichtigen | „Nur Fehler“ für Cron-PHP-Fehler; App-Alerts über eigenes SMTP | + +Screenshot-Referenz: Plesk „Aufgabe planen“ (PHP-Skript, Cron-Stil, PHP-Version). + +## Beziehung zu boka + +``` + Internet + │ + ┌──────────────┼──────────────┐ + │ │ │ + 0012.de schwenk.online andere Sites + (wint/Plesk) (boka/VPS) (boka/VPS) + │ ▲ ▲ + │ │ │ + └── Pull HTTPS checks ───────┘ + └── Push POST ingest.php ◄── boka Cron + └── SMTP alerts ──────────► du +``` + +Der Webspace ist **physisch und administrativ getrennt** — fällt boka komplett aus, kann 0012.de noch alarmieren (sofern der Hoster läuft). + +## Support + +- E-Mail: support@wint.global +- Tel: +49 211 972660-30 diff --git a/MONITORING.md b/MONITORING.md new file mode 100644 index 0000000..40a67f7 --- /dev/null +++ b/MONITORING.md @@ -0,0 +1,158 @@ +# Monitoring — externer PHP-Webspace (0012.de) + +Der vServer **`boka`** (`89.163.231.180`) wird von **`0012.de`** (wint.global Classic 1.0, Plesk-Cron) aus überwacht. Der Webspace sieht den Server von außen — interne Metriken (Disk, Docker) brauchen ein Push-Skript auf boka oder eine Status-API. + +**Webspace:** unabhängig von boka gehostet — fällt der VPS aus, kann 0012.de noch alarmieren. + +Siehe auch: [`todo/03-monitoring-pull-phase1.md`](todo/03-monitoring-pull-phase1.md), [`todo/04-monitoring-push-boka.md`](todo/04-monitoring-push-boka.md), [`HOSTING.md`](HOSTING.md) + +--- + +## Architektur (empfohlen) + +### Ebene 1 — Pull (PHP-Cron auf Webspace, alle 5–15 Min) + +- HTTPS-Checks auf öffentliche URLs +- SSL-Zertifikat-Ablauf +- Optional: TCP-Checks (Gitea SSH, RustDesk) +- Bei Fehler: E-Mail / Telegram (nach 2. Versuch, 2 Min Abstand → weniger Fehlalarme) + +### Ebene 2 — Push (Cron auf boka, alle 5 Min) + +- Kleines Skript postet JSON an `ingest.php` auf dem Webspace (Token-geschützt) +- Payload z. B.: `load`, `disk_percent`, `mem_available`, `containers_running`, `containers_unhealthy` +- Webspace-Cron: **kein Push seit 15 Min** → Server oder Netzwerk tot +- Optional: `disk > 85%`, `unhealthy > 0`, Backup-Heartbeat + +--- + +## Prio **high** — zuerst umsetzen + +| Was | Wie (extern) | Warum | +|-----|----------------|-------| +| HTTPS-Erreichbarkeit kritischer Domains | `curl` / `file_get_contents`, Timeout ~10s, Status 200/301 | Einzelne Apps können down sein, ohne dass es auffällt (z. B. bringtake) | +| Traefik / Edge | `https://schwenk.online` + eine App-Domain + `https://gitea.schwenk.online` | Fällt Traefik oder Let's Encrypt aus, sind viele Sites betroffen | +| Gitea | HTTPS, optional Login-Seite erreichbar | Zentrale Git-/CI-Basis | +| Immich | `https://pics.schwenk.online` | Fotos, großer Datenbestand | +| SSL-Zertifikat-Ablauf | TLS-Handshake prüfen, Warnung bei < 14 Tagen | Ablauf oder verlorenes `acme.json` = Ausfall vieler Dienste | +| Backup-Heartbeat | Server pingt nach erfolgreichem Backup den Webspace; Cron alarmiert bei **keinem Ping seit 25h** | Sobald Backups existieren: kritisch | +| Alarm bei Ausfall | E-Mail oder Telegram vom PHP-Cron | Externer Beobachter ohne Zugang zu boka | + +### Mindest-URL-Liste (Start) + +- `https://schwenk.online` +- `https://gitea.schwenk.online` +- `https://pics.schwenk.online` +- `https://medis.schwenk.online` +- `https://portainer.schwenk.online` +- Eine `bsc-gp.de`-Subdomain (z. B. `https://score.bsc-gp.de`) +- `https://vfb.red` + +--- + +## Prio **medium** — bald sinnvoll + +| Was | Wie (extern) | Warum | +|-----|----------------|-------| +| Weitere App-Domains | HTTP-Check pro Stack | Viele kleine Sites; einzelne Container können sterben | +| API-Health | z. B. `https://api.bringtake.schwenk.online/health` | Frontend kann 200 liefern, Backend tot | +| Antwortzeit | Dauer messen, Warnung bei > 5s | Frühwarnung bei Last (Immich ML, viele Container) | +| Inhalt prüfen | Marker-String im HTML (``, fester Text) | Erkennt „200 aber leere/falsche Seite“ | +| HTTP→HTTPS-Redirect | `http://domain` → 301/308 | Kaputter Redirect = Browser-Warnungen | +| DNS-Auflösung | `gethostbyname` / DNS-API | Domain zeigt plötzlich woanders hin | +| Gitea SSH | TCP-Check Port **2222** (`fsockopen`) | Git per SSH unabhängig von der Web-UI | +| RustDesk | TCP **21115–21117** (falls genutzt) | Kein HTTP möglich | +| SSL pro Subdomain | Einzelcheck je Host | Nicht jeder Host nutzt dasselbe Zertifikat | +| Push-Status vom Server | `POST` an Webspace mit Token + JSON | Disk/RAM/Container sonst von außen unsichtbar | + +### Weitere URLs (medium, nach und nach) + +- `https://affen.schwenk.online` +- `https://bringtake.schwenk.online` +- `https://api.bringtake.schwenk.online` +- `https://link.schwenk.online` +- `https://traefik.schwenk.online` (nur wenn Dashboard öffentlich bleiben soll) +- Weitere `*.schwenk.online` und `*.bsc-gp.de` laut Inventory + +--- + +## Prio **low** — nice to have + +| Was | Wie (extern) | Warum | +|-----|----------------|-------| +| Alle ~25 Domains einzeln | Lange Checkliste | Hoher Pflegeaufwand; Stichproben reichen oft | +| Security Headers | HSTS, `X-Frame-Options` | Sicherheit, kein Verfügbarkeitsproblem | +| TLS-Version / Cipher | Nur TLS 1.2+ | Selten akut | +| Port-Scan light | 22, 80, 443, 2222 erwartet; **5432 nicht** offen | Postgres soll nicht öffentlich sein | +| Blacklist / Malware-Scan | Externe API | Für Homelab meist overkill | +| WHOIS / Domain-Ablauf | Registrar-API | Oft ohnehin Mail vom Registrar | +| Öffentliche Feeds | RSS/iCal-Outputs | Nur wenn businesskritisch | +| Synthetic Login | Formular-POST mit Test-User | Aufwendig, bricht bei UI-Änderungen | +| Response-Größe | Plötzlich sehr kleine Antwort | Selten nötig | +| Uptime-Dashboard / SLA | DB auf Webspace | Nach echten Checks | + +--- + +## Von außen schlecht prüfbar (ohne Hilfsskript auf boka) + +| Intern | Lösung | +|--------|--------| +| Disk voll, RAM, Load | Push-Endpoint (Ebene 2) | +| `docker ps`, exited containers | Status-JSON von boka pushen | +| Log-Fehler, OOM | Push oder zentraler Log-Dienst | +| Dangling volumes, Backup-Größe | Nur auf dem Host | +| fail2ban / SSH-Bruteforce | Auth-Log per Push oder separater Dienst | + +**Pragmatisch:** `monitor-push.sh` auf boka (Cron alle 5 Min) → POST an Webspace: + +```json +{ + "token": "...", + "load": [1.2, 0.8, 0.5], + "disk_percent": 55, + "mem_available_mb": 4700, + "containers_running": 38, + "containers_unhealthy": 0, + "backup_last_success": "2026-06-10T03:00:00+02:00" +} +``` + +--- + +## Umsetzung in Phasen + +### Phase 1 (high, ~1h) + +- 8–12 HTTPS-URLs aus der Mindestliste +- SSL-Ablauf < 14 Tage → Warnung +- E-Mail bei Fehler, Retry nach 2 Minuten + +### Phase 2 (medium) + +- API-Health für Stacks mit Backend (bringtake, medis, affen, …) +- Latenz-Schwelle +- Backup-Heartbeat (sobald `todo/05-automated-backups.md` erledigt) +- Push-Status von boka + +### Phase 3 (low) + +- Restliche Domains, Header-Checks, Dashboard + +--- + +## Dateien (geplant) + +| Ort | Datei | Zweck | +|-----|-------|--------| +| Webspace | `monitor.php` | Cron: Pull-Checks, Alarm | +| Webspace | `ingest.php` | Empfang Push von boka | +| boka | `~/server/scripts/push-status.sh` | Sammelt Metriken, POST an Webspace | +| boka | Crontab | `*/5 * * * *` push-status + ggf. nach Backup | + +--- + +## Hinweise + +- **Portainer** und **Traefik-Dashboard** öffentlich monitoren = öffentlich bestätigen, dass sie erreichbar sind. Basic Auth beibehalten; Monitoring prüft nur Erreichbarkeit (und ggf. 401 als „ok“). +- **Exit 401/403** kann bei geschützten Diensten **erwünscht** sein — Checks pro Host konfigurieren. +- Externer Monitor ersetzt kein **fail2ban** oder **UFW-Audit** auf boka (separates boka-Repo). diff --git a/README.md b/README.md new file mode 100644 index 0000000..d48ffc7 --- /dev/null +++ b/README.md @@ -0,0 +1,72 @@ +# 0012.de — Webspace-Projekt + +Repository für den **wint.global Classic 1.0** Webspace (`0012.de`): Deployment, Betrieb und Dokumentation. + +Dieser Webspace ist bewusst **unabhängig vom vServer `boka`** (Webtropia Cloud VPS, `89.163.231.180`) aufgesetzt. Er dient als externer Beobachter, Mail-Relay und leichtgewichtiger Begleiter — nicht als Ersatz für den VPS. + +## Rollen + +| Rolle | Beschreibung | +|-------|--------------| +| **Externes Monitoring** | Cron-gestützte PHP-Checks auf Erreichbarkeit, SSL und (später) Push-Metriken von boka | +| **Alarmierung** | E-Mail (und optional Telegram) bei Ausfällen — vom Webspace aus, ohne Zugang zu boka | +| **SMTP-Relay** | Prozesse auf boka und anderswo können über den Plesk-Mailserver von 0012.de senden | +| **Mail-Hosting** | Postfächer für Domains, die noch keinen eigenen Mailserver haben | +| **Öffentliche Präsenz** | Minimale, aber sinnvolle Landing Page statt leerer Domain | + +## Hosting + +- **Paket:** Classic 1.0 / 15 GB, Traffic unlimitiert ([Produktseite](https://wint.global/linux-hosting-pakete-plesk/)) +- **Domain:** `0012.de` +- **Panel:** Plesk auf `ha01s019.org-dns.com` +- **Details:** [`HOSTING.md`](HOSTING.md) + +Zugangsdaten gehören in `.env` (Vorlage: [`.env.example`](.env.example)). **Niemals committen.** + +## Monitoring + +Architektur und Prioritäten: [`MONITORING.md`](MONITORING.md) + +Kurzfassung: + +- **Pull:** PHP-Cron auf 0012.de prüft HTTPS/SSL/TCP von außen (alle 5–15 Min) +- **Push:** Cron auf boka postet JSON an `ingest.php` (Disk, RAM, Container, Backup-Heartbeat) + +## vServer boka (Gegenstück) + +| | | +|---|---| +| Anbieter | Webtropia Cloud VPS S Linux NVMe | +| IP | `89.163.231.180` | +| Hostname | `boka` | +| Dienste | Traefik, Gitea, Immich, viele `*.schwenk.online`-Apps, u. a. | + +Der Webspace sieht boka **von außen** — interne Metriken brauchen das Push-Skript auf boka. + +## Projektstruktur (Ziel) + +``` +0012/ +├── README.md +├── HOSTING.md +├── MONITORING.md +├── SITE.md # Konzept Landing Page +├── .env.example +├── public/ # Document Root (FTP → httpdocs) +│ ├── index.php # Status-Beacon Landing +│ ├── monitor.php # Cron: Pull-Checks +│ └── ingest.php # Empfang Push von boka +├── config/ # PHP-Konfiguration (lädt .env) +└── todo/ # Aufgabenliste +``` + +## Aufgaben + +Offene Arbeiten: [`todo/README.md`](todo/README.md) + +## Schnellstart (wenn eingerichtet) + +1. `.env.example` → `.env` kopieren und ausfüllen +2. Dateien nach `httpdocs/` deployen (FTP/rsync) +3. In Plesk: geplante Aufgabe für `monitor.php` (Cron-Stil, z. B. `*/10 * * * *`) +4. Auf boka: Push-Skript + Crontab (siehe `todo/04-monitoring-push-boka.md`) diff --git a/SITE.md b/SITE.md new file mode 100644 index 0000000..8d97b84 --- /dev/null +++ b/SITE.md @@ -0,0 +1,53 @@ +# 0012.de — Landing Page (Konzept) + +Die Domain soll nicht leer bleiben, aber zum Projekt passen: **externer Beobachter**, nicht Marketing-Seite. + +## Idee: „Status Beacon“ + +Eine minimalistische **Mission-Control-Oberfläche** — dunkel, monospace, ohne Tracking-Bloat. + +### Tagline + +> **0012** · external observer node +> Watching from outside. + +„0012“ als Name des Knotens (wie ein Kanal/Rufzeichen), nicht als Marketing-Marke. + +### Inhalt (above the fold) + +1. **Live-Status-Raster** — 12 Kacheln für die wichtigsten überwachten Endpoints (aus `MONITORING.md` Mindestliste): + - schwenk.online, gitea, pics, medis, portainer, vfb.red, … + - Farbe: grün / gelb (SSL < 14 Tage, Latenz hoch) / rot (down) + - Letzter Check-Zeitstempel + +2. **boka-Heartbeat** — „Last push from boka: 3 min ago“ oder „⚠ no signal > 15 min“ + +3. **Meta-Zeile** — „This node runs on wint.global · independent of boka (89.163.231.180)“ + +### Datenquelle + +- Gleiche JSON-Datei oder SQLite, die `monitor.php` beim Cron-Lauf schreibt (`data/last-checks.json`) +- Landing Page liest nur diese Datei — **kein** Live-curl im Browser (Performance, Timeout) + +### Design + +- Hintergrund: sehr dunkles Grau (`#0d1117`) +- Akzent: Amber für Warnung, Grün `#3fb950`, Rot `#f85149` (GitHub-Dark-ähnlich) +- Schrift: system-ui oder `JetBrains Mono` via Google Fonts (ein Request) +- Kein JS-Framework — plain PHP + minimal CSS, eine Datei + +### Optional (später) + +- `/status.json` — öffentliche API für Uptime (read-only) +- RSS-Feed „incidents“ bei längeren Ausfällen +- Kleine „About“-Sektion: Link zu GitHub-Repo (wenn public) + +### Was bewusst **nicht** + +- Kein Blog, kein Portfolio — das ist Ops-Infrastruktur +- Keine Login-Fläche auf der Startseite +- Keine Details zu internen IPs/Ports (nur boka-Heartbeat als Text) + +## Umsetzung + +Siehe [`todo/06-site-0012-landing.md`](todo/06-site-0012-landing.md). diff --git a/todo/01-bootstrap-env-deploy.md b/todo/01-bootstrap-env-deploy.md new file mode 100644 index 0000000..1fc73ae --- /dev/null +++ b/todo/01-bootstrap-env-deploy.md @@ -0,0 +1,31 @@ +# 01 — Bootstrap, `.env`, Deployment + +**Priorität:** high +**Abhängigkeiten:** keine +**Blockiert:** 02, 03, 04, 05, 06 + +## Ziel + +Lokales Repo mit dem Webspace verbinden und eine deploybare Grundstruktur anlegen. + +## Checkliste + +- [ ] `.env.example` nach `.env` kopieren +- [ ] Plesk-User/Passwort, FTP, später SMTP in `.env` eintragen (nicht committen) +- [ ] In Plesk Document Root prüfen (typisch `httpdocs/`) +- [ ] PHP-Version notieren (Cron-Screenshot: 8.5.x) +- [ ] Verzeichnis `public/` als Quelle für `httpdocs/` festlegen +- [ ] Erstes Test-Deployment: `public/index.php` mit `phpinfo()` oder „hello“ — danach wieder entfernen +- [ ] HTTPS für `0012.de` prüfen (Let's Encrypt in Plesk) +- [ ] Optional: Deploy-Skript (`scripts/deploy.sh` rsync/lftp) — nur wenn gewünscht + +## Akzeptanzkriterien + +- FTP-Login funktioniert +- `https://0012.de/` liefert eine Testseite +- `.env` liegt lokal, ist in `.gitignore` + +## Notizen + +- Temporäre URL aus Kundenbereich nutzen, falls DNS noch propagiert +- Firewall: Port 8443 (Plesk), 21/22 (FTP/SFTP je nach Anbieter) diff --git a/todo/02-email-smtp.md b/todo/02-email-smtp.md new file mode 100644 index 0000000..57a2fc9 --- /dev/null +++ b/todo/02-email-smtp.md @@ -0,0 +1,45 @@ +# 02 — E-Mail & SMTP + +**Priorität:** high +**Abhängigkeiten:** 01 +**Blockiert:** 03 (Alarmierung) + +## Ziel + +Mail-Infrastruktur auf 0012.de für Monitoring-Alerts, Skript-Versand und spätere Fremddomains. + +## Checkliste + +### Postfächer auf 0012.de + +- [ ] Postfach `monitor@0012.de` (oder `alerts@0012.de`) anlegen +- [ ] Passwort in `.env` → `SMTP_USER`, `SMTP_PASSWORD` +- [ ] `ALERT_EMAIL` auf persönliche Adresse setzen +- [ ] `SMTP_FROM=monitor@0012.de` setzen +- [ ] Test: Webmail-Login auf `ha01s019.org-dns.com` + +### SMTP für Skripte + +- [ ] Port 587 + STARTTLS testen (von lokalem Rechner / boka) +- [ ] SPF für `0012.de` in Plesk DNS prüfen/setzen +- [ ] DKIM in Plesk aktivieren (Deliverability) +- [ ] DMARC optional: `_dmarc.0012.de` mit `p=none` zum Start + +### Relay von boka (später) + +- [ ] Entscheiden: dediziertes Relay-Postfach `relay@0012.de` vs. App-spezifische Absender +- [ ] In Plesk: ausgehende Mail-Limits / Relay-Regeln prüfen (Hoster-Doku) +- [ ] boka-Apps: zentraler SMTP-Block in Docker/env (Host, Port, User, Pass) + +### Cron-Benachrichtigungen Plesk + +- [ ] Geplante Aufgaben: „Nur Fehler“ für PHP-Fatal-Errors — ergänzt App-eigene Alerts, ersetzt sie nicht + +## Akzeptanzkriterien + +- Testmail von PHP (`mail()` oder PHPMailer) an `ALERT_EMAIL` kommt an +- SPF/DKIM ohne Hard-Fail in Mail-Header-Test (mail-tester.com o. ä.) + +## Referenz + +- [`../HOSTING.md`](../HOSTING.md) — SMTP-Host `ha01s019.org-dns.com` diff --git a/todo/03-monitoring-pull-phase1.md b/todo/03-monitoring-pull-phase1.md new file mode 100644 index 0000000..fddd6eb --- /dev/null +++ b/todo/03-monitoring-pull-phase1.md @@ -0,0 +1,48 @@ +# 03 — Monitoring Pull (Phase 1) + +**Priorität:** high +**Abhängigkeiten:** 01, 02, 05 +**Siehe auch:** [`../MONITORING.md`](../MONITORING.md) + +## Ziel + +`monitor.php` auf dem Webspace: externe HTTPS-/SSL-Checks, Retry, E-Mail-Alarm. + +## Checkliste + +### Implementierung + +- [ ] `config/` — lädt `.env` (oder `config.php` außerhalb `httpdocs`) +- [ ] `public/monitor.php` — CLI/Cron-tauglich, kein Browser-Output nötig +- [ ] URL-Liste aus MONITORING.md Mindestliste konfigurierbar (`config/targets.php`) +- [ ] Pro URL: HTTP-Status, Timeout ~10s, optional erwarteter Code (200, 301, 401) +- [ ] SSL-Ablauf: Warnung wenn < 14 Tage +- [ ] Retry: bei Fehler 2 Min warten, zweiter Versuch — Alarm nur wenn beide scheitern +- [ ] Ergebnisse nach `data/last-checks.json` schreiben (für Landing Page) +- [ ] Bei Alarm: E-Mail an `ALERT_EMAIL` via SMTP +- [ ] Optional: Telegram wenn `TELEGRAM_*` gesetzt + +### Mindest-URLs (Start) + +- [ ] `https://schwenk.online` +- [ ] `https://gitea.schwenk.online` +- [ ] `https://pics.schwenk.online` +- [ ] `https://medis.schwenk.online` +- [ ] `https://portainer.schwenk.online` +- [ ] Eine `bsc-gp.de`-Subdomain (z. B. score) +- [ ] `https://vfb.red` + +### Sicherheit + +- [ ] `data/` nicht öffentlich (`.htaccess` oder außerhalb Document Root) +- [ ] Keine Secrets in `last-checks.json` + +## Akzeptanzkriterien + +- Manueller Aufruf / „Jetzt ausführen“ in Plesk läuft fehlerfrei +- Simulierter Down (falsche URL) löst Mail nach Retry aus +- `last-checks.json` aktualisiert sich + +## Geschätzter Aufwand + +~1h (laut MONITORING.md Phase 1) diff --git a/todo/04-monitoring-push-boka.md b/todo/04-monitoring-push-boka.md new file mode 100644 index 0000000..8bb2401 --- /dev/null +++ b/todo/04-monitoring-push-boka.md @@ -0,0 +1,55 @@ +# 04 — Monitoring Push (boka → Webspace) + +**Priorität:** medium +**Abhängigkeiten:** 01, 03 (ingest + stale-Check) +**Siehe auch:** [`../MONITORING.md`](../MONITORING.md) Ebene 2 + +## Ziel + +Interne Metriken von boka an 0012.de pushen; Alarm wenn kein Push seit 15 Min. + +## Checkliste + +### Webspace + +- [ ] `public/ingest.php` — POST JSON, Token-Prüfung (`MONITOR_INGEST_TOKEN`) +- [ ] Payload speichern: `data/boka-status.json` + Timestamp +- [ ] In `monitor.php`: wenn `last_push` > 15 Min → Alarm „boka silent“ +- [ ] Schwellen optional: `disk_percent > 85`, `containers_unhealthy > 0` +- [ ] Backup-Heartbeat-Feld `backup_last_success` — Alarm wenn > 25h alt (wenn Backups existieren) + +### boka + +- [ ] Skript `~/server/scripts/push-status.sh` (oder Pfad laut boka-Repo) +- [ ] Sammelt: load, disk %, mem, `docker ps` running/unhealthy +- [ ] POST an `MONITOR_INGEST_URL` mit curl +- [ ] Crontab: `*/5 * * * *` +- [ ] Nach erfolgreichem Backup: Push mit aktualisiertem `backup_last_success` + +### Token + +- [ ] Starkes Token generieren (`openssl rand -hex 32`) +- [ ] Identisch in boka (env/cron) und 0012 `.env` + +## Beispiel-Payload + +```json +{ + "token": "...", + "load": [1.2, 0.8, 0.5], + "disk_percent": 55, + "mem_available_mb": 4700, + "containers_running": 38, + "containers_unhealthy": 0, + "backup_last_success": "2026-06-10T03:00:00+02:00" +} +``` + +## Akzeptanzkriterien + +- Push von boka aktualisiert JSON auf Webspace +- Absichtlich gestoppter Cron auf boka → Mail nach 15+ Min + +## Hinweis + +Skript auf boka kann in **boka-Repo** liegen; hier nur `ingest.php` + Doku-Link. diff --git a/todo/05-plesk-cron.md b/todo/05-plesk-cron.md new file mode 100644 index 0000000..baa666a --- /dev/null +++ b/todo/05-plesk-cron.md @@ -0,0 +1,41 @@ +# 05 — Plesk Cron (Geplante Aufgaben) + +**Priorität:** high +**Abhängigkeiten:** 01, 03 (Skript muss existieren) +**Referenz:** Plesk → Websites & Domains → Geplante Aufgaben + +## Ziel + +Monitoring automatisch alle 5–10 Minuten ausführen. + +## Checkliste + +- [ ] Aufgabe anlegen: **PHP-Skript ausführen** +- [ ] Skriptpfad: `httpdocs/monitor.php` (Pfad nach Deployment verifizieren) +- [ ] PHP-Version: höchste stabile (z. B. 8.5.7) +- [ ] **Aktiv** angehakt +- [ ] Ausführen: **Cron-Stil** +- [ ] Expression: `*/10 * * * *` (Pull-Checks alle 10 Min) +- [ ] Beschreibung: z. B. „0012 external monitoring pull“ +- [ ] Benachrichtigen: **Nur Fehler** (PHP-Crash → Plesk-Mail) +- [ ] **Jetzt ausführen** — Exit-Code / Log prüfen +- [ ] Optional zweite Aufgabe für leichtgewichtigen Heartbeat-Only-Check (`*/5`) — nur wenn von monitor.php getrennt + +## Cron-Referenz + +``` +*/10 * * * * monitor.php (HTTPS/SSL + stale push check) +``` + +Plesk nutzt System-Timezone des Servers. + +## Akzeptanzkriterien + +- Aufgabe läuft scheduled ohne manuellen Klick +- `data/last-checks.json` Timestamp bewegt sich + +## Fehlerbehebung + +- Skriptpfad relativ zu Domain-Root in Plesk +- `max_execution_time` bei vielen URLs erhöhen +- Bei Timeout: URLs batching oder Interval vergrößern diff --git a/todo/06-site-0012-landing.md b/todo/06-site-0012-landing.md new file mode 100644 index 0000000..55d7c52 --- /dev/null +++ b/todo/06-site-0012-landing.md @@ -0,0 +1,30 @@ +# 06 — Landing Page 0012.de (Status Beacon) + +**Priorität:** medium +**Abhängigkeiten:** 03 (liefert `last-checks.json`) +**Konzept:** [`../SITE.md`](../SITE.md) + +## Ziel + +Öffentliche, minimale Startseite — Live-Status aus Monitoring-Daten, kein Leer-Domain-Eindruck. + +## Checkliste + +- [ ] `public/index.php` — liest `data/last-checks.json` + `data/boka-status.json` +- [ ] Raster: ~12 Kacheln, Farbe nach Status (ok / warn / down) +- [ ] boka-Heartbeat-Zeile („last push X min ago“) +- [ ] Dark-Theme CSS inline oder eine `assets/style.css` +- [ ] Graceful fallback wenn JSON fehlt („Monitoring not initialized“) +- [ ] Keine sensiblen Daten (Tokens, interne Fehlerdetails) +- [ ] Optional: `public/status.json` read-only API +- [ ] Meta: `noindex` erwägen (Ops-Seite, keine SEO) + +## Akzeptanzkriterien + +- `https://0012.de/` zeigt aktuellen Status nach Cron-Lauf +- Seite lädt ohne JavaScript +- Mobile lesbar + +## Nicht im Scope + +- Blog, CMS, WordPress diff --git a/todo/07-mail-domains-external.md b/todo/07-mail-domains-external.md new file mode 100644 index 0000000..fa992ad --- /dev/null +++ b/todo/07-mail-domains-external.md @@ -0,0 +1,39 @@ +# 07 — Mail-Hosting für externe Domains + +**Priorität:** medium +**Abhängigkeiten:** 02 +**Blockiert durch:** Entscheidung welche Domains + +## Ziel + +Domains ohne eigenen Mailserver über 0012.de / wint.global betreiben. + +## Checkliste + +### Pro Domain + +- [ ] Domain-Liste festlegen (welche brauchen Mail?) +- [ ] Domain in Plesk als **Alias** oder **zusätzliche Domain** am Subscription — Hoster-Regeln prüfen („DNS nur mit Paketbezug“) +- [ ] MX-Records auf `0012.de` oder Hoster-Vorgabe (`mail.0012.de` / `ha01s019.org-dns.com`) +- [ ] SPF: `v=spf1 include:... ~all` passend zum Hoster +- [ ] DKIM für jede sendende Domain +- [ ] Postfächer anlegen (z. B. `kontakt@fremddomain.de`) +- [ ] Test: senden/empfangen von extern (Gmail) + +### Relay vs. natives Hosting + +| Modell | Wann | +|--------|------| +| Volles Hosting | Domain bei wint oder NS zeigt auf wint | +| Nur Relay | boka sendet nur über SMTP mit From `@domain` — erfordert SPF/DKIM für diese Domain | + +- [ ] Modell pro Domain dokumentieren in `HOSTING.md` oder `docs/mail-domains.md` + +## Risiken + +- Shared-Hosting-Limits (Anzahl Postfächer, Send-Rate) +- Domains außerhalb wint: DNS beim Registrar manuell + +## Akzeptanzkriterien + +- Mindestens eine Fremddomain empfängt und sendet zuverlässig diff --git a/todo/08-monitoring-phase2.md b/todo/08-monitoring-phase2.md new file mode 100644 index 0000000..12b9aca --- /dev/null +++ b/todo/08-monitoring-phase2.md @@ -0,0 +1,26 @@ +# 08 — Monitoring Phase 2 + +**Priorität:** medium +**Abhängigkeiten:** 03, 04 +**Siehe auch:** [`../MONITORING.md`](../MONITORING.md) + +## Ziel + +Erweiterte Checks und Schwellenwerte. + +## Checkliste + +- [ ] API-Health: bringtake, medis, affen (`/health`-Endpoints) +- [ ] Antwortzeit > 5s → Warnung +- [ ] Content-Marker (title/fixed string) gegen „200 but broken“ +- [ ] HTTP→HTTPS-Redirect-Check +- [ ] DNS-Auflösung (`gethostbyname`) — unexpected IP +- [ ] TCP: Gitea SSH 2222, RustDesk 21115–21117 falls genutzt +- [ ] SSL pro Subdomain einzeln +- [ ] Backup-Heartbeat-Schwellen aktiv (25h) +- [ ] Weitere URLs aus MONITORING.md medium-Liste nach und nach + +## Akzeptanzkriterien + +- API down bei laufendem Frontend → Alarm +- Latenz-Warnung testbar (künstlich verzögerte Antwort) diff --git a/todo/09-monitoring-phase3.md b/todo/09-monitoring-phase3.md new file mode 100644 index 0000000..7615bbb --- /dev/null +++ b/todo/09-monitoring-phase3.md @@ -0,0 +1,24 @@ +# 09 — Monitoring Phase 3 (optional) + +**Priorität:** low +**Abhängigkeiten:** 08 +**Siehe auch:** [`../MONITORING.md`](../MONITORING.md) + +## Ziel + +Nice-to-have: breitere Abdeckung, Dashboard, Hardening-Checks. + +## Checkliste + +- [ ] Restliche ~25 Domains (Stichproben vs. vollständige Liste entscheiden) +- [ ] Security Headers (HSTS, X-Frame-Options) — informativ, kein Paging +- [ ] TLS-Version-Check +- [ ] Port-Scan light: 22, 80, 443, 2222 offen; **5432 geschlossen** +- [ ] Einfaches Uptime-Dashboard (SQLite auf Webspace) +- [ ] Incident-Historie auf Landing Page oder `/history` + +## Bewusst skipped (Homelab) + +- Blacklist/Malware-API +- Synthetic Login +- WHOIS-Ablauf (Registrar-Mail reicht) diff --git a/todo/README.md b/todo/README.md new file mode 100644 index 0000000..1420108 --- /dev/null +++ b/todo/README.md @@ -0,0 +1,30 @@ +# Aufgaben — Übersicht + +Nummerierte Todos für den 0012.de-Webspace. Abhängigkeiten beachten. + +| # | Datei | Priorität | Kurzbeschreibung | +|---|-------|-----------|------------------| +| 01 | [01-bootstrap-env-deploy.md](01-bootstrap-env-deploy.md) | **high** | `.env`, Repo-Struktur, erstes FTP-Deployment | +| 02 | [02-email-smtp.md](02-email-smtp.md) | **high** | Postfächer, SMTP für Alerts und Relay | +| 03 | [03-monitoring-pull-phase1.md](03-monitoring-pull-phase1.md) | **high** | `monitor.php`, HTTPS/SSL-Checks, Alarm | +| 04 | [04-monitoring-push-boka.md](04-monitoring-push-boka.md) | **medium** | Push von boka → `ingest.php` | +| 05 | [05-plesk-cron.md](05-plesk-cron.md) | **high** | Geplante Aufgaben in Plesk | +| 06 | [06-site-0012-landing.md](06-site-0012-landing.md) | **medium** | Status-Beacon Landing Page | +| 07 | [07-mail-domains-external.md](07-mail-domains-external.md) | **medium** | MX für Domains ohne Mailserver | +| 08 | [08-monitoring-phase2.md](08-monitoring-phase2.md) | **medium** | API-Health, Latenz, Backup-Heartbeat | +| 09 | [09-monitoring-phase3.md](09-monitoring-phase3.md) | **low** | Rest-Domains, Dashboard, Header-Checks | + +## Empfohlene Reihenfolge + +``` +01 → 02 → 05 → 03 → 06 + ↘ 04 (parallel zu 03, braucht ingest.php) +07 (wenn Domains feststehen) +08 → 09 +``` + +## Querverweise + +- Architektur Monitoring: [`../MONITORING.md`](../MONITORING.md) +- Hosting-Details: [`../HOSTING.md`](../HOSTING.md) +- Landing-Konzept: [`../SITE.md`](../SITE.md)