3

I don't get it. I am not getting the crontab for letsencrypt to work. Every 3 months another try and I need to do it again "by hand".

I have the crontab:

45 20 * * * /usr/bin/certbot renew >> /var/log/letsencrypt/renew.log

The certbot renew does not run through.

If I log in as root and run the command /usr/bin/certbot renew by hand then the certificates get renewed without a problem.

What needs to be different in the crontab?

PerlDuck
  • 13,014
  • 1
  • 36
  • 60
user822988
  • 63
  • 1
  • 10
  • As _whom_ did you setup the cronjob? Just `crontab -e` as _your_ user or `sudo crontab -e` as root user? – PerlDuck Oct 02 '18 at 20:05
  • Also: Does `cat /var/log/letsencrypt/renew.log` show anything unusual? Does the file get updated every day at 20:45? What does `ls -l /var/log/letsencrypt/renew.log` show, especially the timestamp? – PerlDuck Oct 02 '18 at 20:16
  • I setup as root. – user822988 Oct 03 '18 at 07:17
  • The renew.log is being written at the time of the cronjob (20:45) every day. There is no real error message, just that the certificate could not be updated. So the job is running, it just does never update the certificates. It only updates the certificates if I run the command "by hand". – user822988 Oct 03 '18 at 08:28

0 Answers0