<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>letsencrypt Archives - Installing.in</title>
	<atom:link href="https://www.installing.in/tag/letsencrypt/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.installing.in/tag/letsencrypt/</link>
	<description></description>
	<lastBuildDate>Fri, 27 Sep 2019 19:20:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">110734269</site>	<item>
		<title>How to Set up Letsencrypt Auto Renewal</title>
		<link>https://www.installing.in/how-to-set-up-letsencrypt-auto-renewal/</link>
					<comments>https://www.installing.in/how-to-set-up-letsencrypt-auto-renewal/#comments</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Thu, 19 May 2016 15:00:17 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[letsencrypt]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=71</guid>

					<description><![CDATA[<p>Letsencrypt.org issued SSL certificates are valid for 90 days and you will need to renew it manually to continue using the certificates. As I am writing this, there is no... </p>
<p>The post <a href="https://www.installing.in/how-to-set-up-letsencrypt-auto-renewal/">How to Set up Letsencrypt Auto Renewal</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Letsencrypt.org issued SSL certificates are valid for 90 days and you will need to renew it manually to continue using the certificates.</p>
<p>As I am writing this, there is no automatic renewal option in the letsencrypt package so we will need to set up something to do it for us.</p>
<p>The command to renew letsencrypt certificate manually is:</p>
<pre><span style="color: #ff0000;">/path/to/letsencrypt-client</span>/letsencrypt-auto renew</pre>
<p><strong>in the above command, you need to replace path/to/letsencrypt-client with the actual path.</strong></p>
<p>if you have followed this<a href="https://www.installing.in/how-to-install-letsencrypt-with-nobebb-and-nginx/" target="_blank" rel="noopener noreferrer"> nodeBB letsencrypt tutorial</a>, this command will be</p>
<pre><span style="line-height: 1.5;">/opt/letsencrypt/letsencrypt-auto renew</span></pre>
<p><span style="line-height: 1.5;">if your domain is not eligible for renewal you will get a message like this:</span></p>
<pre>Checking for new version...
Requesting root privileges to run letsencrypt...
 /root/.local/share/letsencrypt/bin/letsencrypt renew
Processing /etc/letsencrypt/renewal/<span style="color: #ff0000;">example.com</span>.conf

The following certs are not due for renewal yet:
 /etc/letsencrypt/live/<span style="color: #ff0000;">example.com</span>/fullchain.pem (skipped)
No renewals were attempted.</pre>
<p>What we can do to automate letsencrypt certificate renewal is to set up a cron job to do it for us at regular intervals. This cron job will periodically run the above-mentioned command to renew the SSL certificate for our domain.</p>
<p>To set up a cron we need to edit the crontab.</p>
<p>To edit crontab run following command:</p>
<pre>sudo crontab -e</pre>
<p>If this is the first time you are editing crontab it may ask you to select your favorite editor. Here we will select nano by typing the digit in front of it and pressing enter.</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_e2e-11-65___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_101%C3%9740.png?ssl=1"><img data-recalc-dims="1" fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-88" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_e2e-11-65___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_101%C3%9740.png?resize=430%2C126&#038;ssl=1" alt="crontab nano" width="430" height="126" /></a></p>
<p>This will open the crontab file in nano.</p>
<p><strong>Add the following line to the bottom of the file if you are using Nginx web server:</strong></p>
<pre>30 2 * * 1  <span style="color: #ff0000;">/path/to/letsencrypt-client</span>/letsencrypt-auto renew &gt;&gt; /var/log/le-renew.log
35 2 * * 1  /etc/init.d/nginx reload</pre>
<p><strong>or if you are using Apache web server add these lines:</strong></p>
<pre>30 2 * * 1  <span style="color: #ff0000;">/path/to/letsencrypt-client</span>/letsencrypt-auto renew &gt;&gt; /var/log/le-renew.log
35 2 * * 1  /etc/init.d/apache2 reload</pre>
<p><strong>Remember to change the /path/to/letsencrypt-client with the actual path of your letsencrypt client folder in the above lines or the renewal will fail.</strong></p>
<p>save the file by pressing control+O</p>
<p>exit nano by pressing control+X and then enter.</p>
<p>You have now successfully edited the crontab.</p>
<p>What this cron will do is to run the letsencrypt renewal script at 2:30 am every Monday and restart the webserver at 2:35 am.</p>
<p>The output of the process will be saved in the log file we set up in the crontab i.e.</p>
<pre>/var/log/le-renewal.log</pre>
<p>You can check the log file to know what&#8217;s happening whenever this cron is running.</p>
<p>That&#8217;s it.</p>
<p>The post <a href="https://www.installing.in/how-to-set-up-letsencrypt-auto-renewal/">How to Set up Letsencrypt Auto Renewal</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/how-to-set-up-letsencrypt-auto-renewal/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">71</post-id>	</item>
		<item>
		<title>How to install Letsencrypt with NobeBB and Nginx</title>
		<link>https://www.installing.in/how-to-install-letsencrypt-with-nobebb-and-nginx/</link>
					<comments>https://www.installing.in/how-to-install-letsencrypt-with-nobebb-and-nginx/#comments</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Wed, 18 May 2016 16:41:47 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Webapp]]></category>
		<category><![CDATA[letsencrypt]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx nodebb]]></category>
		<category><![CDATA[nodeBB]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=34</guid>

					<description><![CDATA[<p>In my last tutorial I wrote&#160;about how to install nodeBB on ubuntu 14.04 and use nginx as reverse proxy to serve nodeBB. In this tutorial we will install letsencrypt SSL... </p>
<p>The post <a href="https://www.installing.in/how-to-install-letsencrypt-with-nobebb-and-nginx/">How to install Letsencrypt with NobeBB and Nginx</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In my last tutorial I wrote&nbsp;about how to install nodeBB on ubuntu 14.04 and use nginx as reverse proxy to serve nodeBB. In this tutorial we will install letsencrypt SSL certificate to make sure our nodeBB forum is served over secure https connection.</p>
<p>In this series:</p>
<ul>
<li><a href="https://www.installing.in/how-to-install-nodebb-on-ubuntu-14-04/">How to Install NodeBB on Ubuntu 14.04&nbsp;</a>&nbsp;(Previous)</li>
<li><a href="https://www.installing.in/how-to-install-letsencrypt-with-nobebb-and-nginx/">How to install Letsencrypt with NobeBB and Nginx</a>&nbsp;(This tutorial)</li>
<li><a href="https://www.installing.in/how-to-set-up-letsencrypt-auto-renewal/">How to Set up Letsencrypt Auto Renewal</a>&nbsp;(Later)</li>
</ul>
<p><span style="line-height: 1.5;">Steps you need to follow:</span></p>
<ol>
<li>Install nodeBB forum</li>
<li>Install nginx server</li>
<li>Install letsencrypt client</li>
<li>Obtain&nbsp;letsencrypt SSL certificate</li>
<li>Configure nginx to to use the SSL certificate</li>
</ol>
<p><strong>For first and second steps see this tutorial &#8211;&gt;<a href="https://www.installing.in/how-to-install-nodebb-on-ubuntu-14-04/">How to Install NodeBB on Ubuntu 14.04</a>.</strong></p>
<h3>Install Letsencrypt client:</h3>
<p>Currently best way to install letsencrypt on ubuntu is to clone letsencrypt repository from github. So we will first install git and bc on our system.</p>
<pre>sudo apt-get update</pre>
<pre>sudo apt-get -y install git bc</pre>
<p>Now clone letsencrypt repository</p>
<pre>sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt

</pre>
<p>You can find copy of letsencrypt repository in the&nbsp;/opt/letsencrypt folder.</p>
<p>You have successfully installed letsencrypt client on your system.</p>
<h3>Obtain letsencrypt SSL certificate:</h3>
<p>We will be using Webroot plugin to obtain SSL certificate.</p>
<p>Webroot plugin works by placing a special file in the <code>/.well-known</code> directory within your document root, which letsencrypt will open for validation. You need to allow access to this <code>/.well-known</code> directory.</p>
<pre>sudo nano /etc/nginx/sites-available/default</pre>
<p>inside the nodebb server block we created in last tutorial add this location block:</p>
<pre> location ~ /.well-known {
          allow all;
 }</pre>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_90%C3%9729.png?ssl=1"><img data-recalc-dims="1" decoding="async" class="aligncenter size-full wp-image-41" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_90%C3%9729.png?resize=655%2C436&#038;ssl=1" alt="rv_—_root_nodebbtest___opt_letsencrypt_—_ssh_—_90×29" width="655" height="436"></a></p>
<p>press <code>ctrl+O</code> then <code>enter</code> to save</p>
<p>press <code>ctrl+x</code> to exit</p>
<p>Reload nginx to load the new configuration.</p>
<pre>sudo service nginx reload</pre>
<p>Now that we have done the initial setup it&#8217;s time to obtain the actual certificate.</p>
<p>Go to letsencrypt &nbsp;client directory by entering this command:</p>
<pre>cd /opt/letsencrypt</pre>
<p>Run this command to obtain certificate for your domain &nbsp;(replace <span style="color: #ff0000;">red text</span> with your domain):</p>
<pre>./letsencrypt-auto certonly -a webroot --webroot-path=<span class="highlight">/usr/share/nginx/html</span> -d <span class="highlight" style="color: #ff0000;">example.com</span> -d <span class="highlight" style="color: #ff0000;">www.example.com</span></pre>
<p>You will be prompted for some information. Exact prompts depends on whether you have used letsencrypt earlier on your system or not.</p>
<p>It will ask for your email address which will be used for notices and lost key recovery.</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_95%C3%9725.png?ssl=1"><img data-recalc-dims="1" decoding="async" class="aligncenter size-full wp-image-44" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_95%C3%9725.png?resize=690%2C380&#038;ssl=1" alt="rv_—_root_nodebbtest___opt_letsencrypt_—_ssh_—_95×25" width="690" height="380"></a></p>
<p>You will need to agree to Letsencrypt terms of service.</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_95%C3%9725-2.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-43" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_95%C3%9725-2.png?resize=690%2C380&#038;ssl=1" alt="rv_—_root_nodebbtest___opt_letsencrypt_—_ssh_—_95×25 2" width="690" height="380"></a></p>
<p>if everything goes successfully you will see something like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_93%C3%9711.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-42" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_93%C3%9711.png?resize=676%2C184&#038;ssl=1" alt="rv_—_root_nodebbtest___opt_letsencrypt_—_ssh_—_93×11" width="676" height="184"></a></p>
<p>Note the path of your certificate. this is needed in next step.</p>
<h3>Configure nginx to to use the SSL certificate:</h3>
<p>Now we need to edit the nginx configuration so nginx uses the freshly generated SSL certificate to serve our nodeBB forum over https connection.</p>
<pre>sudo nano /etc/nginx/sites-available/default</pre>
<p>Delete the server block we created in last tutorial and replace it with the code block below.</p>
<p>Replace with your domain where&nbsp;marked red.</p>
<pre>server {
listen 80;
 server_name <span style="color: #ff0000;">example.com www.example.com</span>;
 return 301 https://$host$request_uri;
}
server {
 listen 443 ssl;
 server_name <span style="color: #ff0000;">example.com www.example.com</span>;
 ssl_certificate /etc/letsencrypt/live/<span style="color: #ff0000;">example.com</span>/fullchain.pem;
 ssl_certificate_key /etc/letsencrypt/live/<span style="color: #ff0000;">example.com</span>/privkey.pem;
 location / {
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header Host $http_host;
 proxy_set_header X-NginX-Proxy true;
 proxy_pass http://127.0.0.1:4567/;
 proxy_redirect off;
 # Socket.IO Support
 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection "upgrade";
 }
 location ~ /.well-known {
 allow all;
 }
}

</pre>
<p>It should look like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_96%C3%9731-2.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-45" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/rv_%E2%80%94_root_nodebbtest___opt_letsencrypt_%E2%80%94_ssh_%E2%80%94_96%C3%9731-2.png?resize=697%2C464&#038;ssl=1" alt="rv_—_root_nodebbtest___opt_letsencrypt_—_ssh_—_96×31 2" width="697" height="464"></a></p>
<p>Now reload nginx to put changes into effect.</p>
<pre>sudo service nginx reload

</pre>
<p>Check your forum by visiting it using https</p>
<pre>https://www.example.com</pre>
<p>&nbsp;</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/Home___NodeBB.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-40" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2016/05/Home___NodeBB.png?resize=760%2C471&#038;ssl=1" alt="Home___NodeBB" width="760" height="471"></a></p>
<p>Thats it. Hope it help</p>
<p>Next in series:</p>
<ul>
<li><a href="https://www.installing.in/how-to-set-up-letsencrypt-auto-renewal/">How to Set up Letsencrypt Auto Renewal</a></li>
</ul>
<p>The post <a href="https://www.installing.in/how-to-install-letsencrypt-with-nobebb-and-nginx/">How to install Letsencrypt with NobeBB and Nginx</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/how-to-install-letsencrypt-with-nobebb-and-nginx/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">34</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 26/66 objects using Redis
Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Minified using Disk
Database Caching 2/17 queries in 0.004 seconds using Redis

Served from: installing.in @ 2026-04-29 08:56:17 by W3 Total Cache
-->