---
title: "Server Configuration | Hostman Docs"
description: "Master server configuration with Hostman’s detailed guides. Learn how to optimize your server’s performance, security, and stability."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

You can manage your [cloud server](https://hostman.com/cloud-server/)’s configuration in the **Plan** tab.

Here, you can:

-   Select a new plan for the server thus changing the disk space, the amount of RAM and the number of CPU cores;
-   Add up to 3 additional disks to your server;
-   Delete disks;
-   Increase the disk size.

> [!NOTE]
> Operations with disks are not available if a snapshot is created for the server.

## Changing the Server Plan

> [!NOTE]
> You can only upgrade your server’s plan. Downgrading is not possible as reducing the disk size can damage the file system.

To change your server's plan:

1.  Go to the **Plan** tab.
2.  Click **Select plan**. 
3.  Choose a new plan for the server.
4.  Click **Save and reboot** to apply the changes.
5.  Confirm the action.

## Adding New Disks

To add an additional disk to your server:

1.  Go to the **Plan** tab.
2.  Click **Add disk**.
3.  Set the desired disk size and click **Add**.
4.  Confirm the action.

You will see the new disk in the dashboard.

### Configuring the Disk in the OS

Now you have to add the disk in the operating system. 

On Linux, disk setup typically consists of the following steps:

1.  Create a partition on the disk
2.  Create a filesystem
3.  Mount the disk (if needed)
4.  Add an entry to `/etc/fstab`

#### Disk Naming Notes

If your server was created before May 2025, disks will be named like `vd*`. On servers created after May 2025, disks will be named `sd*`. 

The disk name displayed in the dashboard may not always be correct. Make sure to check disk names on your system with:

```shell
lsblk
```

Example output:

```shell
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
loop1    7:1    0 63.9M  1 loop /snap/core20/2318
loop2    7:2    0   87M  1 loop /snap/lxd/29351
loop3    7:3    0 50.9M  1 loop /snap/snapd/24505
loop4    7:4    0 63.8M  1 loop /snap/core20/2599
loop5    7:5    0 89.4M  1 loop /snap/lxd/31333
loop6    7:6    0 50.9M  1 loop /snap/snapd/24718
sda      8:0    0   15G  0 disk 
└─sda1   8:1    0   15G  0 part /
sdb      8:16   0   10G  0 disk 
vda    252:0    0    1M  1 disk
```

Here, `sdb` is the newly added disk. 

In the examples below, we’ll prepare the `sdb` disk, as `sda` is the main system disk, and `vda` is reserved for `cloud-init` by default.

Replace `sdb` in the commands with the actual disk name on your system.

#### Step 1. Creating a Partition

To create a partition, use `fdisk`:

```shell
fdisk /dev/sdb
```

Inside `fdisk`:

-   Press `n` to create a new partition
-   Choose `p` for a primary partition
-   Leave the remaining options at their default values (press **Enter**)
-   Press `w` to write the changes and exit

![1964dcf0 B9a0 4c0f 9787 34ce903ce011](https://content.hostman.com/assets/561a81ca-719a-4b72-845f-b515809a875e.png?width=726&height=498)

Run the command again to verify the partition was created:

```shell
lsblk
```

In our example, the new partition will be `sdb1`.

```shell
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   25G  0 disk
├─sda1    8:1    0 24.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part
sdb       8:16   0   10G  0 disk
└─sdb1    8:17   0   10G  0 part
vda     252:0    0    1M  1 disk
```

#### Step 2. Creating a Filesystem

Next, create a filesystem on the new partition. In this example, we’ll use `EXT4`:

```shell
mkfs.ext4 /dev/sdb1
```

The filesystem is now ready.

#### Step 3. Mounting the Disk

To start using the disk, mount it to a directory. Each disk should have its own mount point.

For example, if you later add another disk (`sdc`), it should be mounted to a different directory.

Create a mount directory:

```shell
mkdir /mnt/disk2
```

Mount the disk:

```shell
mount -o barrier=0 /dev/sdb1 /mnt/disk2
```

You can now store files in `/mnt/disk2`, and they will be written to the new disk.

#### Step 4. Adding an Entry to /etc/fstab

To make the mount persistent after a reboot, add an entry to `/etc/fstab`.

You can reference the disk by its device name (e.g. `sdb1`), but this name may change if disks are reattached or other disks are removed. Using a UUID is recommended, as it is unique and stable.

To find the UUID, run:

```shell
lsblk -o NAME,UUID
```

Example output:

```shell
sda    
└─sda1 fcafbb78-fd6c-4083-82d8-3c06bd6ad4b1
sdb    
└─sdb1 534c6694-d2b0-4867-843b-b8a934bf0e5d
vda    041E-4E90
```

In this case, the UUID of our disk is `534c6694-d2b0-4867-843b-b8a934bf0e5d`.

Edit `/etc/fstab`:

```shell
nano /etc/fstab
```

Add the following line (replace the UUID with your own):

```shell
UUID=<disk-uuid> /mnt/disk2 ext4 defaults 0 2
```

## Resizing the Disk

We recommend creating a server backup before resizing disks.

You can only **increase** the disk’s size. Decreasing the size is not possible as it can seriously damage the file system.

### Main Disk

To resize your main disk, simply change your server plan:

1.  Go to the **Plan** tab.
2.  Click **Select plan**. 
3.  Select a plan with the sufficient disk size.
4.  Click **Save and reboot** to apply the changes.
5.  Confirm the action.
6.  Partition the disk, if necessary, following the steps below.

### Partitioning the Main Disk

> [!NOTE]
> This partioning is only needed if you have previously partitioned the disk yourself and now it has **two or more logical partitions**. In all other cases, the disk will be repartitioned automatically after you resize it in the dashboard.

**Step 1.** Boot the server [in the recovery mode](https://hostman.com/docs/cloud-servers/boot-mode/).

**Step 2.** Go to the **Console** tab and enter the following command to find out the disk name:

```shell
lsblk
```

Example output:

```shell
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   30G  0 disk 
├─sda1    8:1    0   10G  0 part /
├─sda2    8:2    0   4G  0 part 
├─sda14   8:14   0    4M  0 part 
├─sda15   8:15   0  106M  0 part /boot/efi
└─sda16 259:0    0  913M  0 part /boot
vda     253:0    0    1M  1 disk
```

In this example, `sda` is the system disk. On older servers, it may be called `vda`.

**Step 3**. Use the `parted` utiluty, using the system disk name:

```shell
parted /dev/sda
```

Execute the `print` command.

On the first run, you can receive the message:

```shell
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 31457280 blocks) or continue
with the current setting? 
Fix/Ignore?
```

In this case, enter:

```shell
Fix
```

This will update the GPT table and allow to use all free disk space.

In the output of the `print` command, you will see the list of partitions.

![7ed673b6 A2a5 4f0b A475 087f9c353782.png](https://content.hostman.com/assets/e7cf86a2-2b14-4c3c-a5c0-6fece0044185.png?width=1018&height=366)

-   If you want to extend the last partition so it takes all the free space on the disk, go to **step 4a**.
    
-   If you want to create a new partition, proceed to **step 4b**.
    

We do not cover in this article the cases when you need to create several new partitions, but you can find those guides online.

If at this point you need to delete a partition, you can do it with the `rm` command, specifying the partition number, for example:

```shell
rm <partition_number>
```

**Step 4.** Partition the disk.

**Step 4a**. To extend the last partition, run the `resizepart` command, specifying the desired partition number and size. If you enter `100%`, the partition will take up all available space on the disk.     

```shell
resizepart <partition_number> 100%
```

Next:

-   -   Run `print` to check the result.
        
    -   Enter `q` to exit the partitioning program.
        
    -   Proceed to **Step 5**.
        

**Step 4b**. To create a new partition in a free disk space, run the `mkpart` command, specifying the partition type (`primary` or `extended`), its number and size. If you enter `100%`, the partition will take up all available space on the disk.     

```shell
mkpart primary <partition_number> 100%
```

Next:

-   -   Enter `yes` when prompted to confirm the new partition size.
        
    -   Run `print` to check the result.
        
    -   Enter `q` to exit the partitioning program.
        
    -   Create a file system in the new partition with the command below, specifying the partition name.
        

```shell
mkfs.ext4 /dev/sda3
```

**Step 5**. Check for errors and correct the file system structure. 

To do this, run the `e2fsck` command in the console, specifying the name of the partition from the **Step 4** (`/dev/sda2`, `/dev/sda3`, etc.):

```shell
e2fsck -yf /dev/sda2
```

![10e9e2a0 F362 4314 Be34 65e4bec2eecd](https://content.hostman.com/assets/d3755bcf-579b-4742-a847-a4a8c15707d1.png?width=1083&height=200)

**Step 6**. Resize the file system, specifying the partition name:

```shell
resize2fs /dev/sda2
```

![82049b53 F718 48ac 907b 81e7ddca35d1](https://content.hostman.com/assets/ace6bda6-207d-4dc6-bbd2-bb02e4486bd7.png?width=963&height=104)

**Step 7**. Check the file system after expansion.

Mount the partition that was modified (`/dev/sda2`, `/dev/sda3`, etc.):

```shell
mount /dev/sda2 /mnt
```

Check that the size was successfully changed:

```shell
df -h
```

![7dc701d2 2ddc 447f B8c7 F40f5f1ea16d](https://content.hostman.com/assets/dce45fd5-21ec-4c16-ac09-413cf5388d24.png?width=775&height=261)

If the disk size has remained the same, we recommend going back to **Step 1** and repeating the procedure once again.

If the disk size has changed, unmount the system disk:

```shell
umount /mnt
```

**Step 8**. Boot the server in the standard mode.

-   Go to the **Access** tab.
-   Click **Change** in the **OS boot mode** section.
-   Select **Standard mode**.
-   Click **Save and reboot**.

### Additional Disk

To change the size of an additional disk:

1.  Go to the **Plan** tab.
2.  Hover over the disk and click on the cog icon.
3.  Select new disk size.
4.  Click **Edit and restart**.
5.  Partion the disk following the steps below.

### Partitioning an Additional Disk

> [!NOTE]
> Before resizing, create a backup to prevent data loss in case of unexpected issues.

Run the following command to verify the new device size:

```shell
lsblk
```

Example output:

```shell
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   25G  0 disk
├─sda1    8:1    0 24.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0   20G  0 disk
└─sdb1    8:17   0   10G  0 part
vda     252:0    0    1M  1 disk
```

In this example, the `sdb` device has been increased to 20G, but the `sdb1` partition is still 10G. Therefore, you need to repartition the disk and extend the filesystem.

#### Before repartitioning

If the disk is mounted via `/etc/fstab`, comment out the corresponding entry. Open the file:

```shell
nano /etc/fstab
```

Find the line corresponding to `/dev/sdb1` (or its UUID) and add `#` at the beginning of the line to comment it out. This prevents automatic mounting.

Before unmounting, check which processes are using the disk:

```shell
lsof /mnt/disk2
```

If the command returns no output, the disk is safe to unmount. If there are active processes, stop them or terminate the associated applications.

Unmount the disk:

```shell
sudo umount -l /mnt/disk2
```

#### Disk repartitioning

Start `fdisk` to edit the disk:

```shell
fdisk /dev/sdb
```

Delete the existing partition (without affecting the data). Enter `d` to delete the partition. If the disk has only one partition, as in this example, it will be selected automatically.

Create a new partition by entering:

-   Enter `n` to create a new partition
-   Select the same partition type (for example, `p` for primary)
-   Set the starting sector to the same value as before (the default is correct)
-   Set the ending sector to use the maximum available size (default)

When prompted:

```shell
Partition #1 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o:
```

Enter `N` to preserve the existing data.

Enter `w` to write the changes.

After exiting `fdisk`, run the following command to update the partition table in the system:

```shell
partprobe /dev/sdb
```

This updates the partition table in the kernel so the system recognizes the changes without requiring a reboot. If the operation is successful, no output will be displayed.

Run the command again:

```shell
lsblk
```

Verify that the partition has been updated and now uses the full available size.

```shell
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   25G  0 disk
├─sda1    8:1    0 24.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0   20G  0 disk
└─sdb1    8:17   0   20G  0 part
vda     252:0    0    1M  1 disk
```

#### Extending the filesystem

After updating the partition, extend the filesystem to use the new space. For an EXT4 filesystem, run the following commands.

Check the filesystem:

```shell
e2fsck -f /dev/sdb1
```

Resize the filesystem:

```shell
resize2fs /dev/sdb1
```

After that, mount the disk again and uncomment the entry in `/etc/fstab`:

```shell
mount -o barrier=0 /dev/sdb1 /mnt/disk2
```

Verify that the new size is available:

```shell
df -h
```

Example output:

```shell
Filesystem      Size  Used Avail Use% Mounted on
tmpfs            96M  728K   96M   1% /run
/dev/sda1        25G  2.6G   22G  11% /
tmpfs           479M     0  479M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda15      105M  6.1M   99M   6% /boot/efi
tmpfs            96M     0   96M   0% /run/user/0
/dev/sdb1        20G   24K   19G   1% /mnt/disk2
```

The disk is now fully ready for use.

## Deleting Disks

1.  Go to the **Plan** tab.
2.  Hover over the disk and click on the bin icon.
3.  Confirm deleting the disk.

You also need to delete the disk from the operating system by removing the entry from the `/etc/fstab` file.

### Edit the /etc/fstab file

If the server has only one additional disk:

1.  Open the file:
    

```shell
nano /etc/fstab
```

2.  Delete or comment out the disk entry:
    

![Group 1321314175](https://content.hostman.com/assets/72b94fe0-18ef-4342-b685-bdca07ce23b7.png?width=928&height=580)

2.  Save changes (Ctrl + X, then Y and Enter).
    

If there are several additional disks on the server and the one you are deleting is not the last one:

1.  Open the file:
    

```shell
nano /etc/fstab
```

2.  Delete or comment out the disk entry:
    

![Group 1321314177](https://content.hostman.com/assets/48ca718e-7465-4af7-8f8f-43cbe17141ee.png?width=928&height=580)

3.  Check the disk names on your system, for example with the `lsblk` command. They should have moved one step up. Say, you had additional disks `vdc` and `vdd`. Then after deleting the `vdc` disk, you should see the following:
    

![Group 1321314178](https://content.hostman.com/assets/f3f65ee3-bd33-444a-ac84-8d4fcda40519.png?width=496&height=239)

This is actually your third disk (`vdd`), which has been mounted to the `/mnt/disk3` directory.

4.  Mount the disk to the same directory, specifying its updated name (in our case, `vdc1`):
    

```shell
mount -o barrier=0 /dev/vdc1 /mnt/disk3
```

5.  Edit the `/etc/fstab` file with the updated data:

```shell
nano /etc/fstab
```

![Group 1321314179](https://content.hostman.com/assets/b9a0d75b-8614-42c4-9349-5ea1e5be9305.png?width=923&height=579)

6.  Reboot the server.

## CPU and RAM

To change the CPU and RAM parameters of your server, change the server plan:

1.  Go to the **Plan** tab.
2.  Click **Select plan**. 
3.  Select a plan with the required parameters.
4.  Click **Save and reboot** to apply the changes.
5.  Confirm the action.
