Webmin on debian with let’s encrypt

What do we want to archive

Installation of webmin on debian, and adding a certbot SSL certifcate

Requirements

Debian, certbot

How do we get there

First step is the installation of webmin, which is perfectly described on the official page. At the current time and version, this amounts to the following steps, asuming a clean system:

#apt install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
#wget http://prdownloads.sourceforge.net/webadmin/webmin_1.941_all.deb
#dpkg --install webmin_1.941_all.deb

This will get the standard webmin installation running on port 10000 in SSL mode on your server. Open firewall ports as needed, using ufw for example:

#ufw allow from my.ip to port 10000
  • Log into webmin. On the system status page, you will see the hostname of your system. We need to complete this into a fully qualified name that matches your server. Click on it to edit, and complete the hostname. Save and activate the configuration. Upon returning to the system information page, you will now see a complete domain name.

  • Next, navigate to Webmin, Webmin configuration and choose SSL Encryption.
  • Move to the let’s encrypt tab
  • Verify the hostname, should be correct already (1)
  • Set the website root directory to /var/www/html
  • Set the let’s Encrypt server to ‘real’
  • Set the automatic renew frequency to 1 month
  • Hit ‘Request certificate’
  • After a few seconds this process should complete and report success.
  • Return to Webmin configuration
  • Restart Webmin
  • Close your browser and re-login to Webmin. You will now have a secured connection with a valid certificate.