Expiration Let's Encrypt

Bonjour,

Je viens de recevoir par e-mail, un message de Let’s Encrypt me disant que

Hello,

Your certificate (or certificates) for the names listed below will expire in 6 days (on 2025-01-19). Please make sure to renew your certificate before then, or visitors to your web site will encounter errors.

We recommend renewing certificates automatically when they have a third of their total lifetime left. For Let's Encrypt's current 90-day certificates, that means renewing 30 days before expiration. See https://letsencrypt.org/docs/integration-guide/ for details.

Ce qui est bizarre, c’est que le nom de domaine et le certificat Let’s Encrypt est geré par OVH !

Salut

:thinking:
Ce qui est bizarre, ç’est que OVH gère le certificat Let’s Encrypt…
Je pense que tu trompes dans ton vocabulaire.
Va dans les modules complémentaires et démarre Let’s Encrypt.
Et montres nous les logs.

s6-rc: info: service s6rc-oneshot-runner: starting

s6-rc: info: service s6rc-oneshot-runner successfully started

s6-rc: info: service fix-attrs: starting

s6-rc: info: service fix-attrs successfully started

s6-rc: info: service legacy-cont-init: starting

cont-init: info: running /etc/cont-init.d/file-structure.sh

cont-init: info: /etc/cont-init.d/file-structure.sh exited 0

s6-rc: info: service legacy-cont-init successfully started

s6-rc: info: service legacy-services: starting

services-up: info: copying legacy longrun lets-encrypt (no readiness notification)

s6-rc: info: service legacy-services successfully started

[19:27:24] INFO: Selected http verification

[19:27:24] INFO: Detecting existing certificate type for homeassistant.xxxxxxd.com

Saving debug log to /var/log/letsencrypt/letsencrypt.log

[19:27:31] INFO: Existing certificate using 'ecdsa' key type.

Saving debug log to /var/log/letsencrypt/letsencrypt.log

Renewing an existing certificate for homeassistant.xxxxxxx.com

Successfully received certificate.

Certificate is saved at: /data/letsencrypt/live/homeassistant.xxxxxx.com/fullchain.pem

Key is saved at: /data/letsencrypt/live/homeassistant.xxxxxx.com/privkey.pem

This certificate expires on 2025-04-12.

These files will be updated when the certificate renews.

NEXT STEPS:

- The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See https://certbot.org/renewal-setup for instructions.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

If you like Certbot, please consider supporting our work by:

* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate

* Donating to EFF: https://eff.org/donate-le

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

s6-rc: info: service legacy-services: stopping

s6-rc: info: service legacy-services successfully stopped

s6-rc: info: service legacy-cont-init: stopping

s6-rc: info: service legacy-cont-init successfully stopped

s6-rc: info: service fix-attrs: stopping

s6-rc: info: service fix-attrs successfully stopped

s6-rc: info: service s6rc-oneshot-runner: stopping

s6-rc: info: service s6rc-oneshot-runner successfully stopped

C’est bon, ton certificat est renouvelé pour 3 mois .
Il faut lancer let’s encrypt de temps en temps pour renouveler le certificat. Ce n’est pas automatique.
Tu crées une automatisation, qui lance le module Let’s Encrypt, genre toutes les semaines et fini.

Maintenant, tu dois redémarrer HA pour prendre en compte ton nouveau certificat.

s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/file-structure.sh
cont-init: info: /etc/cont-init.d/file-structure.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun lets-encrypt (no readiness notification)
s6-rc: info: service legacy-services successfully started
[20:06:46] INFO: Selected http verification
[20:06:46] INFO: Detecting existing certificate type forhomeassistantxxxx.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
[20:06:48] INFO: Existing certificate using 'ecdsa' key type.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Certificate not yet due for renewal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Certificate not yet due for renewal; no action taken.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/file-structure.sh
cont-init: info: /etc/cont-init.d/file-structure.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun lets-encrypt (no readiness notification)
s6-rc: info: service legacy-services successfully started
[20:06:56] INFO: Selected http verification
[20:06:56] INFO: Detecting existing certificate type forhomeassistantxxxx.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
[20:06:57] INFO: Existing certificate using 'ecdsa' key type.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Certificate not yet due for renewal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Certificate not yet due for renewal; no action taken.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

OVH gere ton nom de domaine
Mais le certificat est géré par let’s encrypt , mais le renouvellement n’est pas gérer automatiquement par l’addon comme le dit @WarC0zes il faut de temps à autre redémarrer l’addon pour renouveller le certificat (entre 20 et 30 jours)
Donc juste une petite automation une fois par semaine qui démarrer l’addon let’s encrypt et plus de soucis

Il ne faut pas redémarrer Let’s Encrypt, il faut redémarrer ton système :wink:

Il faut aussi redémarrer lets encrypt et le système

Pourquoi tu veux que je fasse une automatisation qui lance le module Let’s Encrypt genre toutes les semaines alors que le certificat dure 3 mois ?

Pour plusieurs raisons:

  • si tu ne le lances que tous les 3 mois moins 1 semaine, par exemple, et que ça rate, tu n’auras plus de certificat valide
  • parce que le lancer toutes les semaines, c’est très simple à automatiser
  • parce que le lancer trop fréquemment, ce n’est pas grave, le bidule va juste vérifier que le certificat est encore bon longtemps et ne fera rien d’autre, donc, ce n’est pas « cher »

Donc, en résumé, c’est simple, pas couteux et ça fiabilise le processus.

2 « J'aime »

Pour t’éviter des surprises comme tu viens d’avoir.
Ça lance juste Let’s Encrypt et si besoin ça renouvelle le certificat. Sinon, ça éteint let’s encrypt, si pas besoin de le renouveller.
Après rien ne t’oblige a faire une automatisation :wink:

Si c’est pour simplifier et éviter les désagréments de ma machine je prends lol seule question comment automatiser ça ?

Un exemple, à modifier suivant ton besoin.

alias: Certificat SSL Renouvellement
description: Démarrage de let's encrypt
triggers:
  - at: "03:00:00"
    trigger: time
conditions:
  - condition: time
    weekday:
      - sun
actions:
  - metadata: {}
    data:
      addon: core_letsencrypt
    action: hassio.addon_start
mode: single

Ça lance à 3h tous les dimanches, Let’s Encrypt.

J’utilise moi aussi une automatisation pour redémarrer Let’s Encrypt.
Mais pour que le nouveau certificat soit utilisé, il faut aussi redémarrer HA. Donc soit tu l’automatises aussi, soit tu te met une notification, soit autre chose :wink:

Tiens je profite du sujet pour poser quelques questions bêtes car je suis peut être passé à coté d’un truc sympa…

[edit] question posée là :Automatisation du renouvellement de certificat avec freebox revolution et letsencrypt

Tu devrais ouvrir un nouveau sujet pour éviter de polluer celui-ci, car il y a matières à discuter. :wink:

2 « J'aime »

Il y a moyen de créer l’automatisation pour redémarrer HA ?

@sg72 , de mémoire tu utilises NGINX Home assistant ssl proxy ?

D’où l’intérêt du reverse proxy :sweat_smile:

1 « J'aime »