/local/ resolves to old address

I’ve changed the web address of my homeassistant configuration.

It was xxxxx.ddns.net before and changed to xxxxx.duckdns.org.
Updated the external and internal url configuration.

  external_url: "https://xxxxx.duckdns.org"
  internal_url: "https://xxxxx.duckdns.org:8123"

Now when I try to send an attachment with automation:

  - service: notify.mobile_app_iphone
    data:
      title: "\uD83D\uDD10 Hello"
      message: "Hello"
      data:
        attachment:
          url: /local/xxxx.jpg
          content-type: jpg
          hide-thumbnail: false

I got this error in the message "The certificate to this server is invalid. you are connecting to a server pretending to be “xxxxx.ddns.net

So it still thinks my address is the old one. Is there a place where this “local” reference is held. I am on ubuntu with direct install on python. Thanks

Not sure about the Ubuntu files, but try looking in /etc for files like hostname and resolv.conf

Ubuntu references are as they supposed to me (resolving into xxx.duckdns.org) which is located in /etc/dnsmasq.hosts

The problem is where does homeassistant get the local file reference. It resolves it to /config/www/… but the first part references to the old url. /local/ resolving into local or external url was introduced in [0.111]. I’ve checked the code’s in http but nothing about external or internal there.

check configuration → general

and make sure to clear all caches.

btw. you have restarted, right?

Yep many times. Not the server though. But it doesn’t make sense. This really looks like a homeassistant issue.

Before 0.110 I used to state the path as https://xxxxx/local/image.jpg if I need to see a picture from external and with port number if I wanted to access from inside. The external and internal business made the automations much easier as homeassistant automatically appended the supposed url. Not anymore though.

Which cache are you suggesting to clean?

with your installation you need to restart the server, since it is a not a VM, much of the network stuff is on your local machine and not in HA only.

Let me try that when I get home. Will inform. Thank you.

Nothing changed after server restart. I still need to find where homeassistant stores the /local/ reference. The code seems to be not updated to my new configuration.

Well, the certificate does not care about /local
The certificate only looks at the domain name, so your certificate have not been updated correctly.
You need to check that the files are updated and the file path are correct and then you need to restart the service for the certificates to take effect.

And the message about “pretending to be” is caused by the server presenting a certificate for the old domain name while the new one is actually in effect.

All the cerficates are correct. The message included the old domain.

The old named was cached somewhere and with luck I think I found it :slight_smile:

After changing phones and trying to get push working with the new phone, I deleted the ios integration andd the problem is gone. Thanks for trying to help :slight_smile: