# Rescue Mode

Source: https://support.kapsulehost.com/en-nz/cloud-servers-rescue

Rescue mode starts your server from a recovery system instead of its own operating system, so you can repair a server that will not boot or that you cannot sign in to. The same tab can also set a new root password, where your server supports it.

## When to Use It

- The server does not start after an update or a change to its settings.
- You lost your SSH key and cannot sign in.
- A broken setting inside the server, such as in `/etc/fstab`, stops it starting.
- You need to copy data off a disk the server cannot boot from.

If you only need a new root password, use **Reset Root Password** instead. It is quicker, and it is described below.

## Open the Rescue Tab

1. Sign in to [KPanel](https://kpanel.kapsulehost.com).
2. In the sidebar, open the section for your server type, for example **Standard Cores**, then click your server.
3. In the server's menu, click **Rescue**.

The **Rescue** tab is shown when your server supports it. If you do not see it, open a ticket from **Support** and we will help you in.

![The Rescue tab on a server in KPanel](https://support.kapsulehost.com/help/screenshots/cloud-servers-rescue.e664b899.webp)

## Turn On Rescue Mode

1. Click **Turn On Rescue Mode**, then confirm it is you. KPanel asks every time.
2. KPanel shows a **Username** and **Password**. "These sign-in details are shown once. Save them now." Click **Copy** next to each.
3. If the server is not in rescue yet, click **Reboot** at the top of the page.
4. Sign in by SSH with the rescue details, for example `ssh root@203.0.113.10`.

If KPanel says "Sign in with this server's own SSH key.", sign in with the key you added when you ordered the server.

## Repair the Server

In rescue mode your server's own disk is not in use, so you can mount it and fix it. A typical session:

```sh
lsblk                      # find your server's disk, for example sda1
mount /dev/sda1 /mnt       # mount it
nano /mnt/etc/fstab        # fix the broken file
umount /mnt                # unmount when you are done
```

To put an SSH key back, add it to `/mnt/root/.ssh/authorized_keys` before you unmount.

## Turn Off Rescue Mode

1. Click **Turn Off Rescue Mode**, then confirm it is you.
2. Restart the server with **Reboot** at the top of the page.

The server starts from its own disk again. Check it comes back as **Running**, then sign in as usual.

## Reset the Root Password

1. On the **Rescue** tab, under **Root Password**, click **Reset Root Password**.
2. Confirm it is you.
3. Copy the new password straight away. "This password is shown once. Save it now."

The current password stops working at once. You can reset it 3 times an hour on each server.

> **Warning:** We never show a rescue or root password again and never email it. If you lose it, turn rescue mode off and on again, or reset the root password again.

## Security Emails

Turning rescue mode on, turning it off and resetting the root password each send a security email. If you are not an account owner, the owners get a copy that says who made the change. The email never contains the password.

## Hourly GPU Servers

On an hourly GPU server, turning rescue mode on or off starts the server, so the account needs enough credit, just as for **Start Server**. See [Hourly GPU and Credits](https://support.kapsulehost.com/en-nz/cloud-servers-gpu).

## Troubleshooting

**"You can reset the root password 3 times an hour. Try again later."** Wait, then try again.

**"Confirm it is you, then try again."** The sign-in check was skipped or timed out. Click the button again and finish the check.

**The rescue sign-in is refused.** Check you copied the whole password. If it is lost, turn rescue mode off and on again for new details.

**"Your role can view this server but cannot change it."** Only the Owner and Admin roles can use rescue mode. Ask the account owner.

## Related Articles

- [Connecting to Your Server by SSH](https://support.kapsulehost.com/en-nz/cloud-servers-ssh-connect)
- [Adding and Managing SSH Keys](https://support.kapsulehost.com/en-nz/cloud-servers-ssh-keys)
- [Rebuilding a Server](https://support.kapsulehost.com/en-nz/cloud-servers-rebuild)
- [Server Firewall](https://support.kapsulehost.com/en-nz/cloud-servers-firewall)
- [Server Troubleshooting](https://support.kapsulehost.com/en-nz/cloud-servers-troubleshooting)
