How to Install Webmin with free Let's Encrypt SSL Certificate on Ubuntu 24.04

Webmin is a popular web-based control panel that allows you to manage your server through an easy-to-use interface. In this guide, we will walk through how to install Webmin on Ubuntu 24.04 and secure it with a free Let's Encrypt SSL certificate. This setup is ideal for both local servers and VPS servers.

Step 1: Update Your System

Before installing Webmin, ensure that your Ubuntu 24.04 system is up to date. Open your terminal and run the following commands:

sudo apt update && sudo apt upgrade -y

Step 2: Install Webmin

To install Webmin, first, you need to add the Webmin repository. Start by adding the Webmin GPG key:

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

Next, add the Webmin repository by editing the sources list:

sudo nano /etc/apt/sources.list

Add the following line at the end of the file:

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

Save the file, then update the package list and install Webmin:


sudo apt update
sudo apt install webmin -y
        

Step 3: Access Webmin

After Webmin is installed, you can access it via your web browser using your server’s IP address on port 10000. For example:

https://your-server-ip:10000

By default, Webmin uses a self-signed SSL certificate, which will prompt a browser warning. In the following steps, we will replace it with a free Let's Encrypt SSL certificate.

Step 4: Install Let's Encrypt Certbot

To install a free SSL certificate from Let's Encrypt, we will use Certbot. Install Certbot using the following command:

sudo apt install certbot -y

Step 5: Configure SSL in Webmin

To configure Webmin to use Let's Encrypt, follow these steps:

  1. Log in to your Webmin dashboard.
  2. Navigate to Webmin Configuration > SSL Encryption.
  3. Click on the Let's Encrypt tab.
  4. Enter your domain name under "Hostname for certificate." Ensure that your domain is pointed to the server.
  5. Select the path to your Webmin directory for the certificate to be installed. Typically, this will be /etc/webmin.
  6. Click the "Request Certificate" button to request and install the Let's Encrypt SSL certificate.

Webmin will now be secured with an SSL certificate issued by Let's Encrypt.

Step 6: Enable Auto-Renewal for Let's Encrypt

To ensure that your Let's Encrypt SSL certificate is automatically renewed, you need to configure Certbot to run as a cron job. Open the cron file with the following command:

sudo crontab -e

Add the following line to renew the certificate every day at midnight:

0 0 * * * /usr/bin/certbot renew --quiet

Save and exit the file. Certbot will now automatically renew your Let's Encrypt SSL certificate.

Securing Webmin on a VPS

Using Webmin with a free Let's Encrypt SSL certificate is a great way to secure your server management. If you're managing a VPS server, this setup allows you to ensure secure access to your control panel, reducing the risk of unauthorized access.

Running Webmin on a VPS Server

Whether you're hosting websites, managing databases, or handling server administration tasks, using Webmin on a VPS server provides a convenient and secure way to manage your resources. With Webmin and Let's Encrypt SSL, you can confidently manage your VPS with enhanced security.

Looking for Reliable VPS Hosting?

If you're looking for a reliable VPS server to host Webmin and other applications, consider using WindowsVPS. With WindowsVPS, you get scalable, secure VPS hosting that allows you to manage your server with ease.

¿Fue útil la respuesta? 0 Los Usuarios han Encontrado Esto Útil (0 Votos)