servers.md
----------

Full Server Analysis — 4 Servers

Live SSH audit completed on all four hosts. Summary below.

───

Quick Comparison

┌─────────────────┬──────────────────────────────┬────────────────────┬────────────────────────┬─────────────────────────────┐
│                 │ Contabo                      │ Hetzner            │ AI Developer           │ Hostinger                   │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ IP              │ 149.102.150.185              │ 46.62.228.173      │ 213.199.36.17          │ 31.97.122.87                │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ Hostname        │ vmi2860834                   │ debian-16gb-hel1-1 │ ubuntu                 │ srv913114                   │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ Uptime          │ 21 days                      │ 42 days            │ 123 days               │ 48 days                     │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ CPU             │ 8 cores (AMD EPYC)           │ 8 cores (AMD EPYC) │ 6 cores (AMD EPYC)     │ 2 cores (AMD EPYC)          │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ Load            │ 1.27 (moderate)              │ 0.00 (idle)        │ 0.07 (idle)            │ 1.03 (moderate)             │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ RAM Total       │ 24 GB                        │ 16 GB              │ 12 GB                  │ 8 GB                        │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ RAM Used        │ 2.5 GB                       │ 4.8 GB             │ 1.2 GB                 │ 2.1 GB                      │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ RAM Free        │ 17 GB                        │ 591 MB             │ 5.8 GB                 │ 1.1 GB                      │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ RAM Available   │ 20 GB                        │ 10 GB              │ 10 GB                  │ 5.7 GB                      │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ Disk Total      │ 388 GB                       │ 301 GB             │ 97 GB                  │ 96 GB                       │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ Disk Used       │ 82 GB (22%)                  │ 46 GB (16%)        │ 34 GB (35%)            │ 35 GB (36%)                 │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ Disk Free       │ 306 GB                       │ 243 GB             │ 64 GB                  │ 62 GB                       │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ Proxy           │ Caddy                        │ Caddy              │ Caddy                  │ Caddy                       │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ Containers      │ Yes (11)                     │ Yes (3)            │ Yes (1)                │ Docker installed, 0 running │
├─────────────────┼──────────────────────────────┼────────────────────┼────────────────────────┼─────────────────────────────┤
│ Critical Issues │ 🔴 opencode-proxy crash loop │ 🟡 Swap 52% used   │ 🟡 No swap, SMM errors │ 🟢 Healthy                  │
└─────────────────┴──────────────────────────────┴────────────────────┴────────────────────────┴─────────────────────────────┘

───

1. Contabo — 149.102.150.185 (contabo2_new1)

Role: Master1 education platform, banks, analytics, automation tools.

Resources
• CPU: 8 cores, load ~1.27 — healthy but opencode-proxy is burning cycles
• RAM: 24 GB total — 2.5 GB used, 20 GB available (plenty of headroom)
• Disk: 388 GB — 82 GB used (22%), 306 GB free
• Swap: 4 GB — only 4 MB used

