# Rebuild your server
Source: https://docs.webgee.com/en/servers/rebuild-server





Install a fresh operating system on your cloud server. Applies to all VPS and
dedicated servers.

<Callout type="error">
  **A rebuild erases the primary disk.** Every file, database and configuration
  on it is destroyed and cannot be recovered afterwards. Take a backup and
  confirm you can restore from it before you start — see
  [Back up your server](/en/servers/server-backups).
</Callout>

## Start a rebuild [#start-a-rebuild]

1. In the Cloud Console, open your server.
2. Select **Rebuild**.

The setup page opens, with a banner confirming what is about to happen and a
**Cancel Rebuild** button. Nothing is destroyed until you select **Install**.

<img alt="The server setup page showing the rebuild warning, name, hostname, timezone and operating system list" src="__img0" />

## Configure it [#configure-it]

### Name and hostname [#name-and-hostname]

**Name** identifies the server in your account — it has no effect on the server
itself.

**Hostname** is set on the server. Use a fully qualified name such as
`server1.example.com`. Mail software in particular behaves badly with a bare
hostname, and changing it later means reissuing certificates.

### Timezone [#timezone]

Sets the server clock's timezone. Log timestamps and scheduled jobs follow it.

### Operating system [#operating-system]

Choose from the available families:

* **AlmaLinux**, **Rocky Linux**, **CentOS** — RHEL-compatible
* **Debian**, **Ubuntu** — Debian-based
* **Fedora**, **Alpine Linux**, **FreeBSD**
* **Hosting Control Panels** — images with a panel preinstalled
* **Other**

Expand a family to pick a version. Prefer an LTS release unless you have a
specific reason not to; they receive security updates for far longer.

<Callout type="info">
  **Self Install** leaves the disk blank so you can install from your own media
  instead. You will need [VNC and boot media](/en/servers/boot-media) to complete
  it — the server has no OS to connect to over SSH.
</Callout>

### Advanced options [#advanced-options]

* **VNC** — leave off. You do not need it during installation and can enable it
  later if something goes wrong.
* **IPv4 Public DNS Resolvers** — the system defaults are Cloudflare's `1.1.1.1`
  and `1.0.0.1`. Change them only if you have a reason to.

## Install [#install]

Select **Install**. The rebuild takes a few minutes; progress appears in the
task list.

## After the rebuild [#after-the-rebuild]

Your **root password is reset** and any SSH keys attached to the build are
installed. If you did not attach a key, the new password is emailed to you.

1. Connect over SSH — see [Connect over SSH](/en/development/connect-via-ssh).
2. Change the root password if one was emailed to you.
3. Update the system: `apt update && apt upgrade`, or `dnf upgrade` on
   RHEL-family systems.
4. Reapply any firewall rules — they do not survive a rebuild.

## If you cannot connect afterwards [#if-you-cannot-connect-afterwards]

* **The installation is still running.** Check the task list.
* **Your SSH key was not attached.** Use the password from the email, or
  [reset the root password](/en/servers/how-to-reset-root-password-from-webgee-cloud-console).
* **The host key changed.** Your SSH client will refuse to connect and say so.
  Remove the old entry: `ssh-keygen -R your.server.ip`.

## Related [#related]

* [Back up your server](/en/servers/server-backups)
* [Add an SSH key](/en/servers/ssh-keys)
* [Rescue mode and VNC](/en/servers/rescue-mode-and-vnc)
