Research-Stack/4-Infrastructure/infra/RECOVERY.md
allaun 318db01e31 refactor(infra): decommission AWS deployment artifacts
Remove EC2/RDS deployment scripts, EC2 watchdog, and RDS substrate
provisioning files. Drop the legacy AWS API MCP server from all IDE
configs. Replace hardcoded AWS proof-server and RDS default endpoints
with localhost/env-only placeholders.

Deleted:
- 4-Infrastructure/infra/deploy_aws_language_proof_server.sh
- 4-Infrastructure/infra/aws_language_proof_server_user_data.sh
- 4-Infrastructure/infra/ec2-configuration.nix
- 4-Infrastructure/infra/ec2_idle_watchdog.py
- 4-Infrastructure/infra/ec2-idle-watchdog.service
- 4-Infrastructure/infra/ec2-idle-watchdog.timer
- 4-Infrastructure/deploy/rds-substrate/*

Changed:
- .mcp.json, .cursor/mcp.json, .roo/mcp.json, .vscode/mcp.json:
  remove aws server, make remote-lean-proof URL env-only
- .vscode/settings.json: remoteLeanProof.url -> localhost
- 4-Infrastructure/infra/remote_lean_proof_mcp.py: default URL -> localhost
- ene-rds/ene-session-sync: default RDS_HOST -> localhost
- RECOVERY.md, INFRASTRUCTURE.md, TODO_MAP.md: remove AWS/EC2 refs

Build: cargo check ene-rds OK; python3 -m py_compile OK; JSON valid
2026-06-19 22:42:34 -05:00

1.5 KiB

Recovery Guide

Recovery is now Tailscale-first. Bare-metal NixOS nodes are rebuilt from their host-specific configs in 4-Infrastructure/deploy/<hostname>/ and the secrets in secrets/ (gitignored).

Critical Files (committed to repo)

  • 4-Infrastructure/deploy/<node>/configuration.nix — Host-specific NixOS configs
  • 5-Applications/AppFlowy-Cloud/docker-compose.minimal.yml — Custom AppFlowy Cloud compose
  • 4-Infrastructure/infra/nixos-setup-cred-server.sh — Credential server bootstrap
  • 4-Infrastructure/infra/credential_provider.py — Credential resolution chain
  • 4-Infrastructure/infra/credential_server.py — Webhook handler
  • 5-Applications/AppFlowy-Cloud/.env.example — Sanitized AppFlowy Cloud env template

Critical Files (NOT committed — in secrets/ dir, gitignored)

  • credentials.json — All API provider keys
  • appflowy.env — AppFlowy Cloud env (PostgreSQL host, JWT, encryption key)
  • tailscale-auth.key — Tailscale auth key

Recovery Flow

  1. Install NixOS on replacement bare-metal host and join Tailscale.
  2. Copy the host-specific configuration.nix to /etc/nixos/.
  3. Restore secrets from gitignored backup.
  4. nixos-rebuild switch — brings up Caddy, credential server, Forgejo, Heimdall.
  5. Deploy AppFlowy: copy compose + .env to /var/lib/AppFlowy-Cloud/, start stack.
  6. Reconnect AppFlowy to the PostgreSQL instance defined in appflowy.env.
  7. Forgejo repos lost unless backed up separately.
  8. Heimdall tiles lost unless backed up separately.