If you’re like me, familiar with cPanel or you came from some shared hosting service plans, installing a SSL certificate on your own DigitalOcean VPS can be a daunting task.
You should know that with an upgrade to a paid plan, ServerPilot can automatically setup SSL certificates on your server.
But why would you pay for that when it is just a 5 mins work?
How to Install A Let’s Encrypt SSL Certificate on ServerPilot (DigitalOcean)
- Launch your terminal
- Enter your password
cd /usr/local/bin && wget https://raw.githubusercontent.com/lesaff/serverpilot-letsencrypt/master/sple.shto copy the script into your server
sudo chmod +x sple.shto make the script executable
sple.shto run the script
serverpilotyour App Name and User Name according to your ServerPilot settings
- Enter all your domain names
All right, you have just install the Let’s Encrypt SSL certificates on your server!
Automatically Renew Your Let’s Encrypt Certificates
The SSL certificates expires every 90 days. After which you have to renew them, or else the browsers will throw up warnings when visitors are accessing your website.
crontab -eto open up your cron job schedule
0 */12 * * * letsencrypt renew && service nginx-sp reloadif you are running Ubuntu 16.04 or enter
0 */12 * * * /usr/local/bin/certbot-auto renew --quiet --no-self-upgrade --post-hook service nginx-sp reloadif you are running Ubuntu 14.04.
sudo nginx-sp restartto restart your server
That’s it! You have just installed the SSL certificates on your server!
After this, check if your the SSL certificates are properly setup with this 4-point check list after installing SSL certificates.
For WordPress users, learn how to enable https on your website.