Automatically Renew SSL Certificates with Let's Encrypt in Virtualmin and Centrally Manage Multiple Domains

Learn how to automatically renew SSL certificates with Let's Encrypt in Virtualmin and centrally manage multiple domains. Step-by-step guide with tips for optimal security.

Why SSL Certificates Are Essential for Your Websites

SSL certificates are a must for every website today. They encrypt the data transfer between server and visitors and build trust – recognizable by the padlock icon in the browser. They also improve your Google ranking. With Let's Encrypt, you get free certificates that you can renew automatically. In this guide, I'll show you how to set them up in Virtualmin and centrally manage multiple domains.

Prerequisites for Automatic Renewal

Before you start, make sure that:

  • Your domains point to your server (DNS is correctly configured).
  • Virtualmin is installed on your server and accessible.
  • You have administrative rights in Virtualmin.

If you don't have web hosting with Virtualmin yet, check out our web hosting packages – they offer Virtualmin and much more.

Step 1: Activate Let's Encrypt in Virtualmin

Log in to Virtualmin and navigate to Virtualmin → Server Configuration → SSL Certificate. There you will find the option to activate Let's Encrypt. Click on Activate Let's Encrypt and follow the instructions. Virtualmin automatically installs the necessary client tools.

Step 2: Set Up Automatic Renewal

Virtualmin offers a built-in function to automatically renew certificates. Go to Virtualmin → Scheduled Tasks and create a new cron job. Select as the command:

virtualmin renew-cert --domain your-domain.com

Set the schedule so that the job runs daily – this ensures that certificates are renewed in time. You can also use a hook to reload the web server after renewal.

Step 3: Centrally Manage Multiple Domains

If you operate multiple domains, you can create Multiple Domains as "Virtual Servers" in Virtualmin. For each domain, you can separately request an SSL certificate. To simplify management, use the Server Template function: set a template that automatically applies the SSL settings to all new domains.

Additionally, you can renew all certificates at once via the Command Line Interface (CLI):

virtualmin list-domains --with-ssl | xargs -I {} virtualmin renew-cert --domain {}

Step 4: Monitoring and Troubleshooting

To always stay on top of things, you should check the renewal logs. Virtualmin stores logs under /var/log/virtualmin. You can also set up email notifications to be informed about success or errors. Common issues are:

  • DNS entries not yet propagated – wait or check the settings.
  • Port 80 not reachable – Let's Encrypt requires HTTP for validation.
  • Certificate limit reached – Let's Encrypt has rate limits; wait a while.

Tips for Optimal Security

Use HTTP/2 and enable HSTS (Strict Transport Security) to further increase security. In Virtualmin, you can set this under SSL Configuration. Additionally, you should regularly test your SSL configuration with tools like SSL Labs.

Conclusion

With Let's Encrypt and Virtualmin, you have a free, automated solution for SSL certificates. The central management of multiple domains saves time and ensures that all your websites are secure. If you need further assistance, feel free to contact us via contact or explore our VPS servers for maximum control.