Http vs https with duckdns

I installed the duckdns add-on for hass.io, created an account and subdomain on duckdns.org. But my subdomain is http://[mydomain].duckdns.org and duckdns doesn’t seem to let me create a subdomain other than pure http.

I forwarded port 8123 on my router to my Pi running HA and it works to access my HA over http. Great, but…

All guides and doc I’ve read only make mention of https. I can’t figure out how to configure things.

  1. Does duckdns care that my domain name is http vs https?

  2. Does HA care?

  3. Does my router care?

Sorry sifting through various doc but still confused.

Try : -

But be aware something ‘may’ have changed in the interim
You ‘may’ need to read the whole thread.
But it works for me

Looks like you’re starting from scratch in this stuff :slight_smile:

  1. Nope. The domain name is only redirecting a name to an IP. The protocol doesn’t care (http, https, ftp, ssh…whatever)

  2. Yes ! HA needs to know if it should serve http or https (in https case it should serve a certificate) (See “And then finally” at the end of this post)

  3. Not really…Because you can serve http or https on the same port. Create your rule for 8123, and then serve http or https on that port for HA. Once again, here, the rule is only a matter of port, not a matter of protocol !

The thing is, you installed duckdns addon, OK ! But did you configured the letsencrypt part also ?
And then finally did you configured HA tot be on https mode :

http:
  base_url: https://my-domain.duckdns.org:8123
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
1 Like

Hi! I had this all working. Worked great many days in a row and then just stopped working all of a sudden. Now I have some “Invalid config for [http]” and I’m trying to understand the changes. My HA has been totally useless for a week or two and my wife can’t control the blinds. Sorry…rant over.

Apparently “base_url” is deprecated and you have to use a helper. I find myself in the developer docs, which seems weird. @SNoof85 Are you using this still / had to change anything recently?

In the 110 release notes: 0.110: Speed! OpenZWave beta, HomeKit Cameras, ONVIF, Calendars - Home Assistant

“If you want to set those via YAML, homeassistant: main configuration has now a external_url and internal_url setting.”

and under breaking changes:

HTTP - base_url is deprecated and replaced by an internal_url and external_url core configuration setting. - (@frenck - #35224) (basic config docs) (http docs)

The Basic Config and HTTP docs are what you should be looking at, not any developer documentation. You may find yourself very, very lost if you are indeed looking at developer documentation :slight_smile:

Seeing as this was introduced in a version change, this didn’t happen out of the blue. When you change versions you should read the release notes of the latest release and any ones in between you’ve missed.

If you don’t want to do that, the breaking changes custom component can help reduce the time spent working out what is relevant to you and what isn’t. Custom_component: breaking_changes

1 Like

Thanks @Razgriz. Yeah being down the developer rabbit hole felt wrong.

I have checked the basic config docs and http docs now. When I had ssl working, my http config used “ssl_certificate: /ssl/fullchain.pem” and “ssl_key: /ssl/privkeyt.pem”.

There is nothing in my ssl folder any more and I can’t remember what exactly was in there previously. Do you know of any reason my file system would have been altered in an update, specifically the ssl folder? Also, I see the note that “base_url is deprecated and replaced by internal_url and external_url” but the http doc does not mention anything about internal_url nor external_url. Is it safe to assume that the comment is referring to the old http: base_url: and the new homeassistant: internal_url: ?

Sorry, can’t comment as to why you’re missing your certificate and private key. It’s a simple enough job to generate one again, but the method will differ depending on your setup. If you’re using the duckdns add-on, I believe it should just be a case of removing the add on and reinstalling. Please take a backup before you do!

The Base Config docs detail where you can add internal/external URL’s in your config. However if you leave them blank you can set them via the UI by going to Configuration > General, providing of course you can get to the UI.

word. yeah I just disabled ssl for now so I can at least run HA again from local WiFi. Just trashed Duck DNS add-on to see if that will cleanse it as you suggest also.