初版公開: 2018-01-15 / 最終更新: 2025-09-28
※初回公開からかなり時間立っています。実行環境と互換性あるかご確認ください。
事象
Let’s Encrypt の証明書自動更新を行っていたところ、以下のようなエラーが発生し、自動更新に失敗した。
Attempting to renew cert ({ドメイン名}) from /etc/letsencrypt/renewal/{ドメイン名}.conf produced an unexpected error: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.',). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/{ドメイン名}/fullchain.pem (failure)
原因
Authenticator manual
プラグインを利用して証明書を発行していたが、非対話モードでは --manual-auth-hook
が必要となる。設定が不足していたため更新処理に失敗した。
対応方法
1. 手動更新を実行
以下のコマンドを実行し、手動認証のフローに入る。
certbot certonly --manual -d {ドメイン名}
2. 認証ファイルの作成
指示に従い、指定された認証コードを含むファイルを作成し、以下の URL でアクセス可能にする。
http://{ドメイン名}/.well-known/acme-challenge/{認証ファイル名}
例: Web サーバーの公開ディレクトリに .well-known/acme-challenge/
フォルダを作成し、そこに認証ファイルを配置。
3. 検証と完了
認証ファイルを配置後、Enterキーを押下して検証を進める。
正常に検証が完了すると、証明書が再発行される。
出力例:
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/{ドメイン名}/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/{ドメイン名}/privkey.pem
Your cert will expire on {有効期限}.
備考
- 今後、非対話モードでの自動更新を行う場合は
--manual-auth-hook
を利用するか、他の認証方式(例: webroot, DNS プラグイン)に移行する必要がある。 - 定期更新には
certbot renew
が推奨される。