I have tried the docker version of Home Assistant “HA” for some time now. I have decided to migrate to a proper dedicated HA in a Raspberry PI 2 that has been unused for a while. I found that the docker version is more challenging for me to integrate more devices but I could go back to docker version someday. If you are interested in docker, head on to my previous post here.
The HA website provide comprehensive installation process depending on which version you need. For my need, I pick the haos_rpi2 version from github here. https://github.com/home-assistant/operating-system/releases
Then follow the installation guide here. https://www.home-assistant.io/
Access to Home Assistant by pointing to the IP address and port 8123 through browser or through the HA Apps in mobile phone.
To be able to access HA outside of your local network, a DNS need to be set up. If you don’t have your own domain, look for guide on setting up DuckDNS for HA. I have my own domain and HA will be a subdomain setting. I have Swag docker running on a server to handle NGINX reverse proxy for my domain. In order to point the subdomain to the Raspberry device, the following subdomain configuration is added:
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name *.yourdomain.com;
include /config/nginx/ssl.conf;
client_max_body_size 0;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
proxy_buffering off;
location / {
proxy_pass http://192.168.1.xxx:8123;
proxy_set_header Host $host;
proxy_pass_header Authorization;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $remote_addr;
}
location ~ ^/(api|local|media)/ {
proxy_pass http://192.168.1.xxx:8123;
proxy_set_header Host $host;
proxy_pass_header Authorization;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $remote_addr;
}
This need to be added into HA configuration.yaml:
http:
use_x_forwarded_for: true
trusted_proxies:
– 192.168.1.xxx
If this is your first time installing HA, you will never find it interesting. It is not user friendly and the integrations need to be manually completed. It took me a long while and patiently watch some youtube to figure out how to navigate through the various customisations.