{"id":553,"date":"2017-07-16T14:54:43","date_gmt":"2017-07-16T13:54:43","guid":{"rendered":"https:\/\/www.kolkataonweb.com\/code-bank\/?p=553"},"modified":"2021-12-13T07:34:48","modified_gmt":"2021-12-13T07:34:48","slug":"setup-free-ssl-certificate-on-your-server","status":"publish","type":"post","link":"https:\/\/www.kolkataonweb.com\/code-bank\/miscellaneous\/setup-free-ssl-certificate-on-your-server\/","title":{"rendered":"Setup Free SSL Certificate on your Server"},"content":{"rendered":"<p><span style=\"color: #333399;\"><em>Please note : This article (and the repo mentioned here) is deprecated. Certbot now recommends installation through Snap. For more details please see &#8211; https:\/\/certbot.eff.org\/docs\/install.html. <\/em><\/span><br \/>\n<span style=\"color: #333399;\"><em>More info at: https:\/\/launchpad.net\/~certbot\/+archive\/ubuntu\/certbot<\/em><\/span><\/p>\n<p><a href=\"https:\/\/www.eff.org\/\">Electronic Frontier Foundation<\/a> (EFF) provides\u00a0<a href=\"https:\/\/letsencrypt.org\/\">Let&#8217;s Encrypt<\/a> SSL Certificates through their\u00a0 Certbot service. They don&#8217;t provide any Organization Validation (OV) or Extended Validation (EV)\u00a0 certificate. As per plans, from January 2018, they will provide wildcard certificates also.<\/p>\n<p>The Let&#8217;s Encrypt Policy and Legal documents can be found here : <a href=\"https:\/\/letsencrypt.org\/repository\/\">https:\/\/letsencrypt.org\/repository\/<\/a>\u00a0 and the FAQ page is at <a href=\"https:\/\/letsencrypt.org\/docs\/faq\/\">https:\/\/letsencrypt.org\/docs\/faq\/<\/a><\/p>\n<p>Below are the steps to install the free SSL certificate on an Ubuntu server running Apache<\/p>\n<pre class='wp-code-highlight prettyprint'>apt-get install software-properties-common\r\nadd-apt-repository ppa:certbot\/certbot\r\napt-get update\r\napt-get install certbot\r\ncertbot certonly --standalone --standalone-supported-challenges http-01 -d <span style=\"color: #800080;\">&lt;server fqdn&gt;<\/span><\/pre>\n<p>It will ask, &#8220;Temporary&#8221; or &#8220;Standalone&#8221; server. Choosing <em>temporary<\/em> is fast and easy.<br \/>\nAfter that it will ask a few more general question like, email id for contact etc. Once all details supplied it will install the certificate and show the path where the certificates and key file is stored. Please make a note of the path for later use or reference.<\/p>\n<p>The certificates are valid for 90 days only. After the 90 days it has to be renewed. What can be done to solve this is to set a cron that will automatically renew the certificate after every 60 days or so. Steps to set cron below<\/p>\n<p>Open Cron file using<\/p>\n<pre class='wp-code-highlight prettyprint'>crontrab -e<\/pre>\n<p>Now put the following line to renew the certificate automatically every 2 months<\/p>\n<pre class='wp-code-highlight prettyprint'>0 0 1 *\/2 * certbot renew --noninteractive --post-hook \"systemctl restart mosquitto apache2\"<\/pre>\n<p>Save and exit Cron file.<\/p>\n<p>All set for a secured connection.<\/p>\n<p>&nbsp;<\/p>\n<p>Steps for other Servers can be found here <a href=\"https:\/\/certbot.eff.org\/\">https:\/\/certbot.eff.org\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Please note : This article (and the repo mentioned here) is deprecated. Certbot now recommends installation through Snap. For more details please see &#8211; https:\/\/certbot.eff.org\/docs\/install.html. More info at: https:\/\/launchpad.net\/~certbot\/+archive\/ubuntu\/certbot Electronic Frontier Foundation (EFF) provides\u00a0Let&#8217;s Encrypt SSL Certificates through their\u00a0 Certbot service. They don&#8217;t provide any Organization Validation (OV) or Extended Validation (EV)\u00a0 certificate. As per&hellip; <a class=\"more-link\" href=\"https:\/\/www.kolkataonweb.com\/code-bank\/miscellaneous\/setup-free-ssl-certificate-on-your-server\/\">Continue reading <span class=\"screen-reader-text\">Setup Free SSL Certificate on your Server<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[105,103,104],"class_list":["post-553","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","tag-free-ssl","tag-ssl","tag-ssl-certificate","entry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/comments?post=553"}],"version-history":[{"count":4,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/553\/revisions"}],"predecessor-version":[{"id":956,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/553\/revisions\/956"}],"wp:attachment":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/media?parent=553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/categories?post=553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/tags?post=553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}