Start typing to search across invoices, services, domains, tickets, and more...
When the OS templates in your control panel don't meet your needs — for example, you want the latest Debian, a specific Ubuntu version or your own image — you can use an open-source one-click reinstall script to reinstall from within the running system. This guide uses the actively maintained bin456789/reinstall project on GitHub as an example to explain the approach, with a focus on backups and VNC rescue preparation before you reinstall, so you can keep risk to a minimum.
ip addr
ip route
cat /etc/resolv.conf
On servers outside mainland China, download it from GitHub:
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O reinstall.sh https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
If your server has slow access to GitHub, you can use the mainland China mirror listed in the project README. After downloading, it's a good idea to skim the script and README to confirm the source is trustworthy.
The basic syntax is bash reinstall.sh <os-name> <version>. Common examples:
# Reinstall as Debian 13
bash reinstall.sh debian 13
# Reinstall as Ubuntu 24.04
bash reinstall.sh ubuntu 24.04
# Reinstall as Rocky Linux / AlmaLinux 9
bash reinstall.sh rocky 9
bash reinstall.sh almalinux 9
When it runs, the script prompts you to set the root password for the new system. You can also pass the password, SSH port or public key as parameters:
bash reinstall.sh debian 13 --password 'Your-Strong-Pass' --ssh-port 22022
bash reinstall.sh debian 13 --ssh-key "ssh-ed25519 AAAA... user@pc"
Parameter names and the list of supported systems change between versions. Always check the project README before running, or run
bash reinstall.sh --help.
If you have your own raw image (compressed formats such as gzip, xz and zstd are supported), you can DD it straight to the disk:
bash reinstall.sh dd --img "https://example.com/my-image.raw.xz"
DD images don't get network configuration injected automatically. The image itself must be able to obtain an address via DHCP or already have a static IP configured. Otherwise the server will be unreachable after the reinstall and can only be fixed through VNC.
When the script has finished preparing, it prompts you to reboot:
reboot
After rebooting, the system enters the installation process, which usually takes 5–20 minutes depending on the target OS, network speed and machine performance. You can watch the progress in VNC. Do not force a reboot or power off midway.
Once installation finishes, SSH in with your new password and port, then check the network and disks:
ip addr
ping -c 4 1.1.1.1
df -h
cat /etc/os-release
Then update the system and redo your security hardening (change the SSH port, disable password login, configure the firewall and so on).
Open VNC first and check the screen. If it's still installing, be patient. If it's stuck on an error screen, or the new system has booted but has no network, configure the network manually in VNC using the IP and gateway you recorded earlier. If you can't fix it yourself, submit a ticket.
You can reinstall using an official OS template from the client area, or submit a ticket to have a technician mount a rescue system. This assumes you backed up your data beforehand — the reinstall itself doesn't keep any files.
The script does support installing Windows, but it has higher RAM and disk requirements, and you'll need to take care of Windows licensing. See the README for the specific parameters.
It won't change the IP assigned to your server. The script usually detects and reuses the existing network configuration automatically. On servers with multiple IPs, you'll need to bind the additional IPs again after reinstalling.
Open-source scripts like bin456789/reinstall give you flexibility to switch OS versions, but because they operate directly on the disk, they're riskier than reinstalling from the panel. Remember three steps: back up first, record your network details, and have VNC ready, and you'll be able to handle problems calmly. If you only need a common OS, the built-in reinstall feature in the IMIDC client area is the easier option. IMIDC's KVM cloud servers and dedicated servers all support VNC or IPMI management. If you run into network or boot issues during a reinstall, submit a ticket at any time and our 24/7 technical support will help you troubleshoot.