---
title: "How to Configure a Server Image | Hostman Docs"
description: "Learn how to configure server images on Hostman for optimized hosting. Instructions for managing your server configurations."
---

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

Before creating a cloud server from a custom image, you should properly configure the image to ensure correct installation and full functionality of the dashboard.

Below are the checks and configurations you should perform to successfully create the server.

## Basic Configuration

### Partition Table

Check the disk partitioning scheme. We recommend using MBR or GPT; both are supported by most Linux distributions using tools like `fdisk`, `gdisk`, etc.

Example command:

```shell
gdisk -l /dev/vda
```

Example output:

```shell
GPT fdisk (gdisk) version 1.0.5
Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present
```

If another partitioning scheme is used, you’ll need to recreate the image with the correct one.

### Disk Layout

If the disk contains a single root partition using the `ext3` or `ext4` file system, the system will automatically resize the filesystem during server creation to match the configured disk size.

For example, if the image block device is 10 GB and the server is created with a 15 GB disk, the block device and filesystem will expand to 15 GB.

> [!NOTE]
> Note: Resizing will not occur if LVM (Logical Volume Manager) is used.

### Bootloader

The virtual machines use SeaBIOS, so the OS must have a BIOS-compatible bootloader installed.

If a UEFI bootloader is installed, it must be removed and replaced with a BIOS-compatible one.

If using GRUB2, refer to its [installation guide](https://wiki.archlinux.org/title/GRUB).

### /etc/fstab Configuration

For stable booting, use UUID-based mounting in `/etc/fstab` for the root partition.

Example:

```shell
UUID=f19002a1-6e7a-45ac-91cd-24b7cc0e4cd9 / ext4 defaults 0 1
```

To get the UUID of a partition:

```shell
blkid
```

Example output:

```shell
/dev/vda1: UUID="f19002a1-6e7a-45ac-91cd-24b7cc0e4cd9" TYPE="ext4" PARTUUID="f7a1fae1-01"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
```

### Root User

A password for the `root` user will be generated when creating the server. Ensure that the root user exists (i.e., hasn't been manually removed).

### qemu-guest-agent

Make sure the `qemu-guest-agent` is installed and running. It is needed for operations such as backups from the dashboard.

Check its status:

-   Systemd:
    

```shell
systemctl status qemu-guest-agent.service
```

-   OpenRC / init.d:
    

```shell
/etc/init.d/qemu-guest-agent status
```

Or:

```shell
service qemu-guest-agent status
```

Install if missing:

-   Debian/Ubuntu:
    

```shell
apt-get install qemu-guest-agent
```

-   CentOS / RHEL:
    

```shell
yum install qemu-guest-agent
```

-   Alpine Linux:
    

```shell
apk add qemu-guest-agent
```

Enable on boot:

-   Systemd:
    

```shell
systemctl enable qemu-guest-agent.service
```

-   init.d:
    

```shell
chkconfig --add qemu-guest-agent
```

-   OpenRC:
    

```shell
rc-update add qemu-guest-agent
```

These configurations are enough for creating a cloud server from the image.

Other settings below are recommended for convenience and usability.

## Additional Settings

### Installing Zabbix

To collect server statistics, we use the Zabbix agent.

Install it using the following script:

```shell
wget -O - http://repo.hostman.com/zabbix-install.sh | bash
```

### Network Settings

Ensure network connectivity after the server boots.

Configure a DHCP client to automatically obtain an IP address.

Most systems have DHCP clients installed. We recommend using dhclient with the following config:

```bash
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        netbios-name-servers, netbios-scope, interface-mtu,
        rfc3442-classless-static-routes, ntp-servers;

timeout 300;
```

### SSH Access

SSH is used to access the server. Make sure it is installed and enabled on boot.

Check status:

-   Systemd:
    

```shell
systemctl status ssh.service
```

-   OpenRC / init.d:
    

```shell
/etc/init.d/ssh status
```

Or:

```shell
service ssh status
```

Install if missing:

-   Debian/Ubuntu:
    

```shell
apt-get install openssh-server
```

-   CentOS / RHEL:
    

```shell
yum -y install openssh-server openssh-clients
```

-   Alpine Linux:
    

```shell
apk add openssh
```

Enable on boot:

-   Systemd:
    

```shell
systemctl enable ssh.service
```

-   init.d:
    

```shell
chkconfig --add ssh
```

-   OpenRC:
    

```shell
rc-update add sshd
```

Also, ensure your firewall allows access to port 22 (default SSH port).

### Disable Swap

It is recommended to disable swap.

Check if swap is active:

```shell
swapon --show
```

Example output:

```shell
NAME      TYPE SIZE USED PRIO
```

Disable swap:

```shell
swapoff -a
```
