Skip to main content

CWP: How to add Let's Encrypt SSL certificate to Webmin

By default, Webmin uses a self-signed SSL certificate so your web browser will warn you that the connection is not secure. You can accept the self-signed SSL certificate and proceed to the log in screen. Let's replace it with a valid certificate from Let's Encrypt.

We have already generated Lets Encrypt SSL certificate for our Server FQDN using certbot. Please check the Let's Encrypt section for How to install Let's Encrypt for Server FQDN? Click Here

Open the configuration file and add the following :
# systemctl  stop  webmin
# vi /etc/webmin/miniserv.conf 



# This will redirect from http to https

Restart the Webmin Service:
# systemctl restart webmin
# systemctl status  webmin  -l
Now login to your server 
This non secure connection will redirect to
Alternative Way:
# cd /etc/webmin
# mv miniserv.pem miniserv.pem.old
# cat /etc/letsencrypt/live/YOURDOMAIN/cert.pem /etc/letsencrypt/live/YOURDOMAIN/privkey.pem /etc/letsencrypt/live/YOURDOMAIN/chain.pem > /etc/webmin/miniserv.pem