Hello! Brand new Home Assistant user here. I was lucky to run across this post and the corresponding GitHub Issue (see link below) the other day as I was setting up for the first time, and I thought I’d share my experience here:
After several hours of tinkering, I finally found success with the Web Auth
method. It definitely requires a little finagling but it does work reliably. The description in the GitHub Issue (see link below) do not suggest this method because it is more difficult to configure, but this seems like the kind of community that isn’t afraid to tinker! The steps in the Web Auth Instructions (see link below) are pretty helpful, but some of the associated links are broken, and there are a few missing details, so I’m sharing all the details and steps I used to get it working here:
Basics
OS: Unraid 6.9.2
Docker Containers:
- NginxProxyManager v1.26.0
- Home-Assistant-Core 2022.3.7
Important Links:
Step 1: Unraid Set-Up
Disclaimer: These are the steps that I used to set up my server. You may configure your Unraid setup differently, or use an entirely different operating system. I am simply including all of my steps here for clarity.
- Install Unraid according to the
Unraid Wiki - Getting Started
page
- Install the
Community Applications
plugin (sorry, can’t include a link because the forum is limiting me to 2 links per post - just Google unraid community applications plugin
and it’s usually the first or second result).
- Using the
Community Applications
plugin, install NginxProxyManager
(Djoss’ Repository)
- Using the
Community Applications
plugin, install Home-Assistant-Core
(Balloob’s Repository)
Step 2: Domain/Host Configuration
Disclaimer: The Web Auth Instructions
make it clear that you do not have to expose your domain to the internet. However, I want access to my Home Assistant dashboard when I am away from home, and plus, I believe doing so removes a potential source of confusion and error with this configuration. However, there are a number of security concerns you must consider when exposing your private server to the internet, so do so at your own risk!
Step 2.1: Change Unraid Dashboard Ports
- In the Unraid Dashboard, open the
Settings
Tab > Management Access
- Change
HTTP Port
to 1080
- Change
HTTPS Port
to 1443
- Click
Apply
Disclaimer: These are just the ports I used. You may use different ports here if you like, just be sure to modify the instructions in Step 2.4
accordingly.
Step 2.2: Update Nginx Proxy Manager Settings
- In the Unraid Dashboard, open the
Docker
Tab
- Click on the icon for
NginxProxyManager
, which should disclose a dropdown menu
- Click
Edit
- Change
HTTP Port
to 80
- Change
HTTPS Port
to 443
- Click
Apply
Disclaimer: These are just the ports I used. You may use different ports here if you like, just be sure to modify the instructions in Step 2.3
and Step 2.4
accordingly.
Step 2.3 Domain Registration and DNS
- If you have not already, register your domain name (I will use
example.com
)
- Using your DNS of choice, create an
A
record directing your domain name to your server’s IP address
- If you are running this server out of your home, it is highly advised that you configure a DNS updater, as most home networks do not have static IP addresses. Your ISP may occasionally change your public IP address, and a DNS updater will detect the change and automatically change your DNS records to point to the new address.
- If you are running this server out of your home, you must configure port forwarding with your router:
- Route external port
80
to port 80
of your server
- Route external port
443
to port 443
of your server
Step 2.4 Configure Nginx Proxy Manager
- In Unraid, open the
Docker
Tab
- Click on the icon for
NginxProxyManager
, which should disclose a dropdown menu
- Click on
Web GUI
, which should open the Nginx Proxy Manager app in a new tab
- If this is your first time opening Nginx Proxy Manager, it will ask you for login credentials. By default, the credentials are
[email protected]
and changeme
. Follow the prompts to set a new login and password.
- Open the
SSL Certificates
tab
- Click
Add SSL Certificate
> Let's Encrypt
- Enter your domain name (
example.com
)
- Click
Test Server Reachability
to ensure that your domain name is correctly directing to your server. If the test fails, please review Step 2.1
through Step 2.3
- Enter your email address
- Agree to the terms of service
- Click
Save
- Click the
Hosts
Tab > Proxy Hosts
- Click
Add Proxy Host
- Enter your domain name
- Set
Scheme
to http
(NOT https
)
- Set
Forward Hostname / IP
to your server’s private IP address (eg 192.168.1.100
)
- I tried, and was not able to get the local loopback address
127.0.0.1
to work - I believe this must be your server’s actual private IP on your network
- Set
Forward Port
to 8123
, the port of the Home-Assistant-Core
docker container
- Enable
Cache Assets
, Block Common Exploits
, and Websockets Support
- Set
Access List
to Publicly Accessible
- Open the
SSL
tab
- Set
SSL Certificate
to the SSL certificate you just created
- Enable
Force SSL
, HTTP/2 Support
, HSTS Enabled
, and HSTS Subdomains
- Click
Save
- You can close Nginx Proxy Manger now, if you wish
Step 3: Configure Home Assistant
Step 3.1: Initial Home Assistant Setup
- In Unraid, open the
Docker
Tab
- Click on the icon for
Home-Assistant-Core
, which should disclose a dropdown menu
- Click on
Web GUI
, which should open the Home Assistant app in a new tab
- If this is your first time launching the Home Assistant app, you will need to create a new administrator account. Follow the prompts to create your account, then you will be directed to the Home Assistant dashboard.
- Once your basics are set up, go to
Configuration
> General
- Set
External URL
to http://{your-domain
(eg http://example.com
) (NOT https
)
- Set
Internal URL
to http://{local-ip}:8123
(eg http://192.168.1.100:8123
) (NOT https
)
Step 3.2: Configure Nest Integration
- Follow the steps outlined in the
Web Auth Instructions
- Be sure to follow the instructions from all of the following sections (sorry, can’t include links because the forum is limiting me to 2 links per post):
- Device Access Registration
- Pub/Sub subscriber setup
- Configuration
- Device Setup
Step 3.3: Manual Configuration:
For more, see the Web Auth Instructions - Configuration
(sorry, can’t include a link because the forum is limiting me to 2 links per post)
- You will now need to edit your Home Assistant
configuration.yaml
file. You can do this by installing a plugin in Home Assistant that allows you to edit the file directly for the web interface. Alternatively, you can access the config file through Unraid’s SMB share under appdata/Home-Assistant-Core/configuration.yaml
.
- Add the following lines to your
configuration.yaml
file, replacing the dashes ---
with the values you acquired in Step 3.2
:
nest:
client_id: ---
client_secret: ---
project_id: ---
subscriber_id: ---
Step 3.4: Add Nest Integration
For more, see the Web Auth Instructions - Device Setup
(sorry, can’t include a link because the forum is limiting me to 2 links per post)
- In Home Assistant, open
Configuration
> Devices & Services
> + Add Integration
- Search for
Nest
, then follow the prompts to add the configuration
Congratulations! You should now have working Home Assistant - Nest Integration!
I hope this walkthrough is helpful to somebody, but moreover, I hope a fix can be published soon to avoid such a complicated workaround! Thank you to everybody in this community that helped me get to this point - my work here stands upon your shoulders!