Set up a CRON Job within cPanel as follows, which runs every 2 months;
HTML:
0 0 */60 * * /root/.local/share/letsencrypt/bin/letsencrypt –text certonly –renew-by-default –webroot –webroot-path /home/{YOUR ACCOUNT HERE}/public_html/ -d example.com -d www.example.com; /root/installssl.pl example.com
For reference, The SSL certificate is placed in /etc/letsencrypt/live/bundle.txt when installing Let's Encrypt.
Note on adding CRON job to cPanel, this is within cPanel WHM, not a cPanel user account. cPanel user accounts don't have root privileges so a CRON job from within here won't work. To edit the CRON job at the root level, first SSH into your server, then run the following command to edit the main CRON job file;
Add the CRON job details to this file at the bottom. Save the file. Then restart the CRON deamon with the following command;
It is recommended to have a 2 month renewal time at first as this gives you 4 weeks to sort this out before your certificate expires. Thankfully you should receive an email from your CRON service if this happens and you will also receive an email from Let's Encrypt when the certificate is about to expire so there are double safe guards in place to do this.
If you have whm acccess,, actually cpanel have auto ssl option which takes care everything including letsencrypt ssl installation and auto renewal.
https://documentation.cpanel.net/display/ALD/Manage+AutoSSL
But you need to verify which version of WHM you are using. They introduced the script that loads this plugin in cPanel & WHM version 58.0.17. So if your CPanel is latest version, you already have LetEncrypt SSL option enabled. Installation is just one click.
https://www.youtube.com/watch?v=dicothpT6Os
Also, you can watch our youtube channel where we have a tutorial demonstarting how to install letsencrypt ssl using cpanel plugin.
There is no single corn job or single command for installation or renewal of letsencrypt as it is dependent on underlying OS and web server, thats why they have provided complete command list suitable for each case, I pasted link in earlier post. Hope this helps you.
Your best option, is to upgrade your WHM to latest version, so that you can use all GUI way, without dealing with cornjobs and commands.