Webmin is a server control panel that lets you manage your server using a sleek modern interface. With it, you’ll be able to adjust to a myriad of settings as well as manage users/groups and software packages. In this tutorial, we’re going to install Webmin, do some basic configuration, and then secure access to the control panel.
Before going through the steps in this article, there are a couple of things to make sure of. First, make sure your LAMP stack has been installed and is running correctly. You should at least be able to get to the default Ubuntu index page on Apache and phpinfo() should be returning valid output.
Additionally, make sure to have a fully qualified domain name as we’re going to be securing our Webmin Panel using a certificate from Let’s Encrypt.
- Add the Webmin Repository to the sources.list File
sudo nano /etc/apt/sources.list
Add the following to the bottom and save the file then exit:
deb http://download.webmin.com/download/repository sarge contrib
- Add Webmin’s PGP Key
wget http://www.webmin.com/jcameron-key.asc sudo apt-key add jcameron-key.asc
- Update the List of Packages Now That Webmin is Included
sudo apt update
- Install Webmin
sudo apt install webmin
At this point, Webmin is running but you have to reference port 10000 on the IP/domain. We’re going to install a TSL/SSL certificate from Let’s Encrypt and use Apache to proxy requests to Webmin on port 10000.
- Create a New Apache Virtual Host File
sudo nano /etc/apache2/sites-available/yourdomainname.conf
- Add the Following Text to the New File Then Save and Close the File
<VirtualHost *:80> ServerAdmin YourEmailAddress ServerName YourDomainName ProxyPass / http://localhost:10000/ ProxyPassReverse / http://localhost:10000/ </VirtualHost>
- Open Webmin’s miniserv.conf File
sudo nano /etc/webmin/miniserv.conf
- Locate the Line
and Change It to
then Save and Close the File.
- Open the Webmin Config File
sudo nano /etc/webmin/config
- Add the Following Line to the Bottom of the File:
- Restart Webmin
sudo systemctl restart webmin
- Enable Apache’s proxy_http Module
sudo a2enmod proxy_http
- Enable the Virtual Host
sudo a2ensite YourDomainName
- Restart Apache
sudo systemctl restart apache2
- Create Your Security Certificate
sudo certbot --apache --email YourEmailAddress -d YourDomainName --agree-tos --redirect --noninteractive
You should see some output indicating that you have successfully enabled https://YourDomainName.
Webmin is now installed, running, and you’ve secured the control panel.
As soon as you log in you will be on the Dashboard where you can get a quick overview of system health and see critical information such as update notifications. Use the left-hand menu to explore all the different tasks Webmin makes easier.