I can't connect via http locally, yet https works

Setup:

  • Hassio installed on 192.168.1.13 default port
  • DuckDNS plugin activated mynet.duckdns.org (let’s encrypt off by not accepting terms in config)
  • my own subdomain ( cloud.example.com ) redirected via CNAME to mynet.duckdns.org
  • port 8123 forwarded on router
  • used core_letsencrypt plug-in on hassio to generate certificate files for my custom subdomain cloud.example.com
  • From a web browser, I can access my hassio instance remotely via https://cloud.example.com:8123, valid certificate
  • From a web-browser I can access my hassio instance locally via https:// 192.168.1.13:8123 invalid certificate
  • From android mobile App I can access my hassio instance remotely via https:// cloud.example.com:8123

Problems:

  • From a web-browser I can not access my hassio instance via http://192.168.1.13:8123 ( 192.168.1.13 didn’t send any data. ERR_EMPTY_RESPONSE)
  • From android mobile App I can not access my hassio instance locally, neither via HTTPS nor HTTP! I triple checked the address 10 times. SSL error

Help!

What you’re describing is normal. Once you have SSL set up in Home Assistant you can only access (even locally) over HTTPS. The mobile apps can’t handle the cert warning, so you’d have to always use the external URL. Alternatively, you could use a reverse proxy (such as NGINX) to handle SSL and keep Home Assistant local access over HTTP.

6 Likes

I see.
Do you have any good tutorials on how to use a reverse proxy to handle SSL? I have no idea

What is the “industry standard” then? What do people normally do? Skip encryption?

I can go into HA locally via IP, but if you use the duckdns.org subdomain, it has to go through your router.

try https://192.168.1.13:8123/

Please read my message again :wink: that address works via web browser, it does NOT work via Android App

I though that didn’t work?
Confused now…

But that is normal as described I can't connect via http locally, yet https works - #2 by Tediore

check again, one is with the http🆂 , the other is without the 🆂

http://192.168.1.13:8123 http🆂://192.168.1.13:8123 http://cloud.example.com:8123 http🆂://cloud.example.com:8123
Browser :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
App :heavy_check_mark: :heavy_check_mark:

A lot of people use NGINX. Search NGINX on the forum, but here is an example:

Thanks @wmaker but in my case, what is it that I should do with nginx exactly?

The tutorial you posted is for redirecting http to https in all cases, but as you can see I have a problem connecting via HTTP, not https.
I’m afraid that by redirecting all traffic to https, I’ll also break it more

Make a backup/snapshot of your working config or/and enable samba so you can edit config and restart in case something go wrong and you can’t access HA web server:

Install nginx and folow doc:

  • set domain from duckdns
  • in network define port for https access ( let http port disable so you can access on default http://ip:8123 )
  • edit configuration.yaml and disable/comment http as per doc.
    Enable start on boot, watchdog… restart / reboot.

Now you can access HA server on
https://duckdnsname:port ( use that for external access or regular access if you can define host override in router )
http://ipadress:8123 ( use this for internal or emergency access and do not make this port accessible from www )

4 Likes

done, thanks

thanks for your help, i seach for hours and with another port for external ip, it works like a charm!

Hi!
I use Cloudflare with my own domain. It works great, but I would like to access HomeAssistant from within the network via http IP.
(This is important because I stream local audio and I want to stream local dashboard to Nest Hub and it only works properly with http)
Unfortunately I have not been successful so far.
Any idea what I am doing wrong?

http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  server_port: 8123
  ip_ban_enabled: false
  login_attempts_threshold: 3
  use_x_forwarded_for: true
  trusted_proxies:
    ...

No port forwarding on the router.