Categories
Server

How To Renew Your Let’s Encrypt Certificate

Earlier I was trying to renew my Let’s Encrypt certificate and experienced some problem.

Basically, I’m just following the instructions from Let’s Encrypt Get Started page to use Certbot. And follow this steps from DigitalOcean.

What happened was when I ran the script below.

certbot-auto renew

I always get this result.

$ certbot-auto renew
...
/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
 InsecurePlatformWarning
You are using pip version 8.0.3, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

And I ran the script and see result below:

$ pip install --upgrade pip
...
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages

Technically, my server packages were already up-to-date but still I’m not able to install it. And I stumbled with this solution from StackOverflow.

The command below still doesn’t work:

$ pip install requests[security]
...
Requirement already satisfied (use --upgrade to upgrade): requests[security] in /usr/lib/python2.7/dist-packages
 requests 2.2.1 does not provide the extra 'security'

And finally I found the right command to update it.

$ pip install requests[security] --upgrade
...
# Packages were downloaded and installed

After upgrading the necessary packages. I finally ran the script below and successfully renewed my certificate.

$ certbot-auto renew
...
..
Congratulations, all renewals succeeded. The following certs have been renewed:
 /etc/letsencrypt/live/yourdomain.com/fullchain.pem (success)

I hope I’ve been a help with you guys. If you have any questions just drop your comment below. Thanks!