Getting startedWritten by GLWS11 min readControl panel guide
Commands run on your server unless a section says otherwise. Replace example usernames, addresses and paths with your own values. Keep a working session open when changing remote access.

When to reinstall

Reinstalling replaces the operating system and erases the disk contents. It is the quickest fix for a system you no longer trust or understand, and the clean way to change distribution or version. It is not a way to recover data. Anything you want to keep must be copied off the server first.

You can practise on the interactive demo of GLWS Manager before touching a real server. It uses example data and changes nothing.

Back up what you need

List what matters: website files, databases, configuration under /etc, application data, SSH keys, cron jobs and certificates. Copy them to your own computer or another server, and check you can open them. The backup guides cover the tools.

A normal deploy account cannot read all of /etc. Create the configuration archive with sudo, protect it as private data, and copy it off the VPS. This archive contains secrets. Database files copied while a database is running are not a consistent backup: take and verify database dumps separately. Download application volumes with the application-specific stopped-service backup steps.

On the server: list candidates and sizes
sudo du -sh /etc /home /var/www /var/lib/mysql /var/lib/docker /opt 2>/dev/null
crontab -l; sudo crontab -l
systemctl list-unit-files --state=enabled | head -n 40
On the server: create a private configuration archive for the deploy account
sudo install -d -m 700 -o deploy -g deploy /home/deploy/reinstall-backup
sudo tar -czf /home/deploy/reinstall-backup/etc.tar.gz -C / etc
sudo chown deploy:deploy /home/deploy/reinstall-backup/etc.tar.gz
sudo chmod 600 /home/deploy/reinstall-backup/etc.tar.gz
sudo tar -tzf /home/deploy/reinstall-backup/etc.tar.gz | head -n 20
On your Linux or macOS computer: download and check the archive
umask 077
mkdir -p server-backup
rsync -av --info=progress2 -e ssh deploy@YOUR_SERVER:/home/deploy/reinstall-backup/etc.tar.gz ./server-backup/
tar -tzf ./server-backup/etc.tar.gz | head -n 20
If SSH uses a custom port, use rsync -e "ssh -p YOUR_SSH_PORT". Keep the backup outside any public web root. Verify its contents and database restores before confirming a reinstall.

Open the reinstall page

The GLWS Manager demo lets you practise choosing an image and reading the destructive-action warning. It contains example data and does not provision or reinstall a VPS. On an actual server, use your provider’s live control panel and its instructions. The images shown depend on the selected plan and panel.

Choose the image and start

Pick a long-term-support release if you want years of security updates. Ubuntu 24.04 LTS, Debian 12 or 13 and AlmaLinux 9 are typical choices for servers. If the panel asks for a root password, use a long random one and store it in a password manager. Confirm the dialog, and the panel begins the reinstall. It usually takes a few minutes, and the activity log shows progress.

In the GLWS Manager demo, progress is simulated. Before confirming a live reinstall, verify that the independent backups and your recovery access work. Keep the new login details private.

Reconnect after the reinstall

A reinstall creates new SSH host keys. Confirm the new fingerprint through your provider’s trusted console before replacing the old known-host entry. At any other time, investigate a changed-host warning before connecting. Use the standard-port or custom-port command below as appropriate; replace every placeholder.

On your computer
ssh-keygen -R YOUR_SERVER_IP
ssh root@YOUR_SERVER_IP
On your computer, only if your provider uses a custom SSH port
ssh-keygen -R "[YOUR_SERVER_IP]:YOUR_SSH_PORT"
ssh -p YOUR_SSH_PORT root@YOUR_SERVER_IP
On the server console: print the host key fingerprint to compare
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub

Secure the fresh system

Do these first, in order: update packages, create a non-root user with sudo, add your SSH key, test a second login, turn on the firewall and disable password login. Each step has its own guide, listed below.

Ubuntu / Debian
apt update && apt upgrade
adduser deploy
usermod -aG sudo deploy
AlmaLinux
dnf upgrade
adduser deploy
passwd deploy
usermod -aG wheel deploy

Restore your data

Restore configuration and data in small steps and test as you go. Do not copy the whole of /etc back, because it contains system files that differ between versions. Copy only the configuration you need, such as web server sites, application settings and cron jobs, and adapt them to the new release.

On your computer
rsync -av --info=progress2 -e ssh ./www-backup/ deploy@YOUR_SERVER:/home/deploy/www-restore/
Verify the restored data before moving it into the application directories with appropriate ownership. The demo cannot validate a real reinstall or provider console. Follow your provider’s documented recovery procedure if live provisioning fails.

Official documentation

These upstream references provide more detail on the commands and workflows in this guide.