Wiki Index
16 / 50 entity pages. Last regenerated: 2026-07-24. See SCHEMA.md for the entity-page contract and README.md for purpose, conventions, and authority — including § Tradeoffs .
All entity pages currently carry status: draft: the infra/
artifacts exist and are described accurately, but the migration has
not yet run against a production droplet (see
SCHEMA.md § Status Values
). The one exception is the
canonical migration hub, which cites only the plan.
Concept
Abstract ideas, contracts, and design decisions.
- Render-to-DigitalOcean Migration
— (canonical) the hub. Why
apps/server+ PostgreSQL + ewiki leave Render for one DigitalOcean droplet behind Cloudflare; the locked-decisions architecture, the honest cost-is-a-wash / control-is-the-driver read, the accepted single-box SPOF mitigated by tested R2 backups, and the Phase 0→7 sequence with Render kept warm as the rollback target.
Tutorial
Step-by-step procedures, each owning a runnable infra artifact.
Foundations — host provisioning & hardening (Phase 1)
- Provision Droplet
— owns
infra/cloud-init.yaml. First-boot bootstrap: the non-rootoperatoruser + authorized key, base apt packages, timezone, and the/etc/laanchor for the deploy.env. - SSH Hardening
— owns
infra/scripts/05-user-and-ssh.ps1. Key-only login via a managed sshd drop-in; disables root login and password auth, with the two-session anti-lockout sequence. - UFW Firewall
— owns
infra/scripts/06-ufw.ps1. Default-deny inbound; allow SSH + 80/443 (443 later narrowed to Cloudflare IPs by Cloudflare TLS ). - Fail2ban and Unattended Upgrades
— owns
infra/scripts/07-fail2ban-upgrades.ps1. SSH brute-force bans + automatic security patching — the patching responsibility you now own instead of Render.
Runtime (Phase 2)
- Node Runtime
— owns
infra/scripts/10-node.ps1. fnm at/opt/fnmpinning Node 24.18.0 and corepack/pnpm 10.32.1 to match.node-version.
Web — reverse proxy & edge (Phase 2)
- Nginx Reverse Proxy
— owns
infra/nginx/api.conf+infra/scripts/20-nginx.ps1. Proxiesapi.to127.0.0.1:3000with the WebSocket-upgrade headers Socket.IO needs; the plain-HTTP stage before TLS. - Cloudflare TLS
— owns
infra/scripts/21-cloudflare-tls.ps1. Origin Certificate + Full(strict), 80→443 redirect, and UFW 443 restricted to live Cloudflare IP ranges.
Data (Phase 2)
- PostgreSQL Setup
— owns
infra/scripts/30-postgres.ps1. Self-hosted PostgreSQL 18 on localhost, scram-sha-256, memory tuning sized from the droplet’s RAM; creates thelarole and database. - Backup and Restore
— owns
infra/scripts/50-backup.ps1+infra/scripts/51-restore.ps1. Nightlypg_dump→ R2 (same keys and retention as the Render-era workflow); restore into a scratch DB with row counts. The Phase 4 gate. - PostgreSQL Maintenance
— owns
infra/scripts/52-vacuum-reclaim.ps1. One-shotVACUUM FULLto reclaim space frombgio.matches.
App & Ops — deploy (Phases 3–4)
- Deploy Server
— owns
infra/scripts/40-app-deploy.ps1infra/systemd/la-server.serviceinfra/.env.example. Clone, server-only build from/opt/node, migrations, unit install, restart, and a/healthgate.
- Monitoring
— owns
infra/scripts/60-monitor.ps1. 5-minute on-box checks with a dead-man’s-switch ping, plus the external uptime check onapi.. - Deploy Pipeline
— owns the droplet side of
deploy-on-push (
41-deploy-user.ps1, thela-deploygate). The engine repo’sdeploy-server.ymldeploys the CI-tested commit after CI passes onmain, over SSH to the gate →40-app-deploy.ps1(one deploy code path).
Guide
Reference explainers for a subsystem or contract without a single runnable script.
- Ubuntu Droplet Setup
— the umbrella
sequence for standing up the droplet: the ordered Phase 1–3 bring-up
(provision → harden → runtime/web/data → first deploy), linking each
step to its owning page and
infra/artifact. Duplicates none of their mechanics; it is the linear path through them. - Droplet Snapshots
— DigitalOcean snapshots as
whole-host rollback points across the migration lifecycle
(
pre-hardening-baseline,post-bootstrap-hardened), how they differ from automated Backups, and why a snapshot is not a substitute for the testedpg_dump→ R2 database restore. - Secrets and Env
— owns
infra/.env.example. The ~15sync:falsevariables (auth, Stripe, analytics tokens, R2, Brevo) as the environment contract; real values live only in/etc/la/.envat mode 600. - Systemd Service
— owns
infra/systemd/la-server.service. Thela-serverunit:ExecStartthrough fnm-pinned Node,EnvironmentFile,Restart=on-failure, and reboot survival — why systemd over PM2.
Reference
Standing lookups — status views and tables.
- Migration Checklist
— live progress against
the PLAN §6
phase sequence: the three legs (GitHub
✅, Cloudflare Pages /
play✅, Ubuntu droplet 🔲) and a phase-by-phase status table. A status overlay on the plan, not a second copy; the tested-restore drill is flagged as the real cutover gate.
Pages by owning artifact
| Wiki page | Owning artifact(s) |
|---|---|
| Provision Droplet | infra/cloud-init.yaml |
| SSH Hardening | infra/scripts/05-user-and-ssh.ps1 |
| UFW Firewall | infra/scripts/06-ufw.ps1 |
| Fail2ban and Unattended Upgrades | infra/scripts/07-fail2ban-upgrades.ps1 |
| Node Runtime | infra/scripts/10-node.ps1 |
| Nginx Reverse Proxy | infra/nginx/api.conf, infra/scripts/20-nginx.ps1 |
| Cloudflare TLS | infra/scripts/21-cloudflare-tls.ps1 |
| PostgreSQL Setup | infra/scripts/30-postgres.ps1 |
| Deploy Server | infra/scripts/40-app-deploy.ps1, infra/systemd/la-server.service, infra/.env.example |
| Deploy Pipeline | infra/scripts/41-deploy-user.ps1, infra/scripts/la-deploy.ps1 (engine: deploy-server.yml) |
| Backup and Restore | infra/scripts/50-backup.ps1, infra/scripts/51-restore.ps1 |
| PostgreSQL Maintenance | infra/scripts/52-vacuum-reclaim.ps1 |
| Monitoring | infra/scripts/60-monitor.ps1 |
| Secrets and Env | infra/.env.example |
| Systemd Service | infra/systemd/la-server.service |
| Droplet Snapshots | (guide — DO snapshot practice; cites docs/PLAN.md §5.1, docs/DECISIONS.md) |
| Ubuntu Droplet Setup | (guide — sequences the Phase 1–3 pages; cites docs/PLAN.md, infra/cloud-init.yaml) |
| Migration Checklist | (reference — status overlay; cites docs/PLAN.md §6, docs/DECISIONS.md) |
| Render-to-DigitalOcean Migration | (concept — cites docs/PLAN.md) |
Not yet documented
Pages land when their owning artifact exists in infra/. Planned by
PLAN.md §5
but not yet present, so
intentionally absent from this wiki:
backup-restore—infra/scripts/50-backup.ps1/51-restore.ps1(pg_dump → R2, restore drill)postgres-maintenance—infra/scripts/52-vacuum-reclaim.ps1monitoring—infra/scripts/60-monitor.ps1cutover/disaster-recovery— orchestration procedures