VPSTuts > Control Panel > Webmin > Install Webmin – Ubuntu APT

Install Webmin – Ubuntu APT

Webmin Control Panel on Ubuntu logo

The Webmin Control Panel for Ubuntu

Tutorial Overview

In this tutorial we will do the following:

  1. Install Webmin on Ubuntu using apt-get
  2. Ensure HTTPS support using SSL
  3. Change the default Webmin port

About Webmin

Webmin is a general VPS administration control panel aimed at the more advanced VPS users and not specifically made for web hosting, although it is often used by those hosting websites. It is considered the ‘swiss-army’ tool of Linux web GUI based VPS administration, with modules available to suite just about any need.

Unlike many of the other VPS control panels, like WHM / cPanel, Kloxo, DirectAdmin, etc. Webmin is not designed specifically to be used for web hosting and is thus far less intrusive with regards its requirements and what it actually does to the VPS.

This tutorial focuses on installing Webmin using APT. We also show you have to install Webmin on CentOS using YUM.

Preparing Ubuntu

First you need to open a command shell (SSH) to your Ubuntu VPS and ensure that your operating system is up to date. To do so run the following commands:

apt-get update
apt-get -y upgrade

Next we need to make sure that your VPS has the correct libraries and applications installed to support the Webmin installation. Of particular interest is the libnet-ssleay-pearl library, as this will ensure that Webmin is install with SSL (HTTPS) support:

apt-get -y install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

Once the above has been installed the next job is to update our Ubuntu repository sources to include Webmin:

vi /etc/apt/sources.list

Add the following two lines to the bottom of the file:

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Now we need to save and exit from the file. As we are using the ‘vi/vim’ editor, we do so with the following commands:

ESC key
:wq
ENTER key

Our Ubuntu VPS now knows where to get the latest Webmin application from, but at the moment it doesn’t trust the source, so we need to add the Webmin GPG key to our VPS in order to fix this. To do so run the following commands:

cd /root
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc

Installing Webmin – Command line

Finally, we want to update our Ubuntu apt cache so it knows about the new Webmin repository and then actually install Webmin. The following two commands do just that:

apt-get update
apt-get install webmin

Webmin will now be downloaded from the repository and installed on your Ubuntu VPS. At the end of the installation some information will be output to the command line telling you how you can connect to the Webmin GUI. The connection URL should be something like:

https://[VPS IP ADDRESS]:10000

Note that secure HTTPS protocol is being employed here to encrypt the data sent between the VPS and user. The SSL certificate being used is ‘self-signed‘ and thus, most web browsers will throw up an alert when you visit the URL.

Change The Webmin Port Number

It is advised that you connect to Webmin and change the port number from the standard 10000, to something else in order to avoid most automated port scans. The easiest way to change the Webmin port number is to login the the Webmin interface using your preferred web browser and navigate the following menu options:

Webmin -> Webmin Configuration -> Ports and Addresses

Once there, you want to change the Listen on IPs and ports settings. Ideally, you should change it to something above 20000.