Skip to content
Back to blog

Magichosting

Changing the operating system on your VPS: reinstall, custom ISO and automation

E
Elias Bieber
Estimated reading time: 5 min

From Debian to Ubuntu, from Linux to Windows Server or your own ISO: how to change your VPS operating system safely – with a backup first, the available templates and automation tips.

VPSOperating systemDebianUbuntuWindows Server

The short answer

On a KVM VPS at MagicHosting you change the operating system in the dashboard with Reinstall: pick a template, confirm, done. The choice includes Debian 9 to 13, Ubuntu 16.04 to 24.10, CentOS 7 and 8 as well as Windows Server 2022 and 2025 – set up via cloud-init. Alternatively, install your own ISO through the browser console.

Before you start: back up your data

  1. In the dashboard under Backups, create a manual backup (or check the latest scheduled one).
  2. Store important files and database dumps outside the server as well, for example with rsync or scp to another machine.
  3. Write down what you need again after the installation: open ports and firewall rules, reverse DNS, cron jobs, configuration files.
bash
# Example: dump all databases and copy directories to another machine
mysqldump --all-databases --single-transaction > /root/all-databases.sql
rsync -avz /etc /var/www /root/all-databases.sql backup@your-backup-host:/backups/vps/

How to plan backups sensibly and test the restore: backups with the 3-2-1 rule.

Option 1: reinstall from a template

The fastest way. Templates are prepared images that configure network, hostname and credentials via cloud-init on first boot.

  1. Open the server in the dashboard and choose Reinstall.
  2. Select the operating system, for example Debian 13 or Ubuntu 24.04 LTS for web and game servers, Windows Server 2025 for Windows applications.
  3. Confirm – the server is set up again and starts with the new system.
  4. Sign in, install updates and set up your services again.
FamilyVersionsNote
Debian9, 10, 11, 12, 13Debian 13 recommended for new servers
Ubuntu16.04, 18.04, 20.04, 22.04, 24.04, 24.1024.04 LTS recommended for new servers
CentOS7, 8only for existing applications that require it
Windows Server2022, 2025at least 40 GB storage; a valid licence is required for long-term use

Option 2: install your own ISO

If you need a system that is not available as a template – another Linux distribution, FreeBSD or a special appliance image – you attach your own ISO on KVM servers and install it through the noVNC console in the browser. After the installation you eject the ISO in the dashboard so the server boots from its disk.

For virtualisation and backup systems the dashboard also provides installers for Proxmox VE 9.1, Proxmox Backup Server 4.1, Proxmox Mail Gateway 9.0 and Proxmox Datacenter Manager 1.0. More at Proxmox VPS.

Option 3: automate the reinstall

If you rebuild servers often, for tests or client projects, capture the setup after the installation as a script. A fresh server is then configured exactly as before within minutes.

  • Configuration as code:: Ansible playbooks or a shell script in a Git repository install packages, users, firewall and services automatically after the reinstall.
  • Containers:: With Docker Compose your services live in a file – after the reinstall you only need Docker, the Compose file and the restored volumes. See <a href="/en/blog/docker-compose-produktivbetrieb-checkliste">Docker Compose in production</a>.
  • SSH keys:: Store your public keys in the dashboard so you can continue without password sign-in after the installation.
  • Reselling API:: Resellers can reinstall servers with an API key (<code>POST /servers/{vmid}/reinstall</code>) and connect their own panels or CI pipelines. Details at <a href="/en/reselling">reselling</a>.
bash
# Example: apply the base configuration with Ansible after the reinstall
ansible-playbook -i "203.0.113.10," -u root base-config.yml

KVM or LXC – what works where?

KVM VPSLXC container
Operating systemsLinux templates, Windows Server, your own ISOLinux templates: Debian, Ubuntu, Alpine, Rocky Linux, AlmaLinux, Fedora, openSUSE, Arch Linux
Own kernelyes (e.g. WireGuard in the kernel or kernel modules)no – the container shares the host's kernel
Windowsyes (2022, 2025)no
Own ISOyesno

If you need Windows, your own kernel or your own ISO, a KVM VPS is the right choice. The differences in detail: KVM or LXC?

Frequently asked questions

Is all data lost during a reinstall?

Yes. The disk is rewritten. Back up your data beforehand with a backup in the dashboard and additionally outside the server.

Which operating systems can I install on a VPS?

As templates Debian 9–13, Ubuntu 16.04–24.10, CentOS 7 and 8 as well as Windows Server 2022 and 2025. On KVM servers also any ISO that suits the hardware, plus the Proxmox installers.

Can I install Windows Server?

Yes, Windows Server 2022 or 2025 on a KVM VPS with at least 40 GB storage. For long-term use you need a valid Windows licence.

Can I switch between Intel Xeon and AMD without reinstalling?

Yes. Switching between Intel Xeon and AMD is possible without data loss; the price change is applied automatically to the remaining term.

Does a custom ISO work in an LXC container?

No. LXC containers use Linux templates and the host's kernel. For your own ISOs, Windows or your own kernel, use a KVM VPS.

Can I automate the reinstall?

Yes. Capture the setup after the installation as an Ansible playbook, shell script or Docker Compose file. Resellers can also reinstall servers via the API.

Was this post helpful?

MagicHosting – Hosting with real value

Hosting pays off with MagicHosting: fair pricing, current deals and operation in SkyLink RZ. Servers, domains and personal support – no hidden costs.

  • Current limited offers from our server exchange
  • Affordable domains with transparent pricing and great offers
  • Powerful DDoS protection for maximum availability
  • Personal support when you have questions or issues