Install and configure Webmin with a free Let Encrypt SSL certificate on Debian 10

Webmin is a web-based remote management application for system administration that simplifies the process of managing Unix-like systems. This is much simpler and simpler than the traditional method in which you need to manually modify configuration files, execute commands to create user accounts, configure servers, and much more. It allows you to solve these problems with a single standardized web interface, automatically updating the necessary configuration files. With it, you can manage user accounts, set disk quotas, install, remove applications, change network settings, manage a database, share files, etc.

In this article, we describe a step-by-step method of installing Webmin on a Debian OS. We will also discuss how to configure and access Webmin with our domain name.

We have completed the commands and procedures mentioned in this article for the Debian10 OS.

Installing Webmin on Debian 10

Webmin is installed through the command line terminal. To open the terminal, go to the “Actions” tab in the upper left corner of the desktop. Then in the search bar enter terminal. when the terminal icon appears, click on it to open.

Adding a Webmin Repository

There are two methods by which we can add the Webmin repository to our list of sources. We will describe both methods here.

Method 1:

Webmin packages are not available in the official Debian repositories. It is available for download in RPM, DEB and TAR packages. So, first we need to add a link to the Webmin repository in the sources.list file. To do this, open the / etc / apt / sourceslist file using the following command:

$ sudo nano /etc/apt/sources.list

then at the bottom of the file, enter the following line to add the Webmin repository:

deb http://download.webmin.com/download/repository sarge contrib

When done click Ctrl + O save and then Ctrl + X log off.

Next at this stage we will need to get the Webmin PGP key with which the repository was signed. To do this, run the following command:

$ wget http://www.webmin.com/jcameron-key.asc

Download vault key

Now add the key using the following command:

Add storage key

Method 2:

There is an alternative way to add storage and key. To do this, follow these steps:

To download and add the Webmin repository key, run the following command in the terminal:

$ wget -qO- http://www.webmin.com/jcameron-key.asc | sudo apt-key add

Download and install the key in one step

Then, to add the Webmin repository, run the following command in the terminal:

Advertisement

$ sudo add-apt-repository "deb http://download.webmin.com/download/repository sarge contrib"

Add repository

Install webmin

We will now update the list of Debian packages using the Webmin repository. To do this, execute the following command in the terminal:

$ sudo apt update

Refresh repository package list

Then install Webmin by running the following command in the terminal:

$ sudo apt install webmin

Install webmin

The system will ask for confirmation by providing Y / N option. Hit Y to confirm.

After installation is complete, find these lines at the end of the output:

Webmin installation completed

Configure Webmin

Here we will create an Apache virtual host to access Webmin using a domain name. We will also configure Apache to be in front of Webmin and accept requests through port 80. Then these requests will be sent to Webmin running on port 10000. At this step, it is assumed that you already have an Apache server installed.

I will use the domain yourdomain.tld as an example of the domain name below. Replace it with your domain name, wherever it appears in the files we create below, as well as in commands.

(Note: This step is not required if you want to access Webmin only on the local host.)

Step 1. Create a new Apache virtual host file

To create a new Apache virtual host file in / etc / apache2 / sites-available /, run the following command in the terminal:

$ sudo nano /etc/apache2/sites-available/yourdomain_tld.conf

Add the following lines to it:


  ServerAdmin [email protected]
  ServerName yourdomain.tld
  ProxyPass / http://localhost:10000/
  ProxyPassReverse / http://localhost:10000/

replace Your e-mail address and your_domainName with your own email address and domain name.

Webmin virtual host

The above configuration will allow Apache to send requests to a Webmin server running on port 10000. After that, use Ctrl + O save and then Ctrl + X exit the file.

Step 2: Stop Webmin from Using TLS / SSL

In this step, we will help Webmin stop using SSL / TLS, as Apache will provide us with this. To do this, open the miniserv.conf file located in / etc / webmin / with the following command:

$ sudo nano /etc/webmin/miniserv.conf

Find string 1 = SSL and change it to = 0 SSLas below:

Configure Webmin

When done click Ctrl + O save and Ctrl + X log off.

Step 3: add your domain name to the list of allowed domains

The next thing to do is add your domain name to the list of allowed domains in the Webmin configuration. Open the file with this command:

Next, we will add our domain name to the list of allowed domains in the Webmin configuration file. To edit the configuration file, enter the following command in the terminal:

$ sudo nano /etc/webmin/config

At the end of the file, add the following line:

referers=yourdomain.tld

replace yourdomain.tld with your domain name. as soon as you do use Ctrl + O save and Ctrl + X exit the file.

Webmin config file

Step 4. Restart Webmin to apply the settings.

To apply the above configuration changes, we will need to restart the Webmin service. To do this, run the following command:

$ sudo systemctl restart Webmin

Restart Webmin

Step 5: Activate the Apache proxy_http module and your Apache virtual host

First enable the Apache proxy_http module using the following command:

$ sudo a2enmod proxy_http

Enable proxy module

Now restart the apache2 service to activate the new configuration:

$ sudo systemctl restart apache2

Restart Apache

Then enable the Apache virtual host with the following command:

$ sudo a2ensite yourdomain.tld

Activate vhost site

Finally restart the Apache2 service.

Secure Webmin with Let’s Encrypt Free SSL Certificate

To secure Webmin with the free Let Encrypt SSL certificate, we will install the Certbot Let Encrypt client.

apt-get install certbot python-certbot-apache

Then run the certbot command to get a free SSL certificate:

certbot --apache

Select the Webmin website in the dialog that appears on the screen.

Webmin Access

To access Webmin, go to the following address:

https://yourdomain.tld

You will see the next login page. Log in using root or another privileged user.

Webmin login

After logging in, you will see a toolbar similar to the one below, providing you with basic information about your system:

Webmin Toolbar

So, we learned how to install and configure Webmin on the Debian OS. Now you can use this convenient and web-based admin tool to administer and manage Linux servers, packages and users on the fly! This is a really useful tool for both beginners and professional system administrators.

Install and configure Webmin with a free Let Encrypt SSL certificate on Debian 10

Sidebar