Https/Ssl access to Home Assistent from Internet (working procedure)

Hi
I’m pretty new in Home assistant.
I looked for a week the right method to publish it on internet as it is reachable from outsive (via web browser or app)
I read dozens of docs getting a lot of information, but non oth it was ca complete step by step guide
Finally I found the right way, so I would like to publish it here to help future new Home Assistant installer

  1. make a backup of your HA
    be sure to be able to restore it from comand line interface in case of need

  2. install terminal & ssh add on
    config password & tcp port
    start add on
    connect using the “root” user and the password set
    check the folder /ssl dos not exist or it is empty
    → cd /ssl
    → ls

  3. configure nat/publish in you router
    to let reachable HA from internet on port 80 (outside/inside)
    as let’s encrypt add on enable a temporary webserver running on port 80

  4. be sure that the hostname you want to use is resolved correctly by a public dns
    hostname → you public ip address
    (you need to own a public domain)

  5. install let’s encrypt add on
    configure
    domain → hostname
    email → your email address
    challenge → http
    network → 80 (80/tcp)
    save and start the addon
    see the logs for any issue
    if everythinis ok, cert and key will be saved on /ssl folder
    to access the folder, connect via ssh (see point 1))
    → cd /ssl
    → ls

  6. disable the nat/publish on port 80 on your router

  7. configure nat/publish in you router
    to let reachable HA from internet on port 8123 (outside/inside)
    if you need to speicfy the protocol, select https

  8. edit your configuration.yaml
    add the following

#SSL
http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem

  1. on HA → settings → network → home assistant usr
    internet → leave empty
    local network → disable “automatic”
    local network → set “https://you-url-public:8123

  2. restart HA
    you should now connect to HA by using the public url both from inside and outside
    your router should take care about reachability of the HA from inside

1 Like