Reinstalling Your Server's Operating System

Updated: 4 December 20264 min read33 viewsMarkdown

Reinstalling the operating system puts your server back into a clean, freshly delivered state, or lets you switch to another distribution. The process wipes the whole disk, so back up first.

Illustration of a server with a circular refresh arrow and an operating system picker card
A reinstall starts the server from scratch with the OS you pick.

When does a reinstall make sense?

  • The configuration is broken and a clean start would be quicker than fixing it piece by piece.
  • You want a different distribution, for example moving from Ubuntu to AlmaLinux.
  • You suspect the server has been compromised. A clean install is the safest way out.
  • You are repurposing the server for a new project.
Everything on the disk is erased

A reinstall permanently removes files, databases, users and settings. It cannot be undone. Copy everything you need off the server before you continue.

Before you start

  • Take a backup. Copy your web files, database dumps (mysqldump or pg_dump) and key configuration (important files in /etc, cron jobs) to your computer or other storage. For example:
    mysqldump -u root -p --all-databases > all-databases.sql
    tar -czf site-backup.tar.gz /var/www
    scp root@203.0.113.10:/root/site-backup.tar.gz .
  • Write down what is installed: PHP version, web server, open ports and so on. Rebuilding is faster with a list.
  • Check your client area login works before you begin.

Reinstalling step by step

  1. Sign in to the client area and click My services in the left menu.
  2. Select your server. Open the VDS from the list to reach its service details.
  3. Open the Management tab. If your server's platform supports it, you will find the reinstall option and a list of operating systems here. Choose one, confirm the warning and start the reinstall.
  4. Wait for it to finish. The server is unreachable while it reinstalls. When it is done, the new access details appear in the service details or arrive by email.
Diagram: pick the server from the services list, open the management tab, choose an OS and start
1: My services, 2: the server's Management tab, 3: pick an OS and confirm.
No reinstall option?

Some servers cannot be reinstalled from the panel. In that case, go to Support tickets > Open a ticket, pick your server in Related Service and tell us which OS you want. Please also confirm that you have a backup and accept that the data will be erased.

After the reinstall

  1. Remove the old host key on your computer. The server's SSH key has changed, so your first connection will show a warning. Clear the old entry with ssh-keygen -R 203.0.113.10.
  2. Connect with the new details and change the root password: passwd
  3. Update the system: apt update && apt upgrade -y on Ubuntu/Debian, dnf upgrade -y on AlmaLinux/Rocky.
  4. Apply basic hardening: SSH keys, a firewall and automatic updates.
  5. Restore your backup and test your services.

Troubleshooting

SymptomLikely causeFix
SSH warns that the host identification has changedThe reinstall created a new host keyRemove the old entry with ssh-keygen -R.
The old password no longer worksA new password was set during the installCheck your service details and your email.
The reinstall is taking a very long timeThe install process is stuckOpen a ticket and tell us which server it is.

Frequently asked questions

Will my IP address change?

Usually it stays the same. Check your service details after the reinstall to be sure.

Can you recover my data after a reinstall?

No. The disk is wiped completely, so your own backup is essential.

Which OS should I choose?

Choose the distribution you know best. Ubuntu is easy to start with and has a large community. AlmaLinux and Rocky Linux are RHEL-compatible with long support cycles.

Need a hand? Open a ticket from the client area or contact us. To browse server plans, see VDS servers.

Was this article helpful?
Thank you for your feedback.