How to Renew Let’s Encrypt SSL

·

Recently I wrote a tutorial to install Let’s Encrypt SSL on a shared hosting. The SSL certificate of my site is about to expire next month and I got 2 notification emails. So I have renewed the certificate today.

I tried to log in to my server via SSH and it told me that the SSH access is not enabled ?

I had to contact namecheap support and they activated the access. The total time I spent including the chat and waiting time is 2 minutes!

I have setup a cron job to renew the certificate automatically. But it did not work for some reason. I am too lazy to find out. So I googled a bit to renew the certificate. Someone on a forum said that cron does not help and the certificate has to be renewed manually after each 3 month.

So referred to my own article and was trying to run the command on the root folder and it was saying that

can not open input file: bin/acme

It took me a couple of minutes to figure out I need to enter the acme-client folder to run the command. I even tried to run the command with sudo ?

So the actual steps to renew the Let’s Encrypt SSL certificate are:

  1. Login to the server
  2. cd acme-client/
  3. php bin/acme issue --domains sekander.pro:www.sekander.pro --path /home/***/public_html:/home/***/public_html --server letsencrypt

After running the issue command you will see a message like this

Now, to be sure that we did everything correctly, run the following command

php acme-client/bin/acme check --name sekander.pro --server letsencrypt

If you see the date is increased, then pat yourself on the back. You did it!

Comments

3 responses to “How to Renew Let’s Encrypt SSL”

    1. Sekander Avatar

      Yes, the CRON job might renew the certificate automatically but you have to replace the certificate from the cPanel’s SSL management system. So setting one cron job cannot help you with the entire process.

      If you know shell scripting, then you can write all the commands to renew the certificate and update from cPanel using that. You can set a cron job to fire the shell script using the cron. That should do the job automatically.

      I have no idea how shell scripting or cron works. So, I am unable to share the steps or the script. I am just sharing an idea with you.

Leave a Reply