Find us on social media
ReinstallOSVPS3 min read
Reinstall the operating system
When to reinstall, backup first, process from panel, available OS options and post-install steps.
When to reinstall
Consider reinstalling the OS when:
- The server is compromised and you can't clean it
- You want to change distribution (e.g., Ubuntu to Debian)
- The system is so broken it's faster to start fresh
- You want a clean environment for a new project
Before reinstalling: Backup
Reinstalling erases ALL data on the disk. Back up:
bash
# Important configuration files
tar -czf /tmp/config-backup.tar.gz /etc/nginx /etc/ssh /etc/fail2ban
# Application data
tar -czf /tmp/www-backup.tar.gz /var/www
# Database
mysqldump -u root -p --all-databases > /tmp/all-databases.sql
# List of installed packages
dpkg --get-selections > /tmp/packages.listDownload backups to your local machine before proceeding.
Reinstallation process
- Log in to the client area:
billing.baires.host - Go to Services → Your VPS
- Find the Reinstall OS or Rebuild option
- Choose the operating system
- Confirm you understand all data will be erased
- Wait 2-5 minutes for completion
Available operating systems
- Ubuntu 22.04 LTS - Recommended for most users
- Ubuntu 24.04 LTS - Latest LTS version
- Debian 12 - Stable and minimalist
- AlmaLinux 9 - CentOS alternative
- Rocky Linux 9 - RHEL compatible
- Windows Server - Available on select plans
Post-install steps
After reinstalling:
bash
# 1. Update the system
sudo apt update && sudo apt upgrade -y
# 2. Create non-root user
adduser deploy
usermod -aG sudo deploy
# 3. Configure secure SSH
# (see hardening guide)
# 4. Install firewall
sudo apt install -y ufw
sudo ufw allow ssh
sudo ufw enable
# 5. Install fail2ban
sudo apt install -y fail2ban
sudo systemctl enable fail2banRecommendations
- Always backup before reinstalling (there's no going back)
- Choose the latest LTS version for maximum support
- After reinstalling, apply basic hardening immediately
- Document your configuration to reproduce it quickly
- Consider using provisioning scripts (Ansible, shell scripts) to automate setup
Was this guide helpful?