This entry is part 4 of 5 in the series letsencrypt

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.

Anuj holds professional certifications in Google Cloud, AWS as well as certifications in Docker and App Performance Tools such as New Relic. He specializes in Cloud Security, Data Encryption and Container Technologies.

Initial Consultation

Anuj Varma – who has written posts on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.


Series NavigationInstalling certbot on an EC2 using AWS Systems ManagerInvalid Document Content Error in running an AWS SSM document