Cool, so just to make sure we are on the same page, you got to the hassos command line by typing login at the hassio >?
I booted my old raspberry pi running hass.io. Once i type ‘login’ at the hassio > prompt (and login as root) I have the typical # prompt for root access. Now I can run the docker command.
IIRC, hassos is just another linux, maybe busybox?. If you ran the docker ‘exec’ command I suggested, you are running in the bash shell. A simple ‘ls’ should work for listing a directory? I used the ‘vi’ editor.
Sorry to bump in here, but I couldn’t find a better thread for my issue:
Until recently, I have had a a port forwarding configured on my internet router 443->443 to my homeassistant instance (running on an Raspberry Pi 4 on hassio) configured with ssl certificates from let’s encrypt. Everything was working fine and I was happy…
Now I want to expose a second server on the same port and I have installed the nginx addon. I reused the ssl certificates that I (manually) got from let’s encrypt. I configured everything to the best of my knowledge. And here is the problem:
When I configure nginx without ssl encryption, I can access my homeassistant instance from the internet
When I configure nginx to use ssl encryption (with the ssl certificates), I get an error when I try to load my homeassistant instance from the internet.
The weird thing is: If I force the browser to use http on port 443, I will get plain text. Basically, nginx does not encrypt and if my internet browser tries to decrypt plain text, it will obviously fail.
Does anyone know, what is going on?
I can provide config / logs, whatever is helpful …
For anyone that finds this post trying to work with the official NGINX addon and doesn’t want to just use the “Nginx Proxy Manager addon” then to use the customize server features you need to create a folder in /usr/share/hassio/share/nginx_proxy inside that folder create a file with any name but ending in .conf e.g. other_server.conf
So the way this works is the official nginx add on works based on the domain specified in the config settings and will only forward that domain on to the Home Assistant server. Then these extra server blocks will kick in based on the server_name matching so in the example above when requesting based on IP address it will hit these server blocks instead of the home assistant ones and will proxy to another server.
You could also do server_name: a.nother.domain.com then you can run two domains from the one nginx instance.
Note you may not need all the settings i’ve set above - you need to check the nginx docs / docs for the service you are proxying.
I’ve not done the defaults component so I can’t comment on that.
thanks. I did come across this searching for the same use case and willing to spend time getting this right, vs. jumping to a new addon (Proxy manager - though from what I read it’s a better option?!)
will report if this works
EDIT: crap, looks like I’m using the supervised hass.io install where all add-ons are running as separate containers :S
@foxy82 , you say:
"to use the customize server features you need to create a folder in /usr/share/hassio/share/nginx_proxy inside that folder create a file with any name but ending in .conf e.g. other_server.conf"
But the instructions say:
“…additional NGINX configuration files for the default server and additional servers are read from files in the /share directory specified by the default and servers variables.”
Which one is it?
On one of my installations (where the add-on works perfectly for the main site), I cannot get any other server configured through the Customize Section. On one other server I have, it works out of the ‘/share/’ folder.
I documented what I needed to do but that was over a year ago now so things may have moved on.
I don’t use that add on anymore and created my own due to a ‘feature’ of it that didn’t work for me details here in case you are hitting the same problem: