How to Install an SSL Certificate with Let’s Encrypt in Virtualmin
Print- 0
How to Install an SSL Certificate with Let’s Encrypt in Virtualmin
Securing your website with an SSL certificate is essential to protect user data and improve trust. Let’s Encrypt is a free, automated, and open certificate authority that integrates seamlessly with Virtualmin, allowing you to quickly install an SSL certificate for your website. This guide walks you through the process.
Why Use Let’s Encrypt?
- Free: No cost for SSL certificates.
- Automatic Renewal: Certificates renew automatically every 90 days.
- SEO Benefits: Google prioritizes HTTPS websites in search rankings.
- Improved Security: Encrypts data between your website and its visitors.
Step 1: Log in to Virtualmin
- Open your browser and go to your Virtualmin login page (e.g.,
https://your-server-ip:10000
). - Enter your username and password, then click Login.
Step 2: Select the Virtual Server
- In the left-hand menu, choose the virtual server (domain) for which you want to install an SSL certificate.
- Ensure your domain name is pointed to the server and resolves correctly.
Step 3: Navigate to the SSL Certificate Module
- In the left-hand menu, go to Server Configuration > SSL Certificate.
- You’ll see the SSL Certificate management page.
Step 4: Request an SSL Certificate from Let’s Encrypt
- Click on the Let’s Encrypt tab.
- Configure the following options:
- Domain names listed: Ensure all relevant domain variations are included (e.g.,
example.com
andwww.example.com
). - Validation method: Leave the default setting, which uses HTTP validation.
- Domain names listed: Ensure all relevant domain variations are included (e.g.,
- Click Request Certificate to begin the process.
Step 5: Wait for the Installation to Complete
Virtualmin will automatically:
- Verify domain ownership using Let’s Encrypt.
- Generate and install the SSL certificate for your website.
Once complete, you’ll see a success message confirming the installation.
Step 6: Force HTTPS (Optional but Recommended)
- Go to Server Configuration > Website Redirects.
- Add a redirect rule to force all HTTP traffic to HTTPS:
- Source URL:
/
(root directory). - Destination URL:
https://example.com/
. - Enable the redirect.
- Source URL:
- Save the changes.
Step 7: Test Your SSL Certificate
- Open your browser and visit your website using
https://
(e.g.,https://example.com
). - Confirm the SSL padlock icon is displayed in the address bar.
- Use an online tool like SSL Labs to verify the installation.
Step 8: Automatic Renewal
Let’s Encrypt certificates automatically renew every 90 days. Virtualmin handles this process for you, but ensure:
- Your server is configured to run scheduled tasks (cron jobs).
- DNS records remain unchanged to allow for validation.
Troubleshooting
- Validation Failed: Ensure your domain resolves correctly and DNS records point to your server.
- Port Issues: Ensure ports 80 (HTTP) and 443 (HTTPS) are open in your firewall.
- Certificate Not Applied: Revisit the SSL Certificate module and confirm the certificate is correctly installed for the virtual server.