Operate the server

Recover or retire the Droplet

Use the recovery console carefully, rebuild compromised systems, and remove every billable resource when the server is no longer needed.

8 minute lesson

~~~

Use the DigitalOcean recovery console when the Droplet is running but SSH is unavailable. It gives you an independent path for repairing access without opening insecure network authentication.

Start by collecting evidence:

df -h
sudo systemctl --failed
sudo systemctl status ssh --no-pager
sudo sshd -t
sudo ufw status numbered
sudo journalctl -u ssh -b --no-pager

A full disk, invalid SSH configuration, wrong firewall rule, or failed service needs a different fix. Change only the failing layer. If a new SSH drop-in caused the outage, move it aside, validate, reload SSH, and test a fresh remote connection before leaving the console.

Do not treat suspected compromise as an ordinary configuration failure. Preserve the relevant logs and timeline, isolate the server when possible, and rotate credentials from a trusted computer. Rebuild from a known image and verified data backup. Removing one suspicious process does not prove an attacker left no other access.

Retire a server without leaving loose ends

Before destruction:

  1. move DNS or traffic to the tested replacement
  2. keep the old service available until relevant DNS caches expire
  3. make and restore-test the final data backup
  4. copy only the logs required by your retention policy
  5. rotate credentials that will no longer be used
  6. verify no jobs or integrations still call the old address

Then destroy the Droplet in the control panel. Powering it off does not end billing.

Inspect the project afterward for resources that have their own lifecycle: volumes, snapshots, backups, reserved IPs, load balancers, and firewalls. Remove only the resources you have positively identified as unused. A snapshot kept for retention may be intentional; an unattached volume can still contain both sensitive data and ongoing cost.

The destructive action has no simple rollback. Confirm the Droplet name, project, address, replacement health, and final backup before clicking Destroy.

Your action is to write two short runbooks before you need them: “SSH unavailable” and “retire this Droplet.” Include the recovery-console path, verification commands, backup location, DNS owner, and exact evidence required before destruction.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →