How to Install Webmin with free Let's Encrypt SSL Certificate on Ubuntu 22.04
This tutorial exists for these OS versions
- Ubuntu 22.04 (Jammy Jellyfish)
- Ubuntu 20.04 (Focal Fossa)
- Ubuntu 15.04 (Vivid Vervet)
- Ubuntu 7.04 (Feisty Fawn)
On this page
Webmin is a web-based application for managing Linux-based operating systems. It is designed for beginner users who are not familiar with the command line interface. It helps users to edit the configuration file, set up a web server, FTP server, run commands, install packages or manage email forwarding and manage everything via a web browser. It offers a simple and web-based user interface to manage your remote Linux systems.
In this tutorial, we will show you how to install Webmin and secure it with Let's Encrypt on Ubuntu 22.04 server.
- A server running Ubuntu 22.04.
- A valid domain name is pointed to your server.
- A root password is configured on your server.
Before starting, it is recommended to update your system packages to the latest version. You can do it with the following command:
apt-get update -y
apt-get upgrade -y
Once your system is updated, restart it to implement the changes.
Install Webmin on Ubuntu 22.04
By default, Webmin is not available in the Ubuntu standard repository. So you will 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
Once all the packages are installed, import the Webmin GPG 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"
Once the repository is added, install the Webmin by running the following command:
apt-get install webmin -y
After the successful installation, you can verify the status of the Webmin service with the following command:
systemctl status webmin
You should see the following output:
? webmin.service - Webmin server daemon Loaded: loaded (/lib/systemd/system/webmin.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2022-09-18 07:32:41 UTC; 42s ago Process: 58866 ExecStart=/usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf (code=exited, status=0/SUCCESS) Main PID: 58867 (miniserv.pl) Tasks: 1 (limit: 4579) Memory: 27.8M CPU: 644ms CGroup: /system.slice/webmin.service ??58867 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf Sep 18 07:32:38 ubuntu2204 systemd: Starting Webmin server daemon... Sep 18 07:32:38 ubuntu2204 perl: pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=root Sep 18 07:32:41 ubuntu2204 webmin: Webmin starting Sep 18 07:32:41 ubuntu2204 systemd: Started Webmin server daemon.
To stop the Webmin service use the following command:
systemctl stop webmin
At this point, Webmin is installed and listening on port 10000. You can verify it with the following command:
You should get Webmin listening port in the following output:
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 4096 0.0.0.0:10000 0.0.0.0:* users:(("miniserv.pl",pid=58867,fd=5))
Access Webmin Web UI
Now, open your web browser and type the URL https://your-ip-address:10000. You should see the message about the untrusted SSL certificate. Because Webmin uses an untrusted self-signed SSL certificate:
Ignore the above message and click on proceed to your-ip (unsafe). You should see the Webmin login page:
Provide your root username, password and click on the Sign in button. You should see the Webmin dashboard on the following screen:
How to Use Webmin
You can now perform several things on your Linux system. In this section, we will show you how to update packages, install git and create a new user with the Webmin web interface.
Install and Update Packages
You can install your desired package and update all packages using the Webmin web interface.
For example, if you want to install a net-tools package, click on the Systems => Software packages. You should see the following screen:
Now, select "Package from APT", type net-tools, and click on the Install button. You should see the following screen:
Create and Manage Users
Webmin also allows you to create, edit and delete user accounts on your system.
To create a new user, click on the System => Users and Groups. You should see the following screen:
Click on the Create a new user button. You should see the Create User screen:
Provide your username, Select Automatic for User ID, Provide your Real Name, For Home Directory, select Automatic, Select Normal Password and type your desired password then click on the Create button to create a new user. You should see the newly created user on the following screen:
Once you are done, you can proceed to the next step.
Enable SSL on Webmin
By default, Webmin is configured to use a self-signed certificate. So it is recommended to secure Webmin with a trusted SSL certificate.
Before starting, you will need to install Apache in your system. You can install it with the following command:
apt-get install apache2 certbot python3-certbot-apache -y
Once the Apache webserver is installed. Start the Apache service and enable it to start at 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 active status of the Apache server in 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 2022-09-18 07:47:13 UTC; 11s ago Docs: https://httpd.apache.org/docs/2.4/ Main PID: 62034 (apache2) Tasks: 55 (limit: 4579) Memory: 5.1M CPU: 39ms CGroup: /system.slice/apache2.service ??62034 /usr/sbin/apache2 -k start ??62038 /usr/sbin/apache2 -k start ??62039 /usr/sbin/apache2 -k start Sep 18 07:47:12 webmin.linuxbuz.com systemd: Starting The Apache HTTP Server... Sep 18 07:47:13 webmin.linuxbuz.com systemd: Started The Apache HTTP Server.
On the Webmin interface, click on your Networking => Network Configuration then click on the Hostname and DNS. You should see the following screen:
Provide your fully qualified Domain Name into hostname field and click on Save button to apply the configuration changes.
Next, click on the Webmin => Webmin Configuration. You should see the following screen:
Now, click on the SSL Encryption. You should see the following screen:
Click on the Let's Encrypt Tab, Provide your domain name in Hostnames field, Provide your website root directory in the Other directory fields, and click on the Request Certificate button to install the certificate.
Now, log out from your Webmin interface and log in again using the secure URL https://webmin.linuxbuz.com.
Congratulations! you have successfully installed Webmin with Let's Encrypt SSL on Ubuntu 22.04. You can now install Webmin on your remote server to manage your Linux system through the Webmin web interface. Feel free to ask me if you have any questions.