Installing a Control Panel on a Virtual Server: Prerequisites and Resources

A practical guide to installing a control panel on a virtual server; required resources, prerequisites, and why installing on a non-empty server usually ends in failure.

5 min Updated 19 Oct 2026

You've bought a virtual server, you SSH in, and you want a control panel up and running. The first thing that usually stops you is this message: Error: This server does not have a valid hostname or Cannot install on a server with existing web server. If you've already installed Apache or Nginx on that same VPS, or you have a database, the control panel installation almost always fails. This article is about exactly that moment.

Before installing a control panel, check these four things

Installing a control panel isn't a script you "run and it's done." It's an installer that rewrites the entire system: web server, PHP, database, DNS, firewall, and mail queue. If the system already has something on it, the installer either stops or tramples over it.

  • A fresh, supported operating system. AlmaLinux 8/9 or Ubuntu 22.04. Installing on Debian 12 still isn't officially supported for some panels.
  • A valid hostname with an A record. Many people skip this and then get stuck at the SSL issuance stage.
  • Real root access. A user with sudo isn't enough; some installers read /root directly.
  • No active web server or database. Check with ss -tlnp | grep -E ':80|:443|:3306'. If there's output, you need to make a decision first.

How much RAM and disk you actually need

The numbers you see on panel vendors' sites are the absolute minimum, not a comfortable number. In practice:

ResourceMinimum on paperThe number that actually works
RAM1 GB2 GB for a light site, 4 GB if MySQL and email are also active
Disk20 GB40 GB SSD/NVMe; the panel itself eats 8 to 12 GB with logs and backups
CPU1 vCPU2 vCPU; the initial compile takes over 40 minutes on a single core

On 1 GB RAM with swap, the installation will come up, but the day MySQL wants to buffer, the OOM Killer kills the process and the site returns 502. If you've underestimated your server resources, before anything else read diagnosing the cause of high server load to understand which process is eating resources.

Why installing on a non-empty server isn't recommended

Here's the mistake: someone has a VPS that their site has been running on for three months, they want to add a control panel, and they think the installer will sit "alongside" everything else. It won't. The installer rewrites your Apache or Nginx configuration, changes the PHP version, and if you've installed MySQL/MariaDB separately, it may conflict on port 3306.

The sign isn't always obvious. Sometimes the installation finishes successfully, the panel comes up, but the previous site returns 500 because the DocumentRoot changed. Sometimes the database won't come up and you see in /var/log/mysqld.log that an old socket is blocking it. If you have data, first take a full backup with transferring files with scp and rsync, then rebuild the server from scratch.

The right path: fresh server, then install

The order is: take a backup, reinstall the server (reinstall) or build a fresh VPS, set the hostname, then run the installer. If you've lost access and need to use rescue mode, rebuilding the server and working with rescue mode walks through this exact path step by step.

Installation steps, with real commands

  1. Set the hostname:
    hostnamectl set-hostname srv1.example.com
    echo "127.0.0.1 srv1.example.com" >> /etc/hosts
  2. Create the A record in DNS and wait for propagation. Check with dig +short srv1.example.com; don't start the installation until the IP comes back.
  3. Update the system: dnf update -y or apt update && apt upgrade -y.
  4. Configure the firewall before installation, not after. Leave ports 22, 80, 443, and the panel ports open.
  5. Run the installer. For DirectAdmin, usually:
    cd /usr/local/directadmin/custombuild
    ./build update
    ./build all d

The installation takes between 20 and 60 minutes and depends on disk and CPU speed. On NVMe it's noticeably faster. Don't close SSH mid-way; use screen or tmux, otherwise a dropped connection leaves the installation half-done, and cleaning that up is harder than a fresh install.

After installation, do these three things

First, get SSL for the panel and domains with installing a free certificate with Certbot. Second, remove the anonymous MySQL user and restrict permissions; the MySQL security guide covers exactly this. Third, set up automatic backups to a destination off that same server.

Which panel should I choose

If you only have one personal site and you're comfortable with the command line, skip the control panel installation entirely; Nginx and Certbot are enough and it keeps 1 GB RAM free. If you have multiple sites with real clients, cPanel is the most convenient but expensive and heavy; DirectAdmin is lighter and cheaper and sits comfortably on 2 GB RAM. For internal projects that only need a Persian panel, Iranian options work too, but their documentation and support community are more limited.

One practical note: if you plan to run containers on the same server later, consider setting up Docker on a VPS from the start, because some panels close ports and iptables in a way that becomes a headache later. For heavier loads and multiple separate services, cloud server gives more flexibility than a fixed VPS and lets you separate resources.

If you just want your site up and don't want to deal with panel maintenance, Linux hosting manages that layer for you and you don't need to install anything on a bare server.

Frequently asked questions

Can I install a control panel on a server that has an active site?

Practically no, unless you take a full backup of the site and set it up again after installation. The installer rewrites the web server configuration and PHP version, and the previous site usually returns a 500 error. The safe path is to reinstall the server or build a fresh server and migrate the data.

What's the minimum resources for installing a control panel?

On paper, 1 GB RAM and 20 GB disk, but in practice 2 GB RAM and 40 GB SSD or NVMe disk works. With 1 GB, the installation comes up, but as soon as the database and email become active, the OOM Killer kills the processes.

Why does the installer give a hostname error?

Because the server hostname is still localhost or a default name. Change it with hostnamectl set-hostname, set the A record, and make sure DNS has propagated with dig +short. Until this step is done, the installation won't proceed.

What should I do if the installation was interrupted mid-way?

First check with screen -ls whether the session is still alive. If the installation is half-done, the best thing is to reinstall the server from scratch; manually cleaning up half-installed files usually takes longer than a fresh install and the result isn't reliable either.

Was this page helpful?