blog-image

May 31, 2018

9 min read

How to install Webmin (cPanel alternative) on your server

Written by

Vippy The VPS
Webmin is a lightweight control panel to manage Linux machines with ease. With its web interface, you can create user accounts, set up cron jobs, check disk quotas, and much more. Better yet, installing Webmin is fairly straightforward, and the service is completely free. All in all, Webmin is handy for Linux/VPS beginners who are not comfortable with the Linux command line. In this article, we’ll set up Webmin on Ubuntu 18.04. These instructions should also work on Ubuntu 16.04.

Prerequisites for installing Webmin

  • A new Ubuntu 16.04/18.04 machine with at least 2 GB of RAM.
  • A valid DNS name pointing its A record to the IP address of your VPS.
[cta_inline]

Step 1. Configure fully-qualified domain name (FQDN) of your VPS

For Webmin to work you need to set up a fully-qualified domain name (FQDN). An FQDN is an absolute way of specifying a particular machine on a specific network and includes both a hostname and a domain name. Once you have an FQDN, you can set an A record on its DNS to point toward the IP address of your VPS. Set the hostname of the system by editing the file /etc/hostname, replacing YOUR-HOSTNAME with your hostname of choice:
$ vi /etc/hostname
YOUR-HOSTNAME
Next, edit the file /etc/hosts and add the following line at the end: The format is YOUR-IP YOUR-HOSTNAME.YOUR-DOMAIN YOUR-HOSTNAME.
$ sudo vi /etc/hosts
YOUR-IP YOUR-HOSTNAME.YOUR-DOMAIN YOUR-HOSTNAME
Here’s an example using an IP of 123.456.78.9, a hostname of webmin and a domain of example.com.
123.456.78.9 webmin.example.com webmin
Run the command below to restart hostname service and network manager to apply changes:
$ sudo systemctl restart systemd-logind.service
$ sudo systemctl restart NetworkManager.service
Now check the hostname and FQDN of your VPS. They should be updated based on what you just specified.
$ hostname
panel
$ hostname -f
panel.YOURDOMAIN

Step 2. Install Webmin

The first step towards the installation of Webmin is to add Webmin’s repository information to your source list for easy installation and updating of Webmin and its modules using apt-get. Edit /etc/apt/sources.list and add the following lines at the end of the file.
$ sudo vi /etc/apt/sources.list
....
....
deb http://download.webmin.com/download/repository sarge contrib
Add Webmin’s PGP key, so your system trusts the new repository we just added.
$ sudo wget -qO- http://www.webmin.com/jcameron-key.asc | sudo apt-key
Continue reading this article
by subscribing to our newsletter.
Subscribe now

A note about tutorials: We encourage our users to try out tutorials, but they aren't fully supported by our team—we can't always provide support when things go wrong. Be sure to check which OS and version it was tested with before you proceed.

If you want a fully managed experience, with dedicated support for any application you might want to run, contact us for more information.