How to setup Webmin on Ubuntu 18.04

Webmin is a great web-based control panel for various Linux/Unix distro. It allow you to configure your server through a modern web-based interface.

Installing Webmin

First, we need to add the Webmin repository so that we can easily install and update Webmin using our package manager. We do this by adding the repository to the /etc/apt/sources.list file.

Open the file in nano editor:

$ sudo nano /etc/apt/sources.list

Then add the following line to the bottom of the file to add the new repository:

deb sarge contrib

Next, add the Webmin PGP key so that your system will trust the new repository:

$ wget
$ sudo apt-key add jcameron-key.asc

Next, update the list of packages to include the Webmin repository:

$ sudo apt update

Then install Webmin:

$ sudo apt install webmin

Once the installation finishes, you’ll be presented with the following output:

Webmin install complete. You can now login to 
https://your_server_ip:10000 as root with your 
root password, or as any user who can use sudo.

Verify Webmin is working:

$ wget http://localhost:10000

Remote access to Webmin

Though Webmin can be access through the web securely by implement 2FA, using HTTPS connection and even changing the port number but this will only reduce and not eliminating the risks.
It make senses that I can use SSH Tunnel as I am the only one accessing it.

First, We will need to block the internet access to webmin:

$ sudo ufw delete allow 10000

Next, we will establish local port forwarding through an SSH tunnel: 

$ ssh -p 22 user@host -L <local-port>:<remote-host>:<remote-port> -N &

Lastly, we access webmin using the following url:


How To Install Webmin on Ubuntu 18.04
Securing Access to Webmin through an SSH Tunnel