Skip to content

bitnami letsencrypt bncert lego logs

0

I've been using bitnami-bncert to automatically renew the certs on my lightsail instance, and this normally works. But every once in a while it fails to renew. In crontab it appears that the /opt/bitnami/letsencrypt/lego is running once a day, and I can see that happening in /var/log/syslog. But I can't find any output in any of my logs that would help tell what's failing. Does anyone know if the "lego" command writes any logging or error information, and if so where can I find that?

asked a year ago574 views
2 Answers
0
Accepted Answer

I wasn't able to redirect the output (due to the complicated nature of the set of commands being used. It wasn't just the lego command). But I did eventually figure out that if I installed the mail utilities that cron would email me the output.

sudo apt-get install mailutils

I didn't actually realized that these tools were not installed by default or I would have done that a long time ago. Now the bitnami user is getting all sorts of useful information from cron :-)

It appears (from the message I'm getting) that renewing my certificate requires that http be enabled in the firewall (in addition to https). I did in fact turn that off at some point. So I've got that turned back on and we'll see if it renews tomorrow morning.

answered a year ago
AWS
EXPERT
reviewed 8 months ago
  • OK, so that worked. My cert renewed successfully. From my point of view the two key points were (1) install mailutils so that you can get error messages from Cron and (2) http: needs to be enabled (from Lightsail home) in order to renew certs automatically.

0

Hello.

Why not try redirecting the output of the command set in crontab as shown below?

/opt/bitnami/letsencrypt/lego > /tmp/cert-renew.log
EXPERT
answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.