How To Install Virtualmin/Webmin Ubuntu 20.04
Webmin is a web front-end that allows you to manage your server remotely through a browser. Virtualmin is a plugin for Webmin that simplifies the management of multiple virtual hosts through a single interface, similar to cPanel or Plesk. With Virtualmin, you can manage user accounts, Apache virtual hosts, DNS entries, MySQL databases, mailboxes, and much more.
In this tutorial, you’ll use a script to install the free edition, Virtualmin GPL. This script will install everything you need to use Virtualmin, including Webmin and the following prerequisites:
- -A supported Linux distribution
- -A supported web server (Apache, Nginx, or Lighttpd)
- -A supported database server (MySQL or PostgreSQL)
- -A supported mail server (Postfix, Exim, Sendmail, or Dovecot)
When you have installed Virtualmin and its components, you will configure Webmin through its graphical interface. You can create a new virtual host with Virtualmin, and complete this tutorial to create any number of user accounts. This will allow you to host multiple domains on a single server through your browser.
- To begin, you will need to set up a new Ubuntu 16.04 and above server with at least 1GB of RAM. You can find our initial server setup guide for Ubuntu 16.04 here. Be sure to complete the guide up to and including the section on setting up a sudo non-root user. You will also need to set up a firewall using the UFW application.
- Next, you will need to configure a Fully-Qualified Domain Name to point to your new server. You can learn how to do this by following our How To Set Up a Host Name with DigitalOcean tutorial.
- Once your domain is pointing to your server.
Step-1 Check Updates
First, log in to your server as your non-root user. Once you have logged in, update the package database:
sudo apt-get update
Then install any necessary updates and packages to ensure you start with a stable and up-to-date system.
sudo apt-get dist-upgrade -y
Step 2 — Installing Virtualmin
To install Virtualmin, download and run the official Virtualmin installation script, which will install Virtualmin, and Webmin, along with a LAMP stack, BIND, and Postfix.
wget to download the script:
While this script comes from the official Virtualmin website, you may want to open the script in your editor and review the contents before running it.
sudo nano ./install.sh
Once you’re comfortable with the contents of the script, use it to install Virtualmin and its prerequisites:
sudo /bin/sh ./install.sh
The script will display a warning message about existing data and compatible operating systems. Press
y to confirm that you want to continue the installation.
The script will take some time to complete all the steps as it installs various software packages and components.
Once the script completes, you can configure the root password.
Step 3 — Configuring Webmin’s Root Password
To change Webmin’s root password, use the following command:
sudo /usr/share/webmin/changepass.pl /etc/webmin root yourpassword
yourpassword with your preferred password.
Next, restart the Webmin service so the changes take effect.
sudo systemctl restart webmin
Next, we will configure Webmin using the web front-end.
Step 4 — Configuring Webmin Using The Post-Installion Wizard
To configure Webmin, we’ll use its web-based Post-Installation Wizard. Open your web browser and navigate to
https://your_server_ip:10000. You can also use your fully-qualified domain name to access the site.
Log in as the root user with the newly-changed password you set in the previous step.
Once you have logged in, you’ll see the Introduction screen stating that you are going through the steps to configure Virtualmin. Press Next to continue.
On the Memory use screen, select No for Preload Virtualmin libraries, since you don’t need to run the Virtualmin UI all the time. Select Yes for Run email domain lookup server to enable faster mail processing. Press Next to continue.
On the Virus scanning screen, select No for Run ClamAV server scanner so you’ll use less RAM. Press Next to continue.
On the Spam filtering screen, select No for Run SpamAssassin server filter and press Next to continue.
The next three screens configure the database server:
- On the Database servers screen, select Yes to Run MySQL database server and no to Run PostgreSQL database server. Press Next to continue.
- On the MySQL password screen, enter your desired MySQL root password. It should be different from the root password you used to log in to Webmin.
- On the MySQL database size screen, select the RAM option that matches the amount of RAM your server has. For a 1GB server, select Large system (1G) on which MySQL is heavily used. Press Next to continue.
Enter your primary and secondary nameservers here which you configured in the prerequisites. If you haven’t set these up, check the Skip check for resolvability box to avoid error message and proceed.
Next, on the Password storage mode screen, select Store plain-text passwords if you must support password recovery. Otherwise, choose Only store hashed passwords. After clicking Next, you will see the All done screen. Click Next to end.
Finally, you’ll be presented with the Virtualmin/Webmin dashboard.
You may see a message at the top stating that Virtualmin comes with a new theme. To activate the new theme, click the Switch Themes button. The page will reload but may look unstyled, as the new theme’s CSS file might not load properly. To solve this issue, refresh your browser manually.
You may also see a message stating that Virtualmin’s configuration has not been checked. Click the Re-check and refresh configuration button to check your Virtualmin configuration. Address any errors that the check reports.
Your server is now configured. Let’s use the interface to create a new virtual server.
I’m Kunal Guha, a passionate and experienced digital marketer with a career spanning 9 years.
As Experienced Digital Marketing Manager with extensive experience building, maintaining, and running successful digital marketing campaigns.