In a previous article, I talked about why you should get a VPS for your site/projects.
I mentioned in there the fact that most people are familiar with cPanel and if they want it on their VPS, it requires a license. This adds to the total cost. A cPanel license is $15/month according to their website, and while you might get a better deal from your hosting provider, it is an expense that you need to take into account.
Why Virtualmin? It’s free!
Virtualmin is a powerful and flexible web hosting control panel for Linux and BSD systems.
To put it in plain English: Virtualmin is an alternative for cPanel. An incredibly good alternative I may say.
I think it is by far the most complete free solution that you can have for your server.
I will list below just some of the things I really like:
- Works with Let’s Encrypt SSL. You will be able to generate SSL certificates for your sites in no time and they will automatically renew after 2 months (this can be adjusted, but no more than 3 months).
- Simple and fully responsive interface. On more than one occasion I had to log in to Virtualmin from my phone to do something quick and I had no trouble navigating the interface to get where I needed to.
- Total control over what packages are installed, what is running on the server, users, FTP accounts, etc.
- Easy to install and set. There is a one-line command that installs Virtualmin on your server. You can install a LAMP or LEMP bundle based on what you need. The default install will be the LAMP version (the one using Apache), but you can opt-in to install the Nginx one (LEMP). Also, you can install a minimal version bundle with only the vital things on it. The normal version requires at least 1GB RAM on your server, the minimal version works with 512MB RAM.
- Install Scripts option. This is like Softaculous on cPanel. You will be able to install WordPress, phpMyAdmin, Django with just one click.
- Easy to set backups and restore. You can do a full Virtual server back-up or just DB and even link it with Amazon S3.
- Notification system for package updates. You are able to select what updates you want to do, and you can even schedule them.
- PHP version control (based on folders or virtual servers).
There are a lot more features in there and, from my experience, I didn’t notice anything cPanel has that Virtualmin is missing. Some things might just be renamed in a different way.
How to install Virtualmin?
As I mentioned above, the install process is simple.
You will need a server that runs Linux (OS supported) and of course access to the terminal.
First, you need to get the install script on your server. You can do that by running:
And after that, you need to run the install script
sudo /bin/sh install.sh
Here and here you can find details on how to install Virtualmin (LAMP or LEMP and other options on the install). I really recommend checking this video tutorial made on their official channel that explains how to install and configure Virtualmin after installation.
In the video, you will find a lot of useful details when it comes to configuring Virtualmin and get to understand if you need some features or not. This way you might save on memory used while running your sites.
Requirements for Virtualmin
On the technical side:
- One of the supported Linux distributions
- At least 1GB (512MB for the minimal version) of memory and 1GB storage. More is always better.
Something I want to mention, that I talked about in the VPS articles as well: you need to be ready to learn some new things. You might need to dig into some issues, use the terminal, install some modules/packages, search for a fix on the Virtualmin forum.
This is part of owning a VPS that is not managed by the hosting provider. But I’m pretty sure you wouldn’t be reading this article if you opted for a managed VPS,.
So, take a deep breath and don’t be scared by the idea of inputting commands into the dark terminal. There are some commands that you will learn fast and this will make life much easier. Not to mention that understanding what you need to do and being able to use the terminal makes it much faster.
Final thoughts on Virtualmin
After using it for a while, I want to say that I don’t miss anything from cPanel. Although I used cPanel for years, it took me a day to move everything we have in Virtualmin and about a month to get used to all the details.
2 weeks ago, I’ve set-up another Virtualmin on a DigitalOcean droplet and with CentOS 8 it worked like a charm from the start.
There is a comprehensive documentation and an active forum (old forum) where you can troubleshoot your issues. I was afraid that there would be a small community and I would have to figure out most of the issues by myself, but that was not the case.
If you just Google your issue/question and add “virtualmin” in it, in almost all cases there will be at least an answer on the official forum.
Just a little back-story about how this article came around.
We do a lot of web development, mostly WordPress projects, but started to branch out into Laravel a bit.
Until recently we used a shared hosting plan and we were very happy with it: no downtime, a lot of flexibility concerning different PHP versions, full backups for the last 14 days, no limit on traffic, databases, files, a lot of space. And because it was only used for development and no real traffic directed in there, it wasn’t slow at all. It also was in the same city, basically in our back-yard.
Things changed at the end of 2019 and we started to get a lot of downtime. Something was wrong with the server we were hosted on, meaning that at times we got 20-50 minutes per day downtime on various sites that we had in there. Support was not helpful in this matter since, being a shared hosting, they don’t track everything that is happening in there.
So, in January we switched from a shared server to a VPS.
Why switch to a VPS?
There are multiple reasons to do that:
- Your business got bigger and you need to support more traffic.
- You’re working with new/different technologies that require control over the environment
- Having dedicated resources from the server and not sharing them with others
- Taking things more seriously, by investing a bit more on something that your business relies on.
- Problems (like downtime, or lack of support) with the shared hosting that you’re using
Let’s say that, for us, traffic was not the issue.
We wanted to fix the downtime problem that started occurring in the past month. We also wanted to work with Laravel more and it required an SSH connection. At the same time, we were intrigued by the idea of managing a VPS and working directly with the machine. Last but not least, it was about taking things more seriously by investing in something that, from our point of view, is more reliable.
There are a lot of VPS alternatives out there. Pretty much every hosting company has a VPS option.
Look into all the options and see what suits you.
Things to consider:
- data center location
- managed or unmanaged
- the operating system options
- what is included in the support
Here are some VPS providers that we worked and had good experiences with: Inmotion Hosting, Digital Ocean, Hostinger. You will find articles comparing them with one another, go ahead and read them.
If you’re mainly interested in development, get one that is in the same location as you. That’s what we did. Personally, I need the thing to be easy to access (fast) and have support in the same working hours as me.
Managed vs unmanaged VPS
All VPS options will have a managed or unmanaged alternative.
A managed VPS is one that already comes installed with a WHM/cPanel or other alternatives, it has everything set for you: installed libraries, the configuration in place, support that will do anything you need without you having to worry too much. All these, while in most cases also providing you access to all the VPS awesome features via a terminal.
An unmanaged VPS only comes with the OS installed and from there it’s up to what you need. You will have to install the WHM/cPanel, but apart from that you can install libraries and dependencies at your own will. When something is not working, it is you that has to go and look why. Also, support is limited to the OS and VPS – in most cases, they will not fix issues related to what you installed on the VPS.
To sum up, if you don’t want to ever worry about how things are working and what library is missing, etc., the managed VPS sounds like the better alternative. However, keep in mind that it is expensive. There can be a big difference in price (up to $35/month in some cases) between a managed and unmanaged version of the same VPS.
If you’re not afraid of using a terminal and you want to pick up some new skills regarding VPS configuration, go with the unmanaged version. It is not that hard. It took us half a day to get it up and running from zero to moving all the websites to it. And it will save you some money.
WHM and cPanel alternative
Something that you might not be aware of is that cPanel is actually not free. It’s licensed for about 15$ for one installment (1 account).
If you used a shared hosting until now, you most likely had cPanel and didn’t have to worry about it.
When you get a VPS you need to decide if you want to get cPanel (which comes with WHM), as it’s not included in the price.
The good thing is that most hosting companies that offer VPS are able to provide you with an offer of 5 cPanel licenses for about 20$. So you’ll be able to install cPanel accounts to manage different sites/domains however you find it useful.
Why you need WHM and cPanel
WHM (Web Host Manager) provides administrative control over your dedicated server or VPS. It allows a hosting provider to manage a customer’s account
To put it simply: WHM allows you to control the VPS and install cPanel accounts.
Without having this (or something similar) in place, you will only have to deal with the console in order to accomplish things and it might be a loss of time.
There are other free alternatives for cPanel, but I’ll mention just the one that we found to be the best: Virtualmin.
Virtualmin is easy to install, it comes with Webmin. Webmin is the equivalent of WHM.
It’s pretty intuitive, it has a nice visual dashboard, it allows you to run “scripts” – this is similar to the Softaculous part in cPanel. So you can easily install WordPress, a PHPMyAdmin, and other things in a specific folder.
Virtualmin has support for Let’s Encrypt certificates, which is also a huge plus. They are very easy to generate and will automatically be renewed, all done from the Virtualmin interface.
You have control over everything and the documentation is good.
Things to consider
- You will need to know how to work with a terminal, especially if you opted for the unmanaged version of a VPS.
Depending on the OS that you have, the commands will change a bit.
I know it seems scary, but it’s not that bad. Yes, you can break things, but if you follow the steps and read some articles + documentation for the problem you’re trying to solve, you will be alright. Think of it as an opportunity to learn new things.
- When installing a package/library, you need to know what it is for. You should check if you have a version of it in the first place, so you don’t have it in duplicate or add bloatware in there. You should also look over what is installed and clean things up from time to time
Our VPS option
Details at the time of writing this article:
- KVM VPS
- 50 GB storage (SSD)
- 4 GB memory
- 3 cores
- CentOS 7 (didn’t go with 8 because at this point Virtualmin doesn’t have support for CentOS 8)
- Unlimited bandwidth
- 9 EURO/month (+taxes)