Troubleshooting letsencrypt and certbot
- Certbot with Apache
- Letsencrypt Certbot Common Tasks
- Installing certbot on an EC2 using AWS Systems Manager
- Troubleshooting letsencrypt and certbot
- Invalid Document Content Error in running an AWS SSM document
On Linux – once installed, look for certbot using
ls -l /bin /usr/bin | grep certbot OR just grep certbot
If you get a result, you should see the certbot binary returned by the grep command. Now we know that certbot was successfully installed.
To check if your certificate was correctly created using certbot, use
sudo certbot certificates // lists all certificates
If you DO NOT see your certificate, your next stop is to look for letencrypt logs . The letsencrypt logs are here
/var/log/letsencrypt/logs/
You are not allowed access to the log files under here. The only way that I could view these logs (in entirety, not just tail…) is to dmesg from the parent folder (note – ignore the time stamped log files – just the main letsencrypt.log is important):
sudo dmesg letsencrypt/letsencrypt.log
Removing letsencrypt log files and certbot from a linux system
Remove Log Files
sudo rm -rf /etc/letsencrypt/
sudo rm -rf /var/lib/letsencrypt/
sudo rm -rf /var/log/letsencrypt/
Remove certbot executable, runtime and configfile
sudo certbot delete sudo apt purge python-certbot-apache
sudo a2dissite 000-default-le-ssl.conf
Update repo
sudo apt update
sudo apt upgrade
sudo apt autoremove
Summary
This is quick cheat sheet of common tasks around certbot on linux.
Leave a Reply