Reverse Proxy
Caddy on ports 80/443. Config split across /etc/caddy/Caddyfile + /etc/caddy/sites/*.caddy. No Nginx, no Traefik, no Dokploy.

Domains (24+)
┌───────────────────────────────────────────────────────────┬──────────────────┐
│ Domain                                                    │ Purpose          │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ master1.vip                                               │ Main portal      │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ arabic/eng/french/math/physics/bio/bank/banks.master1.vip │ Subject banks    │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ auto.master1.vip                                          │ Automation       │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ share.master1.vip, ui.master1.vip                         │ Share/UI         │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ activation.master1.vip                                    │ Activation codes │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ dentist.promedic1.com                                     │ Dentist app      │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ umami.promedic1.com                                       │ Analytics        │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ cardx/duel/edugamer/index.addict.best                     │ Games/tools      │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ active/agent/listmonk.addict.mom                          │ Agent & email    │
├───────────────────────────────────────────────────────────┼──────────────────┤
│ zeroclaw.addict.best                                      │ Zeroclaw gateway │
└───────────────────────────────────────────────────────────┴──────────────────┘

Apps Running

PM2 (4 apps):
┌──────────────────┬───────────────┬─────────┬────────────────────────────────────────┐
│ App              │ Status        │ Uptime  │ Notes                                  │
├──────────────────┼───────────────┼─────────┼────────────────────────────────────────┤
│ dentist-ide      │ ✅ online     │ 21 days │ 66 MB                                  │
├──────────────────┼───────────────┼─────────┼────────────────────────────────────────┤
│ master1-telegram │ ✅ online     │ 21 days │ 59 MB                                  │
├──────────────────┼───────────────┼─────────┼────────────────────────────────────────┤
│ zeroclaw-gateway │ ✅ online     │ 21 days │ 79 MB (5 restarts)                     │
├──────────────────┼───────────────┼─────────┼────────────────────────────────────────┤
│ opencode-proxy   │ 🔴 crash loop │ 0s      │ 10,679,865 restarts — MODULE_NOT_FOUND │
└──────────────────┴───────────────┴─────────┴────────────────────────────────────────┘

Docker (11 containers, all healthy):
• outline (wiki, :3100)
• umami-app + umami-db (analytics, :3003)
• root-activepieces-1 (automation, :8080)
• listmonk-app + listmonk-db (email, :9000)
• agent-browserless (headless Chrome, :3006)
• root-postgres-1, root-redis-1, outline-db, outline-redis

Systemd:
• pocketbase.service, pocketbase-dentist.service
• biology-exams.service, master1-share.service
• caddy, fail2ban, pm2-root

Workspaces / Folders
• /var/www/ — 25+ app dirs (banks, exams, chemistry, math, physics, z-ai-apps, etc.)
• /root/ — master1-content, dentist-unified, listmonk, zeroclaw, banks-master1, monitoring-backups
• /opt/ — minimal (containerd)

Issues
┌─────────────┬─────────────────────────────────────────────────────────────────────────────┐
│ Severity    │ Issue                                                                       │
├─────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ 🔴 Critical │ opencode-proxy — 10.6M restarts, MODULE_NOT_FOUND error, effectively broken │
├─────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ 🟡 Medium   │ monitoring-stack.service — failed (Prometheus/Grafana/Alertmanager)         │
├─────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ 🟡 Low      │ systemd-networkd-wait-online.service — failed (cosmetic)                    │
├─────────────┼─────────────────────────────────────────────────────────────────────────────┤
│ 🟢 OK       │ All Docker containers healthy, Caddy serving, core apps stable              │
└─────────────┴─────────────────────────────────────────────────────────────────────────────┘

───

2. Hetzner — 46.62.228.173 (hetzner_dokploy)

Role: Promedic1 medical platform + IELTS exam suite.
Note: Despite the SSH key name hetzner_dokploy, Dokploy is NOT installed on this server.

Resources
• CPU: 8 cores, load 0.00 — essentially idle
• RAM: 16 GB — 4.8 GB used, only 591 MB free (but 10 GB available via cache)
• Disk: 301 GB — 46 GB used (16%), 243 GB free
• Swap: 4 GB — 2.1 GB used (52%) — memory pressure under load

Reverse Proxy
Caddy on 80/443. Routes to PocketBase backends, static sites, and Docker containers.

Domains (18)
┌──────────────────────────────────────────────────────┬─────────────────────┐
│ Domain                                               │ Purpose             │
├──────────────────────────────────────────────────────┼─────────────────────┤
│ promedic1.com                                        │ Main medical portal │
├──────────────────────────────────────────────────────┼─────────────────────┤
│ coach/diet/drugs/clinical/female/meals.promedic1.com │ Medical sub-apps    │
├──────────────────────────────────────────────────────┼─────────────────────┤
│ activation.promedic1.com                             │ Activation codes    │
├──────────────────────────────────────────────────────┼─────────────────────┤
│ pocketbases/coach/diet.promedic1.com                 │ PocketBase admin    │
├──────────────────────────────────────────────────────┼─────────────────────┤
│ ielts.fast                                           │ IELTS main          │
├──────────────────────────────────────────────────────┼─────────────────────┤
│ the/exercise/listening/reading/writing-2.ielts.fast  │ IELTS modules       │
└──────────────────────────────────────────────────────┴─────────────────────┘

Apps Running

Systemd services:
• coach-pocketbase, diet-pocketbase, ielts-pocketbase
• ielts-analysis (Speaking API, :8000)
• ielts-tts (Phonetics TTS, :5000)
• autoheal.service (self-healing monitor)
• caddy, fail2ban, docker

Docker (3 containers):
┌──────────────┬───────────────────────┬───────┐
│ Container    │ Status                │ Port  │
├──────────────┼───────────────────────┼───────┤
│ webapp_ielts │ ✅ healthy            │ :8003 │
├──────────────┼───────────────────────┼───────┤
│ the-ielts    │ ✅ running (HTTP 200) │ :8094 │
├──────────────┼───────────────────────┼───────┤
│ uptime-kuma  │ ✅ healthy            │ :3002 │
└──────────────┴───────────────────────┴───────┘

Native processes:
• 3× PocketBase (coach :8092, diet :8091, ielts :8090)
• Python uvicorn on :8000, Python TTS on :5000

Workspaces / Folders
• /var/www/ — promedic1.com, coach, diet-plans, drugs, female, ielts-exercise/listening/reading, clinical, writing-task2
• /root/ — ielts-fast, pocketbases, monitoring-agent, promedic-tests, claude-code, backups
• /opt/ — chatwoot, OpenHands, loki, prometheus, umami (mostly dormant)

Issues
┌───────────┬────────────────────────────────────────────────────────────────────────┐
│ Severity  │ Issue                                                                  │
├───────────┼────────────────────────────────────────────────────────────────────────┤
│ 🟡 Medium │ Swap 52% used — RAM tight under peak load                              │
├───────────┼────────────────────────────────────────────────────────────────────────┤
│ 🟡 Low    │ telegram-notifier.service — failed (intentionally disabled)            │
├───────────┼────────────────────────────────────────────────────────────────────────┤
│ 🟢 OK     │ All IELTS containers responding HTTP 200, Caddy healthy, 42-day uptime │
└───────────┴────────────────────────────────────────────────────────────────────────┘

───

3. AI Developer — 213.199.36.17 (ai_developer_key)

Role: AI/content development — prompting tools, OpenClaw, SMM automation, video AI.

Resources
• CPU: 6 cores, load 0.07 — very idle
• RAM: 12 GB — 1.2 GB used, 10 GB available
• Disk: 97 GB — 34 GB used (35%), 64 GB free
• Swap: None configured — risk if memory spikes

Reverse Proxy
Caddy on 80/443, with many backup Caddyfiles from past edits.

Domains (6)
┌───────────────────────┬─────────────────────┐
│ Domain                │ Purpose             │
├───────────────────────┼─────────────────────┤
│ prodemy.promedic1.com │ Prodemy app         │
├───────────────────────┼─────────────────────┤
│ zag.promedic1.com     │ Zag antibiogram     │
├───────────────────────┼─────────────────────┤
│ prompting.addict.best │ Prompting navigator │
├───────────────────────┼─────────────────────┤
│ openclaw.addict.best  │ OpenClaw agent      │
└───────────────────────┴─────────────────────┘

Apps Running

Systemd:
• grok-overview.service — Prompting Navigator (Python, running 2 days)
• mysql (:3306), redis (:6379), php8.1-fpm
• caddy, fail2ban, docker

Docker (1 container):
┌────────────────┬────────────────┬─────────────────────────────────────────────┐
│ Container      │ Status         │ Notes                                       │
├────────────────┼────────────────┼─────────────────────────────────────────────┤
│ smm_automation │ ⚠️ Up 3 months │ RuntimeError: no running event loop in logs │
└────────────────┴────────────────┴─────────────────────────────────────────────┘

No PM2 apps.

Workspaces / Folders
• /var/www/ — prompting-navigator, zag-antibiogram, html
• /root/ — openclaw (2.1 GB), output-master1 (1.5 GB), video-ai-env (919 MB), whisper-models (466 MB), smm_automation, maxclaw, facebook-campaign, hybrid-kimi-campaign

Issues
┌───────────┬────────────────────────────────────────────────────────────────┐
│ Severity  │ Issue                                                          │
├───────────┼────────────────────────────────────────────────────────────────┤
│ 🟡 Medium │ smm_automation container logging async errors (still running)  │
├───────────┼────────────────────────────────────────────────────────────────┤
│ 🟡 Medium │ No swap — OOM risk under memory pressure                       │
├───────────┼────────────────────────────────────────────────────────────────┤
│ 🟢 OK     │ Caddy, MySQL, Redis, grok-overview all healthy, 123-day uptime │
└───────────┴────────────────────────────────────────────────────────────────┘

───

4. Hostinger — 31.97.122.87 (hostinger)

Role: Lightweight static sites — Taibaat, Diaa, Fast Diet.

Resources
• CPU: 2 cores, load ~1.03 — moderate for 2-core box
• RAM: 8 GB — 2.1 GB used, 5.7 GB available
• Disk: 96 GB — 35 GB used (36%), 62 GB free
• Swap: 4 GB — 44 MB used

Reverse Proxy
Caddy on 80/443. No Nginx.

Domains (3)
┌─────────────────────┬──────────────────┐
│ Domain              │ Purpose          │
├─────────────────────┼──────────────────┤
│ diaa.master1.vip    │ Diaa Taibaat app │
├─────────────────────┼──────────────────┤
│ taibaat.master1.vip │ Taibaat English  │
├─────────────────────┼──────────────────┤
│ fast.promedic1.com  │ Fast Diet app    │
└─────────────────────┴──────────────────┘

Apps Running
• Caddy only — serves static files from /var/www/
• Docker installed but 0 containers running
• No PM2, no PocketBase, no databases

Workspaces / Folders
• /var/www/ — diaa-taibaat, taibaat, taibaat-copy2, fast-diet, fast-diet-releases (14 build versions)
• /root/ — output-master1 (12 GB), Diaa-taibaat, taibaat, taibaat-English, picoclaw, video-ai-editor, master1-content

Issues
┌────────────┬───────────────────────────────────────────────────────────────────┐
│ Severity   │ Issue                                                             │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ 🟢 Healthy │ No failed services, no crash loops                                │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ 🟡 Low     │ Load ~1.0 on 2-core CPU — fine for static sites                   │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ 🟡 Low     │ 14 old fast-diet release builds eating ~26 MB (cleanup candidate) │
└────────────┴───────────────────────────────────────────────────────────────────┘

───

Cross-Server Architecture

                    Internet
                       │
          ┌────────────┼────────────┐
          │            │            │
     Caddy:443    Caddy:443    Caddy:443    Caddy:443
          │            │            │            │
   Contabo VPS    Hetzner VPS   AI Dev VPS   Hostinger VPS
  149.102.150    46.62.228     213.199.36    31.97.122
          │            │            │            │
   Master1/Banks  Promedic/IELTS  AI/OpenClaw  Static Sites
   11 Docker      3 Docker        1 Docker     0 Docker
   4 PM2          0 PM2           0 PM2        0 PM2

All four servers use Caddy as the sole reverse proxy. No Nginx, Traefik, or Dokploy anywhere.

───

Priority Action Items

┌─────────────┬───────────┬───────────────────────────────────────────────────────────────────┐
│ Priority    │ Server    │ Action                                                            │
├─────────────┼───────────┼───────────────────────────────────────────────────────────────────┤
│ 🔴 Now      │ Contabo   │ Fix or disable opencode-proxy — 10.6M restarts, MODULE_NOT_FOUND  │
├─────────────┼───────────┼───────────────────────────────────────────────────────────────────┤
│ 🟡 Soon     │ Hetzner   │ Investigate swap usage (52%) — consider RAM upgrade or app tuning │
├─────────────┼───────────┼───────────────────────────────────────────────────────────────────┤
│ 🟡 Soon     │ AI Dev    │ Fix smm_automation async loop error; add swap file                │
├─────────────┼───────────┼───────────────────────────────────────────────────────────────────┤
│ 🟢 Optional │ Contabo   │ Restart monitoring-stack.service or remove if unused              │
├─────────────┼───────────┼───────────────────────────────────────────────────────────────────┤
│ 🟢 Optional │ Hostinger │ Clean old fast-diet-releases builds                               │
└─────────────┴───────────┴───────────────────────────────────────────────────────────────────┘
Removed opencode and opencode-proxy from Contabo (149.102.150.185).

What was removed

┌──────────────────────────────┬──────────────────────────────┐
│ Item                         │ Action                       │
├──────────────────────────────┼──────────────────────────────┤
│ opencode-proxy PM2 process   │ Deleted (was at 10.6M+       │
│                              │ restarts)                    │
├──────────────────────────────┼──────────────────────────────┤
│ /root/opencode-proxy.js      │ Already missing — confirmed  │
│                              │ gone                         │
├──────────────────────────────┼──────────────────────────────┤
│ PM2 logs (opencode-proxy-*)  │ Deleted                      │
├──────────────────────────────┼──────────────────────────────┤
│ opencode-ai npm global       │ Uninstalled                  │
│ package                      │                              │
├──────────────────────────────┼──────────────────────────────┤
│ /root/.opencode              │ Deleted                      │
├──────────────────────────────┼──────────────────────────────┤
│ /root/.config/opencode       │ Deleted                      │
├──────────────────────────────┼──────────────────────────────┤
│ /root/.local/share/opencode  │ Deleted                      │
│ (DB)                         │                              │
├──────────────────────────────┼──────────────────────────────┤
│ /root/.local/state/opencode  │ Deleted                      │
├──────────────────────────────┼──────────────────────────────┤
│ /root/.cache/opencode        │ Deleted                      │
├──────────────────────────────┼──────────────────────────────┤
│ .bashrc PATH entry           │ Removed                      │
├──────────────────────────────┼──────────────────────────────┤
│ PM2 startup dump             │ Saved without opencode-proxy │
└──────────────────────────────┴──────────────────────────────┘

Still running (untouched)

• dentist-ide
• master1-telegram
• zeroclaw-gateway
• All Docker containers
• Caddy — no opencode routes existed; port 8086 is master1-telegram /notify-telegram

Verification

• opencode binary: gone
• opencode processes: none
• opencode files: none found
• CPU idle: 98.5% (crash loop stopped)

The critical CPU-burning crash loop is eliminated. Load should settle further over the next few minutes.
=======================================================

