I have an asus dls-55u, it should have the option but I do not see it in the configuration. Where it should be? (regarding NAT I have only one option to enable/disable it)
I have a similar setup, but I’m running HASS on my Synology (without Docker). I can’t get passed the “502 Bad Gateway nginx” error (mentioned earlier in this post) when attempting to connect to HASS at “https://xxx.myds.me” in Chrome.
Ideally, I would like to connect to “https://xxx.myds.me/ha” or have a subdomain for HASS, but I’m not sure how to do that yet. For now I have to connect to the Synology web portal via “https://xxx.myds.me:5001”, since the reverse proxy I setup is re-directing “https://xxx.myds.me” (port 443) to internal port 8123. I’m not even sure if I need a reverse proxy to accomplish what I am trying to do. I was able to delete the 443 port forward on my router and I can still connect secured https to the synology web portal over port 5001… but it doesn’t seem to be possible to connect https directly over port 8123. I’m not sure how all of this works. Can someone please help! I already wasted all of yesterday trying different things. See below for details.
This stuff is working:
external https connection to synology web portal (port 5001) is working (let’s encrypt certificate added through synology)
external http unsecure access to home assistant is working
external http unsecure access through Reverse Proxy is working (if updating Reverse Proxy to use HTTP port for source and removing ssl_certificate and ssl_key from configuration.yaml.)
Here is my setup:
Home Assistant is running on the Synology (not using Docker)
Synology control panel->Security->Certificate:
Added Let’s Encrypt Certificate for xxx.myds.me
Router:
Port 443 -> 443 on Synology
Edited Portal.mustache file according to this post.
NOTE: Have also tried changing permissions on these files point to them directly in the configuration.yaml file. I’m not sure what the ideal way of doing this is.
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?`