{"id":142,"date":"2017-01-06T14:09:49","date_gmt":"2017-01-06T04:09:49","guid":{"rendered":"http:\/\/www.codenkeg.com\/blog\/?p=142"},"modified":"2018-03-06T07:08:10","modified_gmt":"2018-03-05T21:08:10","slug":"install-lets-encrypt-to-create-ssl-certificates","status":"publish","type":"post","link":"http:\/\/www.codenkeg.com\/blog\/2017\/01\/06\/install-lets-encrypt-to-create-ssl-certificates\/","title":{"rendered":"Install Let\u2019s Encrypt to Create SSL Certificates on Ubuntu"},"content":{"rendered":"<p><a href=\"https:\/\/www.linode.com\/docs\/security\/ssl\/install-lets-encrypt-to-create-ssl-certificates\">(Linode: Install Let\u2019s Encrypt to Create SSL Certificates)<\/a><br \/>\n[Update 2018 03 06: You might want to look at <a href=\"https:\/\/certbot.eff.org\/\" rel=\"noopener\" target=\"_blank\">Certbot<\/a>]<\/p>\n<h2>Before You Begin<\/h2>\n<ol>\n<li>Check for updates<br \/>\n<code>sudo apt-get update && sudo apt-get upgrade<\/code><\/li>\n<li>Check if git is installed<br \/>\n<code>which git<\/code><br \/>\nIf not install git<br \/>\n<code>sudo apt-get install git<\/code><br \/>\n<code>Password<\/code><br \/>\n<code>y<\/code><\/li>\n<li>Open a port for Let&#8217;s Encrypt<br \/>\n<code>sudo ufw allow 443<\/code><br \/>\n[Update 2018 03 06: (you might need to allow port 80 as well for some reason)]<\/li>\n<\/ol>\n<h2>Install Let&#8217;s Encrypt<\/h2>\n<ol>\n<li>Download and install Let&#8217;s Encrypt<br \/>\n<code>sudo git clone https:\/\/github.com\/letsencrypt\/letsencrypt \/opt\/letsencrypt<\/code><\/li>\n<li>Navigate to the new <code>\/opt\/letsencrypt<\/code> directory:<br \/>\n<code>cd \/opt\/letsencrypt<\/code><\/li>\n<\/ol>\n<h2>Create an SSL Certificate<\/h2>\n<ol>\n<li>Run Let&#8217;s Encrypt including each domain to be covered with a <code>-d<\/code>\n<ul>\n<li><code>sudo -H .\/letsencrypt-auto certonly --standalone -d example.com -d www.example.com<\/code><\/li>\n<li><code>password<\/code><\/li>\n<li><code>a good email address<\/code><\/li>\n<li>Agree<\/li>\n<li>Success!<br \/>\n<code>IMPORTANT NOTES:<br \/>\n - Congratulations! Your certificate and chain have been saved at\/etc\/letsencrypt\/live\/example.com\/fullchain.pem. Your cert will expire on 2017-xx-xx. To obtain a new or tweaked version of this certificate in the future, simply run letsencrypt-auto again. To non-interactively renew *all* of your certificates, run \"letsencrypt-auto renew\"<br \/>\n - If you like Certbot, please consider supporting our work by:<br \/>\nDonating to ISRG \/ Let's Encrypt:<br \/>\n   https:\/\/letsencrypt.org\/donate<br \/>\nDonating to EFF:<br \/>\n   https:\/\/eff.org\/donate-le<\/code><\/li>\n<\/ul>\n<li>Setup auto renewals of certificates\n<ul>\n<li><code>sudo crontab -e<\/code><\/li>\n<li>First run select nano as editor<\/li>\n<li>Add the line to the bottom of the file to run at 02:30 every Monday, pausing nginx to allow access to port 443 as required.<br \/>\n<code>30 2 * * 1 \/opt\/letsencrypt\/letsencrypt-auto renew --quiet --pre-hook \"sudo service nginx stop\" --post-hook \"sudo service nginx start\"<\/code><br \/>\n(I HAVEN&#8217;T confirmed this is working yet, but it should be)<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2>Mini series<\/h2>\n<ol>\n<li><a href=\"http:\/\/www.codenkeg.com\/blog\/2017\/01\/04\/setting-up-a-server-at-linode\/\" target=\"_blank\">Setting up a server at Linode<\/a><\/li>\n<li><a href=\"http:\/\/www.codenkeg.com\/blog\/2017\/01\/06\/install-lets-encrypt-to-create-ssl-certificates\/\" target=\"_blank\">Install Let\u2019s Encrypt to Create SSL Certificates on Ubuntu<\/a><\/li>\n<li><a href=\"http:\/\/www.codenkeg.com\/blog\/2017\/01\/06\/setting-up-mongodb-on-ubuntu\/\" target=\"_blank\">Setting up MongoDB on Ubuntu<\/a><\/li>\n<li><a href=\"http:\/\/www.codenkeg.com\/blog\/2017\/01\/24\/setting-up-nginx-on-ubuntu-for-parse-server\/\" target=\"_blank\">Setting up nginx on Ubuntu for parse-server<\/a><\/li>\n<li><a href=\"http:\/\/www.codenkeg.com\/blog\/2017\/01\/06\/setting-up-parse-server-on-ubuntu\/\" target=\"_blank\">Setting up parse-server on Ubuntu<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>(Linode: Install Let\u2019s Encrypt to Create SSL Certificates) [Update 2018 03 06: You might want to look at Certbot] Before You Begin Check for updates sudo apt-get update &#038;&#038; sudo apt-get upgrade Check if git is installed which git If not install git sudo apt-get install git Password y Open a port for Let&#8217;s Encrypt &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.codenkeg.com\/blog\/2017\/01\/06\/install-lets-encrypt-to-create-ssl-certificates\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install Let\u2019s Encrypt to Create SSL Certificates on Ubuntu&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7VdP6-2i","_links":{"self":[{"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/posts\/142"}],"collection":[{"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/comments?post=142"}],"version-history":[{"count":10,"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":248,"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/posts\/142\/revisions\/248"}],"wp:attachment":[{"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/categories?post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/tags?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}