Cert not renewing again


Hi guys,

We’ve fixed this previously in this thread

But it seems that the auto renew doesn’t work yet again. =(
All the tests previously shows it up and running, but when the time comes, it fails (or didn’t run?)…
Why is that so?


Without a few more details it’s impossible to know.

What is the command in your crontab to tell it to run ?
Is there anything in your log files saying if it ran or not ( or if there was an error )
If you try running it manually does it renew OK ?


Hi @serverco,

Based on the previous help, I have set my cron job to this,
50 */12 * * * /opt/letsencrypt/letsencrypt-auto renew --post-hook “service nginx restart”

Where can I check my log files to see if there’re any issues?
Yes, I believe I should be able to do it manually as the last time it happened, I did it manually too following the help/instructions in the previous thread.


If you do

grep letsencrypt /var/log/syslog

it should hopefully show the cron job running at 00:50 and 12:50 (and any specific errors associated with the cron). I assume you haven’t got the cron set up to email you ?


Here’s what I got,
Dec 9 12:50:01 kz CRON[12883]: (root) CMD (/opt/letsencrypt/letsencrypt-auto renew --post-hook “service nginx restart”)

No, I didn’t get it to email me, not sure how to too, sorry, really noob here. Took hella round of headaches to even install the certs in the first place. Haha.


Hmm… So I got the certs to work again following all the steps from the previous thread,
Which is to
sudo apt-get update
sudo apt-get upgrade
/opt/letsencrypt/letsencrypt-auto renew
Really not too sure why the cron doesn’t seem to be doing its job?
Or is it because I need to add update and upgrade and then reboot into the cron jobs?


Is your cron running as root user ? or a different user ?

No, you shouldn’t need to be adding a reboot into the cron.


Ah! I did set up the cron as an admin and not root… =( I guess that’s why?
Should I then delete the cron and log in as root to set it up again?
Didn’t know it works this way. =x


Hi guys,
So I tried to log into root to change the cron job, but I realised it’s editing the same cron job. Will it still fail to run again when the cert expires? Does logging in using the root vs the admin change anything about the cron job running?
This is what I use to edit the cron job,
crontab -e
previously as the admin, i went in using,
sudo crontab -e
And this is what’s inside
50 */12 * * * /opt/letsencrypt/letsencrypt-auto renew --post-hook “service nginx restart”


These are the same. the “sudo” says to do it as the root user.

Is it not auto-renewing ? what’s your domain name ( so we can check the certificates issued, to see if it obtained a certificate but it’s just not using it for some reason )


Yea, that’s what I thought too, which is why I’m confused why the cron job didn’t work.
The certs are working now as I have manually went through the steps to renew it using the instructions from the previous thread. But the cron job doesn’t seem to be auto-renewing things for me. =( Not sure why.


The current certificate you are using is valid until the 9th March - so the cron should do nothing until the 8th Feb (since by default it won’t do anything until 30 days before renewal is due).


Yup, but it’s the same cron job that was running the last time and it didn’t renew when it’s supposed to and my certs expired last December. =(


Keep a note to yourself to check around the 8th Feb. Then there are 30 days during which it should be renewing. At the moment it shouldn’t be renewing or anything so it’s not easy to check if it’s working or not.


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