sixeight.hatenablog.com
上記のエントリで無駄にHTTPS化していたのが、三ヶ月経って更新時期がやってきた。
完全に忘れていたのだけれど、以下のようなメールがやってきて教えてくれて助かった。親切。
Your certificate (or certificates) for the names listed below will expire in 10 days (on 20 May 16 15:15 +0000). Please make sure to renew your certificate before then, or visitors to your website will encounter errors.
今朝は少し早めに出社して1個仕事片付けたのでちょっとやってみるかと更新作業をしてみた。といってもコマンド一発なので楽ちん。
$ cd /path/to/letsencrypt
$ git pull # 最新の Let's Encrypt に更新しておく
$ sudo service nginx stop # 80番ポート使うので止めないといけない、つらい
Stopping nginx: nginx.
$ ./letsencrypt-auto renew
Checking for new version...
Requesting root privileges to run certbot...
sudo CERTBOT_AUTO=./letsencrypt-auto /path/to/letsencrypt/bin/letsencrypt renew
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/hacobun.co.conf
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
new certificate deployed without reload, fullchain is
/etc/letsencrypt/live/hacobun.co/fullchain.pem
-------------------------------------------------------------------------------
Congratulations, all renewals succeeded. The following certs have been renewed:
/etc/letsencrypt/live/hacobun.co/fullchain.pem (success)
$ sudo service nginx start
Starting nginx: nginx.
更新は有効期限が30日以内のもののみ自動で行ってくれる。
cron に入れてもいいということなので自動化しておくと楽そう。
無事に更新された。