Using Certbot on a Centos 6 Server Tutorial

Created a tutorial for Centos 6 users at How to Install Free SSL Certificates Using Letsencrypt and Certbot

Would appreciate feedback, especially on this part:

I believe the equivalent SSH command is something like this (untested):

crontab -e

I think you want a command something like this:

47 05,17 * * * /root/certbot-auto renew

That should create the same cron job, but I haven’t tested.

Since I don’t use the command line for creating cron jobs, so not sure if the above would work?

David Law

Hi @DavidLaw,

Yes, it will work.

Just one thing, you should add --quiet to renew command or you could receive a mail every time the cron job runs. Using --quiet you will receive a mail only if the renew has failed or if it has renewed your certs.

Also, it is a good idea to add the --post-hook parameter to reload apache so the new installed cert will be read and used by apache once the cert has been renewed (this parameter is executed only when a certificate has been renewed).

47 05,17 * * * /root/certbot-auto renew --quiet --post-hook "service httpd reload"


1 Like

Thanks, updated accordingly.

David Law

1 Like

It might be good to clarify that crontab -e will run a text editor, into which you need to enter the actual crontab line. Then you need to tell the text editor to save and quit. The text editor is a separate interactive program that’s launched in response to running certain commands such as crontab -e, and the operating system can choose any of a number of Unix text editors, and the keys to press to save and quit are different in each of them.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.