Site updated at 2018-03-06 20:31:29 UTC
This commit is contained in:
parent
4053ead194
commit
9e305c40d3
31 changed files with 85 additions and 81 deletions
|
@ -77,14 +77,17 @@
|
|||
<hr class="divider">
|
||||
<p>Using NGINX as a proxy for Home Assistant allows you to serve Home Assistant securely over standard ports. This configuration file and instructions will walk you through setting up Home Assistant over a secure connection.</p>
|
||||
<h3><a class="title-link" name="1-get-a-domain-name-forwarded-to-your-ip" href="#1-get-a-domain-name-forwarded-to-your-ip"></a> 1. Get a domain name forwarded to your IP</h3>
|
||||
<p>Chances are, you have a dynamic IP Address (your ISP changes your address periodically). If this is true, you can use a Dynamic DNS service to obtain a domain and set it up to update with you IP. If you purchase your own domain name, you will be able to easily get a trusted SSL certificate later.</p>
|
||||
<p>Chances are, you have a dynamic IP address (your ISP changes your address periodically). If this is true, you can use a Dynamic DNS service to obtain a domain and set it up to update with you IP. If you purchase your own domain name, you will be able to easily get a trusted SSL certificate later.</p>
|
||||
<h3><a class="title-link" name="2-install-nginx-on-your-server" href="#2-install-nginx-on-your-server"></a> 2 Install nginx on your server</h3>
|
||||
<p>This will vary depending on your OS. Check out Google for this. After installing, ensure that NGINX is not running.</p>
|
||||
<p class="note">
|
||||
You will at least need nginx >= 1.3.13, as WebSocket support is required for the reverse proxy.
|
||||
</p>
|
||||
<h3><a class="title-link" name="3-obtain-an-ssl-certificate" href="#3-obtain-an-ssl-certificate"></a> 3. Obtain an SSL certificate</h3>
|
||||
<p>There are two ways of obtaining an SSL certificate.</p>
|
||||
<h4><a class="title-link" name="using-lets-encrypt" href="#using-lets-encrypt"></a> Using Let’s Encrypt</h4>
|
||||
<p>If you purchased your own domain, you can use https://letsencrypt.org/ to obtain a free, publicly trusted SSL certificate. This will allow you to work with services like IFTTT. Download and install per the instructions online and get a certificate using the following command.</p>
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code>$ sudo ./letsencrypt-auto certonly --standalone -d example.com -d www.example.com
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo ./letsencrypt-auto certonly --standalone -d example.com -d www.example.com
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>Instead of example.com, use your domain. You will need to renew this certificate every 90 days.</p>
|
||||
|
@ -119,7 +122,7 @@ Some Linux distributions (including CentOS and Fedora) will not have the <code c
|
|||
<h3><a class="title-link" name="8-port-forwarding" href="#8-port-forwarding"></a> 8. Port forwarding.</h3>
|
||||
<p>Forward ports 443 and 80 to your server on your router. Do not forward port 8123.</p>
|
||||
<h3><a class="title-link" name="nginx-config" href="#nginx-config"></a> NGINX Config</h3>
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code>map $http_upgrade $connection_upgrade {
|
||||
<div class="language-text highlighter-rouge"><pre class="highlight"><code>map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue