> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.ex2.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to reinstall the operating system on your Ex2 VPS

Reinstalling gives you a clean server. **It destroys all data on the VPS** — there is no undo, so back up first.

**Before you start:**
1. Back up everything you need **off the VPS**: website files, databases (export with `mysqldump`), and any config files you customized (`/etc/nginx`, `/etc/apache2`, firewall rules, cron jobs). Verify the backups open correctly on your own computer.

**The reinstall:**
2. Log in to your Ex2 account → **Services** → your VPS → open the **VPS management panel**.
3. Find **Reinstall** (sometimes labeled **Rebuild**) and choose the operating system and version you want.
4. Confirm — the panel will warn you that all data will be erased. The reinstall typically takes a few minutes.
5. When it finishes, note the **new root credentials** (shown in the panel or emailed to you). Your IP address and plan stay the same.

**After the reinstall:**
6. Connect via SSH with the new credentials and immediately run the OS updates.
7. Re-harden the server: change the SSH port or disable password login in favor of SSH keys, enable the firewall, and install fail2ban or equivalent.
8. Restore your data from the backups and test every service before pointing production traffic at it.

**Good to know:** if you only need to fix a broken config, a snapshot restore (see article 5) is faster and safer than a full reinstall. Reinstall when you want a genuinely clean slate — a different OS, a compromised server, or configuration drift you can't untangle.