Webmin is a web-based application for managing Linux-based operating systems. It is ideal for users who prefer not to use the command line interface. With Webmin, you can edit configuration files, set up web and FTP servers, run commands, install packages, manage email forwarding, and perform various administrative tasks – all via a web browser. It offers a simple, user-friendly interface for managing remote Linux systems.

In this tutorial, we will guide you through the process of installing Webmin and securing it with Let’s Encrypt on an Ubuntu 24.04 server.

Prerequisites

  • A server running Ubuntu 24.04.
  • A valid domain name pointed to your server.
  • A root password configured on your server.

Getting Started

Before beginning, it’s advisable to update your system packages to the latest versions. Run the following commands to update and upgrade your system:

apt update -y

apt upgrade -y

After the update completes, it’s a good idea to reboot your system to apply all changes:

reboot

Install Webmin on Ubuntu 24.04

Webmin is not included in the Ubuntu standard repositories by default, so you need to add the Webmin repository to your system.

First, install the necessary packages with the following command:

apt install software-properties-common apt-transport-https wget -y

Next, import the Webmin GPG key with this command:

wget -q http://www.webmin.com/jcameron-key.asc -O- | apt-key add -

Now, add the Webmin repository to your system:

add-apt-repository "deb [arch=amd64] http://download.webmin.com/download/repository sarge contrib"

After adding the repository, install Webmin using the following command:

apt install webmin -y

Once the installation is complete, verify the Webmin service status with this command:

systemctl status webmin

If Webmin is running correctly, you should see output similar to this:

? webmin.service - Webmin server daemon
     Loaded: loaded (/lib/systemd/system/webmin.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2024-08-30 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

Aug 30 07:32:38 ubuntu2404 systemd[1]: Starting Webmin server daemon...
Aug 30 07:32:41 ubuntu2404 webmin[58866]: Webmin starting
Aug 30 07:32:41 ubuntu2404 systemd[1]: Started Webmin server daemon.

To stop the Webmin service, use the following command:

systemctl stop webmin

At this point, Webmin should be installed and listening on port 10000. Verify this with:

ss -antpl

The output should indicate that Webmin is listening on port 10000:

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

To access the Webmin interface, open your web browser and navigate to https://your-ip-address:10000. You will see a warning about an untrusted SSL certificate, as Webmin uses a self-signed certificate by default:

<img alt="Webmin access" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p1.png66d214a8f172c.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="506" loading="lazy" src="data:image/svg xml,” width=”750″>

Ignore the warning and proceed to the site. You should be presented with the Webmin login page:

<img alt="Login to Webmin" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p2.png66d214a942a61.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="399" loading="lazy" src="data:image/svg xml,” width=”750″>

Enter your root username and password, then click the Sign in button. You will then see the Webmin dashboard:

<img alt="Webmin Dashboard" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p3.png66d214a98c49d.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="367" loading="lazy" src="data:image/svg xml,” width=”750″>

Using Webmin

With Webmin, you can perform various administrative tasks on your Linux system. Below, we’ll demonstrate how to update packages, install Git, and create a new user using the Webmin web interface.

Install and Update Packages

You can easily install new packages and update existing ones using Webmin.

For instance, to install the net-tools package, navigate to System => Software Packages. The following screen will appear:

<img alt="Install packages" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p4.png66d214a9e5af2.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="365" loading="lazy" src="data:image/svg xml,” width=”750″>

Select “Package from APT“, enter net-tools, and click the Install button. The package will be installed, and you’ll see the confirmation screen:

<img alt="Linux package installation with Webmin" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p5.png66d214aa621aa.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="367" loading="lazy" src="data:image/svg xml,” width=”750″>

Create and Manage Users

Webmin also allows you to create, edit, and delete user accounts.

To create a new user, go to System => Users and Groups. You will see the following screen:

<img alt="manage Linux users with Webmin" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p6.png66d214aab7382.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="366" loading="lazy" src="data:image/svg xml,” width=”750″>

Click on the Create a new user button. The Create User screen will appear:

<img alt="Create new Linux user" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p8.png66d214ab2ab01.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="469" loading="lazy" src="data:image/svg xml,” width=”750″>

Enter the username, set the User ID to Automatic, provide the Real Name, choose Automatic for the Home Directory, and select Normal Password. Enter your desired password and click the Create button. The new user will appear in the user list:

<img alt="List of Linux users" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p10.png66d214ab5c784.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="119" loading="lazy" src="data:image/svg xml,” width=”750″>

Enable SSL on Webmin

Webmin is configured to use a self-signed SSL certificate by default. It is recommended to secure Webmin with a trusted SSL certificate.

First, install Apache and Certbot with the following command:

apt-get install apache2 certbot python3-certbot-apache -y

After installing Apache, start the service and enable it to start on boot:

systemctl start apache2

systemctl enable apache2

Verify the status of the Apache service:

systemctl status apache2

The output should indicate that Apache is active and running:

? apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2024-08-30 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

Aug 30 07:47:12 webmin.linuxbuz.com systemd[1]: Starting The Apache HTTP Server...
Aug 30 07:47:13 webmin.linuxbuz.com systemd[1]: Started The Apache HTTP Server.

In the Webmin interface, go to Networking => Network Configuration, then click on Hostname and DNS. You should see the following screen:

<img alt="Server hostname configuration" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p11.png66d214abbd3df.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="344" loading="lazy" src="data:image/svg xml,” width=”750″>

Enter your fully qualified domain name in the hostname field and click Save to apply the changes.

Next, go to Webmin => Webmin Configuration. The following screen will appear:

<img alt="Webmin configuration" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p12.png66d214ac2c16e.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="367" loading="lazy" src="data:image/svg xml,” width=”750″>

Click on SSL Encryption to access the SSL settings:

<img alt="SSL Encryption" data-ezsrc="https://kirelos.com/wp-content/uploads/2024/08/echo/p13.png66d214ac5121a.jpg" ezimgfmt="rs rscb10 src ng ngcb9" height="367" loading="lazy" src="data:image/svg xml,” width=”750″>

Under the Let’s Encrypt tab, enter your domain name in the Hostnames field, specify the website root directory in the Other directory fields, and click Request Certificate to obtain and install the SSL certificate.

Finally, log out of Webmin and log in again using the secure URL https://webmin.yourdomain.com.

Conclusion

Congratulations! You have successfully installed Webmin and secured it with Let’s Encrypt SSL on Ubuntu 24.04. With Webmin, you can easily manage your Linux system via a web-based interface. If you have any questions, feel free to ask for help.