Webmin is a free, open source, and web-based application that is used to manage Linux-based systems. It has a powerful and easy-to-use web interface that allows you to manage all types of services and configuration settings on the system. It is very difficult for novice Linux users to edit configuration files, manage web servers, FTP servers, run commands, install packages or manage email forwarding. With Webmin, you can do these tasks through an easy-to-use web interface.
With Webmin, you can manage most of your Linux systems including, manage user accounts, disk quota, install, delete and update packages, change system IP addresses, set firewalls, manage databases, manage web servers, and more.
In this tutorial, we will show you how to install Webmin and secure it with Let’s Encrypt SSL on an Ubuntu 20.04 server.
- Server running Ubuntu 20.04.
- A valid domain name is shown to your server.
- The root password is configured on your server.
Update System Package
Before starting, it is recommended to update your system package to the latest version. You can do this with the following command:
apt-get update -y apt-get upgrade -y
After your system is updated, restart to apply changes.
By default, Webmin is not available in the standard Ubuntu repositories. So, you need to add a Webmin repository to your system.
First, install the required packages with the following command:
apt-get install software-properties-common apt-transport-https wget -y
After all packages are installed, import the GPG Webmin key with the following command:
wget -q http://www.webmin.com/jcameron-key.asc -O- | apt-key add -
Next, add the Webmin repository to your system with the following command:
add-apt-repository "deb [arch=amd64] http://download.webmin.com/download/repository sarge contrib"
After the repository is added, install Webmin by running the following command:
apt-get install webmin -y
After the installation is successfully completed, you must get the following output:
Webmin install complete. You can now login to https://webmin.linuxbuz.com:10000/ as root with your root password, or as any user who can use sudo to run commands as root. Processing triggers for systemd (245.4-4ubuntu3) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for mime-support (3.64ubuntu1) ...
You can also verify the status of the Webmin service with the following command:
systemctl status webmin
You will see the following output:
? webmin.service - LSB: web-based administration interface for Unix systems Loaded: loaded (/etc/init.d/webmin; generated) Active: active (running) since Wed 2020-06-24 06:06:13 UTC; 3min 50s ago Docs: man:systemd-sysv-generator(8) Tasks: 3 (limit: 2353) Memory: 29.4M CGroup: /system.slice/webmin.service ?? 9393 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf ??10196 gpg-agent --homedir /root/.gnupg --use-standard-socket --daemon Jun 24 06:06:11 ubuntu20 systemd: Starting LSB: web-based administration interface for Unix systems... Jun 24 06:06:11 ubuntu20 perl: pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=root Jun 24 06:06:13 ubuntu20 webmin: Webmin starting Jun 24 06:06:13 ubuntu20 systemd: Started LSB: web-based administration interface for Unix systems. Jun 24 06:08:52 ubuntu20 perl: pam_unix(webmin:session): session opened for user root by (uid=0) Jun 24 06:08:52 ubuntu20 webmin: Successful login as root from 220.127.116.11
You can also stop the Webmin service using the following command:
systemctl stop webmin
At this point, Webmin is installed and listening on port 10000.
Access Webmin Web UI
Now, open your web browser and type the URL https: // your-ip-address: 10000. You will see a message about an SSL certificate that is not trusted. Because Webmin uses an untrusted, self-signed SSL certificate:
Ignore the message above and click continue to your ip (not secure). You should see the Webmin login page:
Provide the root username, password and click the Enter button. You should see the Webmin dashboard in the following screen:
Works with Webmin
You can now do a number of things on your Linux system. In this section, we will show you how to update packages, install git and create new users with the Webmin web interface.
Install and Update Packages
You can install the packages you want and update all packages using the Webmin web interface.
For example, if you want to install the Git package, click on the Software Systems => package. You will see the following screen:
Now, select “Package from APT“, type git, and click the Install button. You should see a list of all packages related to git on the following screen:
Now, click the Install Now button to install Git on your system. After the installation is complete, you will see the following screen:
If you want to update the package, click System => Software Package Update. You will see the following screen:
Now, select the package that you want to update and click the Update Selected Packages button.
Create and Manage Users
Webmin also allows you to create, edit and delete user accounts on your system.
To create a new user, click System => Users and Groups. You will see the following screen:
Click on the Create new user button. You will see the Create User screen:
Give your username, Choose Automatic for User ID, Give Your Real Name, For the Home Directory, choose Automatic, Choose Normal Password and type the password you want and then click the Create button to create a new user.
Secure Webmin with Let’s Encrypt SSL
By default, Webmin is configured to use self-signed certificates. So it is recommended to secure Webmin with a trusted SSL certificate.
Before starting, you must install Apache on your system. You can install it with the following command:
apt-get install apache2 -y
After the Apache web server is installed. Start the Apache service and activate it to start on the system reboot with the following command:
systemctl start apache2 systemctl enable apache2
You can verify the status of the Apache service using the following command:
systemctl status apache2
You should get the following output:
? apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2020-06-24 06:12:46 UTC; 12min ago Docs: https://httpd.apache.org/docs/2.4/ Main PID: 86885 (apache2) Tasks: 10 (limit: 4691) Memory: 55.4M CGroup: /system.slice/apache2.service ??86885 /usr/sbin/apache2 -k start ??87934 /usr/sbin/apache2 -k start ??87935 /usr/sbin/apache2 -k start ??87936 /usr/sbin/apache2 -k start ??87937 /usr/sbin/apache2 -k start ??87938 /usr/sbin/apache2 -k start ??87944 /usr/sbin/apache2 -k start ??87945 /usr/sbin/apache2 -k start ??87946 /usr/sbin/apache2 -k start ??87947 /usr/sbin/apache2 -k start Jun 24 06:06:11 ubuntu2004 systemd: Starting The Apache HTTP Server...
Next, log in to your webmin web interface. You will see the following screen:
Now, click on your server hostname. You will see the Hostname and DNS Client screens on the following page:
Enter your fully qualified Domain Name in the hostname field and click the Save button to save the changes you have made.
Next, click on Webmin => Webmin Configuration. You will see the following screen:
Now, click on SSL Encryption. You will see the following screen:
Click on the Let’s Encryption Tab, Give your domain name in the Hostnames field, provide your website’s root directory in another directory field, and click the Request Certificate button to install the certificate.
If you want to see the details of your current certificate, click on Webmin => Webmin Configuration and click on the Current Certificate tab. You will see the Let’s SSL Encryption certificate in the following screen:
Now, exit your Webmin interface and log in again using the secure URL https://webmin.linuxbuz.com.
In the tutorial above, you learned how to install Webmin on Ubuntu 20.04. You also learn how to update packages, create users, and secure Webmin with Let’s Encrypt SSL. You can now easily manage your Linux system through the Webmin web interface. For more information on using Webmin, visit the Webmin documentation. Feel free to ask me if you have questions.