Generated Certificates using DuckDNS addon.
Certificates are installed and do work as it is possible to perform https access to other addons like, for instance IDE.
When trying to access front end I receive error messages on the browsers like these:
Firefox:
SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG
Chrome:
ERR_SSL_PROTOCOL_ERROR
When searching for this errors it seems there is some kind of configuration issue with the webserver:
“The web server is sending non-secure (HTTP) data where secure (HTTPS) data is expected by Firefox. This can be confirmed by going to http://server-name:443 instead of https://server-name.”
This seems to be the case as it is possible to access using http on port 8123.
Issue is well before that point. Even inside the network I cannot open an SSL connection to homeassistant.
I had this setup working previously with no issues. Do not know why this is happening with a fresh setup.
I seems like some side effect introduced between when I first setup homeassistant and this version…
Nevertheless as I stated, I had this setup already running so port forwarding in the router is already configured.
I am using NAT port 8123 outside to 8123 inside. No port translation in my setup.
I had this same problem with my installation (pi) . But I don’t remember exactly what the fix was. Either I had a missing http: in configuration.yaml or the SSL port was forwarded to the wrong IP.
That is not my case. Not worried about router publishing for now. Even internally I am unable to access homeassistant frontend using https on port 8123
After some more fiddling with configuration and still without luck, I came across with this when running command: hassio ha info
core-ssh:~# hassio ha info
arch: amd64
boot: true
custom: false
image: homeassistant/qemux86-64-homeassistant
last_version: 0.87.1
machine: qemux86-64
port: 8123 ssl: false
version: 0.87.1
wait_boot: 600
watchdog: true
The entry ssl:false seems to be the problem. As far as I know this should be set to true but I do not know how to do it.
Thank you all.
Solved my issue.
In my configuration.yaml, the http: header was under config: header, instead of being at the same level.
It was a fresh install so something went wrong with the template or I did some change that I did not notice and the result was SSL not working.
Thank you Xptorol for posting your fix!!! I had been staring at my config for a day… then with your post realizing I was doing the same thing where I had " http:" rather than “http:”… I was starting on the second column of line rather than on the first.
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
base_url: https://changetoyours.duckdns.org
server_port: 8123
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
# Text to speech
tts:
platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
This answer helped me.
Changed address (ofc)
Changed port to 443
Created port in/out 443 in router.
Maybe I could have left it at 8123 inside my network, but this works for me.