フォロー

certbot、最近はpythonとpipだけaptで入れて、実体はpipで入れてる。

sudo apt install python3 python3-pip

sudo pip3 install certbot certbot_dns_cloudflare -U
(dnsプラグインは使っているサービスによる)

更新はcertbot.timerで蹴って、renewal-hooks/deployのreload.shでnginxをreload。

/etc/systemd/system/certbot.service

[Unit]
Description=Certbot Renewal
[Service]
Type=oneshot
ExecStart=/usr/local/bin/certbot -q renew
PrivateTmp=true

/etc/systemd/system/certbot.timer

[Unit]
Description=Run certbot twice daily

[Timer]
OnCalendar=*-*-* 00,12:00:00
RandomizedDelaySec=43200
Persistent=true

[Install]
WantedBy=timers.target

/etc/letsencrypt/renewal-hooks/deploy/reload.sh

#!/bin/sh
systemctl reload nginx

ログインして会話に参加
Fedibird

様々な目的に使える、日本の汎用マストドンサーバーです。安定した利用環境と、多数の独自機能を提供しています。