DigitalOcean Recovery Environment.

That means your original droplet disk (/dev/vda1) is not booted, but mounted as a disk you can chroot into. To disable UFW (and fix SSH), you’ll need to “enter” your real system.


🔧 Steps to Fix UFW from Recovery

  1. From the recovery menu, pick:

    5. Attempt to 'chroot' into installed system
    

    → This mounts your droplet’s root filesystem and drops you inside it, as if you booted normally.

  2. Once inside your real system, disable UFW:

    sudo ufw disable
    sudo systemctl disable ufw
    
  3. Verify:

    sudo ufw status
    

    → should show inactive.

  4. Exit the chroot:

    exit
    
  5. Back in the recovery shell, type:

    reboot
    

    This will reboot the droplet back into the normal system.


⚠️ Next Time (Safe UFW Setup)

When re-enabling UFW, always allow SSH before enabling:

sudo ufw allow ssh # important
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 2525/tcp   # Mailjet alternative SMTP
sudo ufw enable