Sysadmin: Virtualmin and Letsencrypt integration


If you are using webmin excellent system for managing virtual host configuration it would make perfect sense to integrate with it the popular certificate authority Letsencrypt that issues completely free SSL certificates.
There are few initial steps that has to be made nside Webmin in order to make it utilize Letsencrypt SSL certificate issuing process for configured virtual hosts. I have successufully configured and used Webmin version 1.831 and certbot-auto 0.12. YMMV.

  • Assuming that you have installed and configured certbot-auto script you will need to point Webmin configuration towards this installation from within Webmin->Webmin configuration module settings.

    Enter location of certbot-auto script with full path and click Save.
  • Next step would be to switch to Virtualmin tab, and verify in Virtualmin Configuration that it uses default acceptable RSA key bit strength
    .
  • Next step inside Virtualmin – from under Settings->features and Plugins check “SSL website” feature if it was unchecked
  • Now, from the dropdown domain list on the left top, select the domain you need to switch to SSL (needless to mention that the site have to be live – i.e. properly configured with DNS) and click “Edit Virtual Server” link. In the list of Enabled features (Note: you will have to click on it to expand the features list) you need to check “SSL website enabled”.
    and click Save Virtual Server button. You will see your virtual host being reconfigured for SSL.
  • Now, under “Server Configuration”->”Manage SSL certificate”, you need to click “Let’s Encrypt” tab to bring up Letsencrypt configuration form

    Verify that all necessary virtual host aliases (that should be present in DNS zone for this domain as well) and press “Request certificate” button

    If everything is configured properly you will see the operation progress in the same window.
  • If the SSL certificate was issued successfully, you should be able to see it already configured for the site, after switching to the “Current certificate” tab in the same screen.


At this point your Virtual server is configured with valid Let’s encrypt SSL certificate and HTTPS web server. In order to properly switch all requests to https you will need to use rewrite rules and make sure all your internal links are relative. But that is the topic for another article.

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">