Skip to content
TariTalk
Go back

One-Click VPS OS Reinstallation Script

Published
Basics

Table of contents

Open Table of contents

Introduction

reinstall.sh is one of the most feature-rich one-click reinstallation scripts in the community. It can reinstall VPS instances or physical servers with multiple Linux distributions, and also supports Windows installation, writing raw disk images, booting into Alpine Live OS or netboot.xyz, and other advanced uses. This article focuses on the most common scenario: reinstalling a clean Linux system with a single command.

Project: https://github.com/bin456789/reinstall


1. Why reinstall the system first?

System images supplied by hosting providers may contain preinstalled software, while their default settings and software versions may not suit your needs. Before deploying services, reinstalling a system with a clear configuration can reduce differences between environments and make subsequent installation and maintenance easier.


2. Why choose this script?

Compared with similar scripts such as debi.sh, reinstall.sh has several notable advantages:


3. System requirements

The existing operating system can be any of those in the table.

The requirements for the target system are as follows:

SystemVersionMemoryDisk
Alpine3.21, 3.22, 3.23, 3.24256 MB1 GB
Debian9 ELTS - 11 ELTS, 12, 13256 MB1 ~ 1.5 GB ^
KaliLast-Snapshot, Rolling256 MB1 ~ 1.5 GB ^
Ubuntu18.04 LTS - 26.04 LTS512 MB *2 GB
Anolis7, 8, 23512 MB *5 GB
RHEL   AlmaLinux   Rocky   Oracle8, 9, 10512 MB *5 GB
OpenCloudOS8, 9, Stream 23512 MB *5 GB
CentOS Stream9, 10512 MB *5 GB
Fedora43, 44512 MB *5 GB
openEuler20.03 LTS - 24.03 LTS512 MB *5 GB
openSUSELeap 16.0, Tumbleweed (rolling)512 MB *5 GB
NixOS26.05512 MB5 GB
Arch Linux / Arch Linux ARMRolling512 MB5 GB
GentooRolling512 MB5 GB
Windows (DD)Any512 MBDepends on the image
Windows (ISO)Vista, 7, 8.x (Server 2008 - 2012 R2)512 MB25 GB
Windows (ISO)10, 11 (Server 2016 - 2025)1 GB25 GB

* Indicates installation using a cloud image rather than a traditional network installation.

^ Requires either 256 MB of memory + 1.5 GB of disk space, or 512 MB of memory + 1 GB of disk space.

Warning

The script theoretically supports dedicated servers and PCs.

However, if IPMI or a USB drive is available, using this script is not recommended.

Warning

❌ This script does not support OpenVZ or LXC virtual machines.

Use https://github.com/LloydAsp/OsMutation instead.

Source: Project README, checked on 2026-09-13. Refer to the project README for the latest supported configurations.


4. Download the script

curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh

5. Reinstall Linux with one command

Caution

This operation erases all data on the entire disk, including other partitions! If you run it accidentally, you can cancel the reinstallation by running bash reinstall.sh reset before rebooting.

Basic usage (install Debian 13):

bash reinstall.sh debian 13

The script prompts for a username and password. If you leave them blank, it uses root and a random password. To install the latest version, omit the version number, for example bash reinstall.sh debian.

Examples for other distributions:

bash reinstall.sh alpine 3.23
bash reinstall.sh ubuntu 24.04
bash reinstall.sh rocky 10
bash reinstall.sh centos 10
bash reinstall.sh arch

Common optional parameters

ParameterDescription
--username USERNAMESet the username
--password PASSWORDSet the password
--ssh-key KEYConfigure SSH public-key authentication (the password is empty when a public key is used)
--ssh-port PORTChange the SSH port, both during installation and in the new system
--hold 1Boot into the installation environment without installing, to verify network connectivity
--hold 2Do not reboot after installation, so you can connect over SSH and modify the system

SSH public keys can be supplied in several formats: paste a public-key string directly, provide an HTTP URL or a local file path, or use github:username or gitlab:username to fetch keys automatically.

Complete example with parameters

bash reinstall.sh debian 13  --ssh-port 10000 --password 'YourStrongPassword'

6. Monitor installation progress

After rebooting, the machine enters the installation environment. You can monitor progress through:

Even if installation fails, you can connect over SSH to recover the system manually.


7. Precautions


8. Other features

In addition to reinstalling Linux, the script supports the following features. See the project README if you need them:


Share this post:

Previous post
Tari Mining Pool List
Next post
The Trillion-Dollar Shift: Tari in the Stablecoin Era