Thursday, June 26, 2014

Best way to install WHM/cPanel Server for shared hosting

How to setup a WHM/cPanel server

Every cPanel administrator has their own way of setting up a cPanel server. I have over a decade of experience dealing with cPanel servers and this is the minimum setup that I will do for a shared hosting environment.

I have tried to keep costs as low as possible while still offering essential services that add to redundancy, stability and security.

Your main shared hosting server:

A dedicated server, you can rent these for really cheap from your favorite data center. If you are looking for economical servers, I would recommend Server4You which rent out dedicated servers for as low as $30.

Once you have your dedicated server you need to install the latest version of CentOS 64bit. Once you have installed CentOS you will need to install the latest version of cPanel for $35. You can buy a cPanel liscence from BuyCpanel.

The next important feature you need to install that is pretty essential is a system called CloudLinux. What Cloudlinux does it help protect your system from out of control scripts or clients that hog too much of the servers resources. This will cost you $14 a month. You can order Cloudlinux from their website:

Once you have installed your cPanel/Cloudlinux setup you now need to install your favorite plugins to help you manage your shared hosting server. There are three plugins that I consider essential

1. Munin Graphs. You can easily enable this by selecting the option in the plugins section of WHM.
2. ConfigServer Mail Queues (cmq). When you manage shared hosting one of the things you will be constantly dealing with are out of control mail queues. This plugin helps you manage those queues and delete excess email without removing legitimate mail.
3. ConfigServer Firewall (csf) . This allows you to control and manage your firewall on a much higher level than WHM would normally allow you to. I highly recommend this plugin.
4. Softaculous. Softaculous is a plugin that allows your users to install commonly used php sites such as Wordpress. The added advantage of Softaculous is that it automatically updates your clients websites to the latest version of Wordpress. This really helps with security. This will cost you $2.50 a month and is available from BuyCpanel as well.

That in essence is what you will need to run your main shared hosting server. However we are still short on some essential systems. These are a backup system and DNS redundancy. Luckily you can use the same system for both the backups and your DNS cluster.

Supporting VPS

What you can do is rent a VPS from Backupsy. You can purchase a VPS from Backupsy for $10 a month. This will give you 250GB of disk space. You can scale your VPS as required, but 250GB should be enough to start your backups with.

What you want to do is install CentOS 64bit on your backup VPS. Once you have installed CentOS you will want to install the DNS ONLY version of cPanel. Once that is installed you can connect this DNS ONLY version of cPanel to your shared hosting server in the DNS cluster configuration.

Fantastic, we now have DNS redundancy located in a different datacenter to your shared hosting server. The last thing we need to do now is add the backup system to your backup VPS. I use a system called Bacula4hosts. I like their system because it allows a bare metal restore as well as adding a backup icon to your clients cPanel control panel that will allow them to restore individual files and/or accounts. This costs $19 a month and connects your shared hosting server to your backup storage server (which we are also using as a DNS server).

Voila, that it. Thats the minimum I would install for a shared hosting server. Now you have a very functional, stable cPanel server that has DNS redundancy and reliable backups for a total cost per month of $110.50

Cost summary:

  • Dedicated server - $30
  • WHM/cPanel license for a dedicated server - $35
  • Cloudlinux - $14
  • Softaculous - $2.50
  • Backupsy VPS - $10
  • Bacula4Hosts - $19

Total cost per month - $110.50

Hope someone finds this guide useful! :)


  1. Very nice post.Its valuable for every reader.if anyone interested in cheap dedicated server on linux RackBank is a good option,i personally recommend this on my experience.

  2. DreamHost is the best hosting company with plans for all of your hosting requirments.