Synology VMM and Companion app external access - Certificate mismatch

Hi Everyone,

My setup is a DS720+ with HA on VMM.

I could get external access working through reverse proxy configured in DSM

That allows me to run http local and https external with a sub domain to enter.

I can access to HA from the local network both via browser and the Companion app (android). All good when I am at home.
I can access to HA from outside but only via browser.
When trying via the Companion app I get “The Home Assistant Hostname certificate mismatch, please review the Home Assistant certificate or the connection settings and try again”

My guess is that the app doesn’t get *tunnelled" as the browser connection does with the reserve proxy and sees a mismatch between the certificate URL (assiociated at the NAS level).
Then I was looking into how I could share the certificate between Home Assistant within the virtual machine and the NAS (coming from the NAS). All forum posts I could find are related to the browser access and get solved with the reverse proxy.
I found the following video which does it but this with a docker installation.

So my question is, is my speculation of sharing the certificate correct to get this error away?
If yes, what would be the best way to extract the certificate files from the NAS (I guess the script in the video) but push it into the VM where HA is installed?

Thanks in advance

You must create certificate for each subdomain you make, and then assign it for that specific subdomain in synology (security, ceftificates, settings, then select certificate for you domain).

Thanks Protoncek for your reply and your tutorial:
https://www.protoncek.com/2021/04/17/synology-reverse-proxy/
This is the one I followed and it works for a web browser access.

My issue is really only with the Companion app on my phone from an external network. I hope I am clear.

That’s strange… so browser says that certificate is ok? Hm…did you “clear cache” in companion? I’ve heard that sometimes it can be quite tricky to do that, especially on ios…

EDIT: hm… it seems that on my page above i didn’t clearly wrote that you need to assign a certificate to subdomain… (i’ll have to correct this). Did you do that?
For this you go (in Syno): Control panel – Security – Certificate – Settings. Then in window that opens you’ll see dropdown menu’s beside all your created domains - find and select this newly created certificate ( home.yourdomain.me) for your home assistant subdomain.

Each subdomain must have it’s own certificate, which is made exactly so that subdomain.

I have been going accross a few tutorials, so I probably figured that part elsewhere, but yours clearly helped me.

Thanks for insisting, you were right…

I did the creation of the of the certificate for the subdomain but I forgot to assign it.
Your hint on the acceptance of the certificate was good, it wasn’t ok but I went through.
Thanks again

1 Like