I had a huge problem geting LS to work, so I reseted everything and followed this steps, (note… i made some changes to the steps to fit my needs)
and i did not use duck.org, I use no-ip.
Set up a DNS server so that you don’t have to remember your public IP address every time you want to access Home Assistant. (DuckDNS, No-IP, etc)
Set up encryption so that your traffic between your home assistant server and client device cannot be intercepted.
You need temporarily forward ports 80 (http connections) and 443 (https connections) on your router. This is only needed so Let’s Encrypt can verify your network. Check your router specific instructions on how to set this up.
Connect to your Pi using Putty, login with your account name (pi) and password.
Remove the port forwards :80 from setup eariler, and set port 443 (external) to forward to port 8123 (internal) on in your router settings.
Enter:
$ sudo chmod -R 777 /etc/letsencrypt
You should now be able to access Home Assistant from external networks by going to https://your.domain.com/. As an FYI, this certificate is only good for 90 days. You will need to repeat steps 5 and 6 (making sure you temporarily open ports 80 and 443 first on your router) to get a new certificate.
Add configuration to your configuration.yaml
http:
api_password: YOUR_PASSWORD
ssl_certificate: /etc/letsencrypt/live/your.domain.com/fullchain.pem
ssl_key: /etc/letsencrypt/live/your.domain.com/privkey.pem
base_url: your.domain.com
I don’t know what guide that is from, but it’s not my one from the docs.
You probably can just skip through most of it, but make sure that you have definitely done everything in each step. If you haven’t, redo the step in it’s entirety.
This should iron out any issues from using other guides.
If you do decide to redo it all from scratch, that whole guide should take about 40 minutes to an hour depending on your technical ability.
The port-forwards aren’t working then. If it’s taking you to your router login page, then you’re only getting as far as your router, and the request is not being forwarded to HA.
You will have to check your router manual to configure your port-forwards correctly.
I redid the forward rules in my router, I have two for my pi IP:
80->80
443->8123
Now if I use https://IP:8123 I get to the HA log in page, but if I enter the password (same as in http: API_PASSWORD in configuration.yaml) it says “unable to connect”
If I use https://[redacted].duckdns.org I get error “the site cannot be reached”.
I made a mistake last time when I said that https://[redacted].duckdns.org got me to my router configuration page, it only does that if I enter the address from my network, if I do it from the outside (eg my cell) it doesn’t work.
After I cleared my cache, now I can access HA from my home network (e.g. https://IP:8123), but my browser warns me that it’s not a secure connection and I end up with http://IP:8123 (without the s), after this I can enter my password and access HA
Still no luck from outside my network through duckdns.org
That’s normal for the internal connection as the certificate expects the incoming connection to be via DuckDNS, so because you’re not you get the insecure warning.
Can we check that duckdns software is definitely running on your system, and is connecting to the server OK? (obviously if it’s not updating the server with your ip address it won’t go through).
Check the port forwarding on your router.
Check from a device that is not connected to the internal network to discount loopback issues.
I think the duckdns software is running, when I was in step 3, I checked mydomain.duckdns.org:8123 and it worked. I don’t know how to check that the software is running in my pi, but I entered cat duck.log and got OK.
I checked the port forward in my router and I have 2 rules: 80->80 and 443->8123.
I tried duckdns using my cell connecting to LTE instead of wifi, but no response.
Do you think I should continue troubleshooting or should I start my install from scratch again?
Looks like it is a problem with your router not saving the 443 - > 8123 port forward correctly.
Either leave it how it is now (as it is working), or play with your port forwarding options until you get 443 to 8123 working so that you can drop the port number from the url.