Ok, it works finally. Here are the things I changed which might have fixed it:
Removed router port forward (443), then re-added.
Removed Reverse proxy setting, then re-added.
This is what probably, fixed it: Removed ssl_certificate and ssl_key lines from the configuration.yaml file. Note, I tried re-adding these and it actually made it to the homeassistant log-in page, but it timed out eventually and said it could not connect. I then removed these lines again and re-tested and it worked again.
Note, I am using “https://xxx.myds.me” to connect to homeassistant, so I need to use “https://xxx.myds.me:5001” to connect to the Synology web interface. It would be nice if I could use “https://xxx.myds.me/ha” to connect to home assistant instead… I remember seeing something in the location section of the nginx config file where I might be able to do this. Anyone have this working? Or how can a create a subdomain with synology’s ddns?
This post helped me a lot, but i’m still stuck on something.
When i want to go to: xxx.synology.me, i get a loading screen of HASS and then the error unable to connect.
Anyone has a fix for that?
@doubleUS i don’t get it anymore. I tried everything using certificates, reverse proxy, even edited my iptables and then everything was broken. Still got the loadingscreen of homeassistant and then it says “Unable to connect”.
I saw in the logs that it says: (MainThread) [homeassistant.components.http.view] Serving /api/websocket to 192.168.0.x (auth: True)
Can you provide some help ?
EDIT
While typing this reaction i saw the github link you provided. I tried that link again and that did the magic. Finally it is working after trail and error. Thank you for sending the link!
First I really want to say words of appreciation to @doubleUS and others for time spent on this and helping others. It helped me a lot.
I’d like to add my experience which works for me and could possibly help to next gens of users:
I have synology NAS with DSM 6.2.1-23824 Update 4 installed
I have HA run in docker container with use of http (no https)
I have lets encrypt certs in place for remote access to my synology box remotely
all you need to do is:
go to Control Panel/Application Portal/Reverse Proxy
``Super finally it worked with this simple reverse proxy thing @sergeymaysak thanks a lot ! Now if i go to my HA with https i cant get to my visual code cause it refere to my nas ip:port of vscode What do i need to set to see my setting via vscode or configurator?`
You are absolutely right! I finally was able to do this last week, while it failed many times earlier.
My solution was indeed, create a let’s encrypt certificate for duckdns.org in DSM and use the reverse proxy.
I’m running via reverse proxy
https in and forwarded to http, and work like a charm
downside is that once in a while ( once a year ) Home assistant installed in my PI blocks my Synology nas with the internal IP beceause of false login attempts
False login from ( hacker ) is seen by the pi as 192.168.2.3 and blocks it and i have to clear the blacklist.
is there a way that i can copy/ paste : ( automatically ) the encryption files from the Synology nas to the pi so i can forward the port without using reverse proxy and still using the encryption . beceause i already have a domain name which i bought.