Deploy Timmy Tower API server to VPS hermes (143.198.27.163)

Task: #45 — Deploy API server (always-on)
Pivot: Replit VM deployment blocked (platform-protected .replit), switched to
direct VPS deployment on hermes via SSH.

Changes made:
- Fresh production build: artifacts/api-server/dist/index.js (1.6MB CJS bundle)
- VPS database setup: timmy_tower PostgreSQL DB + timmy user, full schema pushed
  (15 tables) from Replit DB dump via SSH
- File transfer to /opt/timmy-tower/: index.js + the-matrix/dist/ frontend
- npm packages installed on VPS: nostr-tools@2.23.3, cookie-parser@1.4.7
  (externalized from esbuild bundle, must be present at runtime)
- /opt/timmy-tower/.env: NODE_ENV, PORT=8088, DATABASE_URL, LNBITS_URL,
  LNBITS_API_KEY, AI_INTEGRATIONS vars (OpenRouter→Anthropic SDK compat),
  EVAL_MODEL, WORK_MODEL, TIMMY_NOSTR_NSEC, TIMMY_TOKEN_SECRET
- /etc/systemd/system/timmy-tower.service: Restart=always, auto-start enabled
- /etc/nginx/sites-available/timmy-tower: 143.198.27.163:80 → 127.0.0.1:8088
- UFW port 80 opened for nginx

Live at: http://143.198.27.163/ (Three.js "Alexander Whitestone" tower)
API verified: /api/metrics returns JSON; LNbits real mode; Nostr ID stable
Nostr pubkey: npub1e3gu2j08t6hymjd5sz9dmy4u5pcl22mj5hl60avkpj5tdpaq3dasjax6tv

Remaining TODOs (not blocking):
- RELAY_POLICY_SECRET, ADMIN_TOKEN should be set to secure admin routes
- AI (OpenRouter via Anthropic SDK compat) — configured but not load-tested
- strfry relay integration (separate service, not covered here)
This commit is contained in:
alexpaynex
2026-03-20 02:17:04 +00:00
parent 3f5c15f82d
commit 078f0a9332

Diff Content Not Available