Let's encryptの更新

Let's encryptの更新

自分だけよければいい備忘録

# docker compose上のcertbotを用いて更新
docker compose run --rm certbot certonly --webroot -w /usr/share/nginx/html -d hoge.com
# non-interactiveに自動更新
docker compose run --rm certbot certonly --non-interactive --force-renewal --webroot -w /usr/share/nginx/html -d hoge.com

こんなメールが来たので対応。そのうちcron化する。

Hello,

Your certificate (or certificates) for the names listed below will expire in 19 days (on 2023-12-01). 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.

参考リンク: https://qiita.com/akko_merry/items/d92f7f3fa6db00220b6f