Why does Hassio Lets Encrypt addon always show stopped?

If I start the Lets Encrypt addon, it starts and works but if I go back into the configutation in 10 minutes, it shows the addon is stopped? It is set to auto start.

I assume that this will prevent the auto renewal of the certificate?

1 Like

hi,

Same behavior here on version 0.57.3 - when I ssh in the PI3 I can see that an image is there for the addon, but I don’t see an active container.

The addon log on subsequent runs says:

Cert not yet due for renewal
The following certs are not due for renewal yet:
  /data/letsencrypt/live/xxxxxx.ddns.net/fullchain.pem (skipped)
No renewals were attempted.

So that seems to have done something. The supervisor log doesn’t say too much, first lines are for initial run, last two are a restart:

17-11-15 21:48:52 INFO (MainThread) [hassio.addons.addon] Create Home-Assistant addon data folder /data/addons/data/core_letsencrypt
17-11-15 21:48:52 INFO (SyncWorker_8) [hassio.dock.interface] Pull image homeassistant/armhf-addon-letsencrypt tag 1.2.
17-11-15 21:50:10 INFO (SyncWorker_8) [hassio.dock.interface] Tag image homeassistant/armhf-addon-letsencrypt with version 1.2 as latest
17-11-15 21:53:35 INFO (SyncWorker_13) [hassio.dock.addon] Start docker addon homeassistant/armhf-addon-letsencrypt with version 1.2
17-11-15 21:58:02 INFO (SyncWorker_1) [hassio.dock.interface] Clean homeassistant/armhf-addon-letsencrypt docker application
17-11-15 21:58:06 INFO (SyncWorker_1) [hassio.dock.addon] Start docker addon homeassistant/armhf-addon-letsencrypt with version 1.2

Strange - but also, I’m starting to hit limitations of containers a bit. I have a few grafana charts also but I need a way for that addon to figure out where the certificates are.

Jhh

Any news on this?

Not sure if you have received a satisfactory answer yet, but the letsencrypt add-on container is not supposed to run continuously.

The purpose of that add-on/container is to get a certificate, if one is up for renewal. That means that the instance stops running when it is done doing its job: it checked if a new certificate had to be obtained, if so, it would get one and stop. Otherwise, it would just stop after checking if a renewal was required but wasn’t.

So, it does not run continuously checking if a certificate renewal is necessary.

If you want auto-renewal from this add-on, you add an automation to your home assistant installation to check it, for example once every day.

A working example is in the documentation: https://www.home-assistant.io/addons/lets_encrypt/

Hope this helps!

1 Like

Yeah I eventually worked out that’s what it does and I did use an automation to start it at midnight every day so the cert was auto-renewed. I’m using caddy now so no longer using this addon for LetsEncrypt.

I have the Nest plugin running in Home Bridge. I believe I’m getting an authentication error for Nest Learning Thermostat to work when the Let’s Encrypt container is not running. If I manually start the Let’s Encrypt add-on, and then restart the Home Bridge, Nest authenticates and works.

Could you please tell me how did you automate the start of Let’s Encrypt?
Also, would caddy or caddy2 do what Let’s Encrypt was doing? Can I use caddy as a complete replacement for Let’s Encrypt?

Thanks a lot.

Let’s encrypt plug-in only runs while it checks the carts and renews if necessary. I used an automation to start it every night at midnight.
I switched to caddy and now caddy 2 a long time ago and it manages all the certs without ever having to think about it. I highly recommend it. It is also a reverse proxy.

Have you done a write up or anything about how you use Caddy - not heard of it before.

I did a write up for Caddy V1 but that is superseeded now with Caddy 2. There is a thread here with all the Caddy 2 stuff and I have posted my config as well there in full. Let me know if you have any problems setting it up but it’s pretty straightforward.

1 Like

@DavidFW1960, just to check you use the add-on, right?

1 Like

Yes that one

1 Like