1.7 KiB
1.7 KiB
Recovery on a clean VPS
Scope and safety
The bootstrap below prepares Ubuntu packages and directories only. It is not a complete recovery: production secrets, data, reverse proxy, TLS, registry credentials, backup restore, and deploy-helper still require owner-controlled setup. Run only on the new recovery host after verifying its identity. Never run recovery commands against the existing production by accident.
Procedure
- Provision a clean Ubuntu Server 24.04 host and confirm hostname, IP, console access, and a tested owner recovery path.
- Create the SSH-authorized
codexaccount without sudo or Docker group access. Preserve the host's existing root SSH and firewall policy until an owner has reviewed the change. - Check out the approved Git revision and run
sudo bash infra/bootstrap/bootstrap-ubuntu-24.04.sh. It installs Docker Engine, Compose, Git, Docker log limits, and target directories. - Install the reviewed reverse proxy and its HTTPS configuration after DNS points to the recovery host. Verify Cloudflare Full (strict) end to end.
- Provide production configuration and secret files through the owner's protected channel; never commit or paste secret values into chat.
- Restore the latest verified backup to the new host. Validate SQLite databases, corpus checksums, and the OpenSearch snapshot/index before serving traffic.
- Start the approved image digest, verify container health and
https://akyldash.kg/review, then record actual versions and checks in CURRENT_STATE.md.
Do not repoint DNS or retire the old host until the owner verifies recovery and approves the cutover. The restore and cutover have not been practiced yet.