My friend Bryce Adams wrote an excellent guide on installing a Let’s Encrypt certificate on ServerPilot. I have used this tutorial a couple of times, and it works perfectly. But something is missing…
As mentioned in Bryce’s article, the only drawback is that the SSL certificate expires every 90 days. To overcome this trivial issue, I decided to use Certificate Expiry Monitor to simply get an email notification every 60 days. I would then login as root to my Digital Ocean droplet and run
The email notification was an easy choice, but I wouldn’t rely on this. I know how easy it is to miss an important email, despite doing my best to keep my Inbox clean. Also, I don’t know how reliable this Certificate Expiry Monitor is, and how well maintained it is.
Then I stumbled upon this bash script from Rudy Affandi. Not only this script makes the whole process much easier, but it also adds cron job to schedule automatic renewal every two months.
The installation process is straightforward:
- ssh to your server,
sudo suto act as root
sudo chmod +x /usr/local/bin/sple.shto make it executable
View on Github