• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Update letsencrypt to certbot (Ubuntu letsencrypt 16.04 Error Fix)

By Abhishek Ghosh September 7, 2016 11:07 am Updated on September 7, 2016

Update letsencrypt to certbot (Ubuntu letsencrypt 16.04 Error Fix)

Advertisement

Previously, we wrote how to easily install Let’s Encrypt SSL Certificate. Here Are Steps To Update letsencrypt to certbot For the Users Who Used Former Before letsencrypt Became certbot. It is Mandatory For Ubuntu 16.04 LTS. Ubuntu has old apt version agent. Such users who used apt-get install letsencrypt should follow this guide too.

Update letsencrypt to certbot Ubuntu letsencrypt 16.04 Error Fix

 

Why Follow The Steps To Update letsencrypt to certbot?

 

Ubuntu 16.04 LTS clearly gives error for the old repository. You may get errors while trying to renew related to the files under /etc/letsencrypt/renewal/ or get more bizarre errors with server. Obviously, it is better to keep everything up to date. letsencrypt is not forward compatible to certbot. Who followed our guide need not to delete anything but only do the steps we have written under Steps To Update letsencrypt to certbot subheader. You need to remove /opt/letsencrypt, that is optional.

In case you installed Ubuntu’s letsencrypt software using apt-get install letsencrypt, you probably should purge the installation. For this kind of easy work, we do not need apt version of application, instead cloning from their git will keeps stuffs up to date and possibly distro neutral. There is nothing to keep, just run sudo apt-get purge --auto-remove letsencrypt to remove all stuffs including your old SSL certs. Loss of certificate does not matter, we will generate now in the next steps again. You can however keep a backup. You should have this stanza on your server blocks :

Advertisement

---

Vim
1
2
3
4
5
location ~ /.well-known {
    allow all;
# change the path if needed
    root /var/www/html;
}

The above is needed to avoid error.

 

Steps To Update letsencrypt to certbot

 

We will keep all file names as default path and file names. We are using our domain bmch.in in this example. You must change bmch.in to your domain name while running the commands. Default root of Nginx is /var/www/html for this Ubuntu 16.04 and domain bmch.in. Change the root path if needed. Obviously run the basic commands :

Vim
1
2
apt update
apt install git

then clone to /opt/certbot and symlink with /usr/bin/certbot :

Vim
1
2
sudo git clone https://github.com/certbot/certbot /opt/certbot
sudo ln -s /opt/certbot/certbot-auto /usr/bin/certbot

It is just easy to generate certificate, just run command in this format :

Vim
1
sudo certbot certonly --webroot -w /var/www/html -d bmch.in -d www.bmch.in

/var/www/html is our web root for the domain bmch.in. bmch.in, www.bmch.in are our domains. You should adjust only these two parameters. Done. Now, change directory to (adjust your domain name) :

Vim
1
cd /etc/letsencrypt/live/bmch.in/

Generate Diffie-Hellman key :

Vim
1
sudo openssl dhparam -out dhparam.pem 2048

wget this certificate for OSCP stapling :

Vim
1
wget https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem

Essentially you are follow our previous we wrote easily install Let’s Encrypt SSL certificate guide except the old commands. Use that guide’s optimizations, configurations.

This is exactly we should have for the above example domain:

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
       ssl on;
       access_log off;
       ssl_certificate /etc/letsencrypt/live/bmch.in/fullchain.pem;
       ssl_certificate_key /etc/letsencrypt/live/bmch.in/privkey.pem;
       ssl_dhparam /etc/letsencrypt/live/bmch.in/dhparam.pem;
       ssl_stapling on;
       ssl_stapling_verify off;
       ssl_stapling_responder http://ocsp.int-x3.letsencrypt.org;
       resolver 8.8.8.8 8.8.4.4 valid=300s;
       resolver_timeout 30s;
       ssl_trusted_certificate /etc/letsencrypt/live/bmch.in/lets-encrypt-x3-cross-signed.pem;
       ssl_ecdh_curve prime256v1;
       ssl_session_cache shared:NginxCache123:20m;
       ssl_session_timeout 4h;
       ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
       ssl_ciphers EECDH+AESGCM:EDH+AESGCM:EECDH:EDH:!MD5:!RC4:!LOW:!MEDIUM:!CAMELLIA:!ECDSA:!DES:!DSS:!3DES:!NULL;
       ssl_prefer_server_ciphers on;
       add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
       #add_header Public-Key-Pins 'pin-sha256=" "; pin-sha256=" "; report-uri=" "; max-age=5184000; includeSubDomains';
       #add_header 'Content-Security-Policy-Report-Only' 'default-src self https:; report-uri ';

Run :

Vim
1
2
nginx -t
service nginx restart

We will advice you to follow rest of our easy install Let’s Encrypt SSL certificate guide’s hyperlinks to optimize. It is likely that you read wrong stuffs for other matters too.

 

Where is My Auto Update Script?

 

First check by dry run :

Vim
1
sudo certbot renew --dry-run

No error will be returned :

Vim
1
2
3
4
...
Congratulations, all renewals succeeded. The following certs have been renewed:
  /etc/letsencrypt/live/bmch.in/fullchain.pem (success)
...

Now first create a log file :

Vim
1
touch /var/log/certbot.log

Then run :

Vim
1
nano /etc/cron.weekly/certbot

and copy paste this content :

Vim
1
2
3
#!/bin/sh
certbot renew >> /var/log/certbot.log
service nginx reload

You can test the work of the above cronjob by :

Vim
1
sudo sh /etc/cron.weekly/certbot

Run cat on log file :

Vim
1
cat /var/log/certbot.log

To clear the log, you should run :

Vim
1
echo " " > /var/log/certbot.log

Anything more?

Tagged With how to update certbot , update certbot ubuntu , letsencrypt update certificate , certbot update cert , certbot ubuntu 16 update , update letsencrypt ubuntu , ubuntu letsencrypt update certificate , letsencrypt update , how to update letsencrypt , windows letsencrypt certbot vs pkisharp
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Update letsencrypt to certbot (Ubuntu letsencrypt 16.04 Error Fix)

  • How To Generate Let’s Encrypt ECC SSL (ECDSA) Certificate

    Few Costly Paid SSL Have Support For ECC. Let’s Encrypt Supports For Free. Here is How To Generate Let’s Encrypt ECC SSL (ECDSA) Certificate.

  • Easy Steps To Setup Let’s Encrypt on Ubuntu 16.04, Nginx

    Here Are Easy Steps To Setup Let’s Encrypt on Ubuntu 16.04, Nginx With HSTS, ALPN on HTTP/2, OCSP Stapling, Public Key Pinning (HPKP), Cipher.

  • How To Install Apache2 on Ubuntu 18.04 With Let’s Encrypt, HTTP/2, HSTS

    Here is Detailed Guide on How To Install Apache2 on Ubuntu 18.04 With Let’s Encrypt, HTTP/2, HSTS With Commands and Configurations For Most Secured Setup.

  • Free SSL : How to Install Let’s Encrypt on Ubuntu, Nginx

    Here is Step by Step Commands to Use Free SSL by Let’s Encrypt. We will use aptitude software to install the certificate, it is very easy.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy