Lecture
When running on Ubuntu 24, certbot
automatic renewal and certificate generation doesn't work, and only manual renewal works for each domain
certbot certonly
I'll say right away that reinstalling (step 6) helped me, possibly a glitch after upgrading Ubuntu
/var/log/letsencrypt/letsencrypt.log
2024-07-10 11:50:10,020:DEBUG:certbot._internal.main:certbot version: 1.21.0
2024-07-10 11:50:10,020:DEBUG:certbot._internal.main:Location of certbot entry point: /usr/bin/certbot
2024-07-10 11:50:10,020:DEBUG:certbot._internal.main:Arguments: []
2024-07-10 11:50:10,020:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2024-07-10 11:50:10,037:DEBUG:certbot._internal.log:Root logging level set at 30
2024-07-10 11:50:10,038:DEBUG:certbot._internal.plugins.selection:Requested authenticator None and installer None
2024-07-10 11:50:10,039:DEBUG:certbot._internal.plugins.selection:No candidate plugin
2024-07-10 11:50:10,039:DEBUG:certbot._internal.plugins.selection:Selected authenticator None and installer None
When you see the error Selected authenticator None and installer None while trying to use Certbot to obtain Let's Encrypt certificates, this usually indicates that Certbot doesn't know which authenticator or installer to use. Here are a few steps that will help fix this problem:
First, make sure Certbot is installed correctly. Depending on your Ubuntu version, run the following commands:
For Ubuntu 20.04 and above:
sudo apt update sudo apt install certbot python3-certbot-apache
For Nginx:
sudo apt update sudo apt install certbot python3-certbot-nginx
Certbot requires specifying plugins for authentication and installing certificates. Usually this is apache or nginx. Here are example commands for using Certbot with Apache and Nginx:
sudo certbot --apache
sudo certbot --nginx
Certbot must have access to your web server's correct configuration. Make sure your server is configured correctly and running:
sudo systemctl status apache2
sudo systemctl status nginx
Certbot verifies your domains via an HTTP-01 challenge, so make sure your domains point to your server and are accessible from outside.
Here is a full example command for obtaining a certificate using Apache:
sudo certbot --apache -d example.com -d www.example.com
For Nginx:
sudo certbot --nginx -d example.com -d www.example.com
If you're still having problems, try running Certbot with the --dry-run flag for a test run:
sudo certbot --apache --dry-run
This can help identify problems before actually installing certificates.
If you want to use Certbot in manual mode, you can specify the authenticator and installer manually:
sudo certbot certonly --manual -d example.com -d www.example.com
If you want to use the webroot method for verification, use the following command, specifying the path to your webroot:
sudo certbot certonly --webroot -w /var/www/html -d example.com -d www.example.com
For more detailed configuration, use Certbot's flags and parameters, such as --preferred-challenges, --email, --agree-tos, and --no-eff-email.
For automatic installation with minimal interaction, you can use:
sudo certbot --nginx -d example.com -d www.example.com --email you@example.com --agree-tos --non-interactive
By following these steps, you'll be able to fix the error and successfully obtain Let's Encrypt certificates using Certbot.
sudo apt-get remove certbot sudo apt-get purge --auto-remove certbot
sudo certbot delete
sudo apt-get remove python-certbot-apache sudo apt-get purge --auto-remove python-certbot-apache sudo apt-get remove python3-certbot-apache sudo apt-get purge --auto-remove python3-certbot-apache
sudo apt-get remove python-certbot-nginx sudo apt-get purge --auto-remove python-certbot-nginx sudo apt-get remove python3-certbot-nginx sudo apt-get purge --auto-remove python3-certbot-nginx
Make sure the repository is updated and automatically removed.
sudo apt update sudo apt upgrade sudo apt autoremove reinstall sudo apt update && sudo apt install certbot python3-certbot-nginx
Comments