Hass.io nginx proxy config?

Hi,
I’ve succesfully got my hass.io installation running with LetsEncrypt, but I am trying to get the nginx proxy add-on to work.

The trouble I am having is with the syntax, and that there are no examples of how this is included into the add-on config.

Currently, I have this:

{
  "domain": "home.domain.com",
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Can anyone assist with an example syntax of how or where I would include an existing nginx proxy config, or create my own?

I’m trying to:

  • expose/proxy my existing HA on port 8123 to https://home.domain.com
    • when i look at the repo config, it looks like it should do this already, but doesnt. Instead I get an “502 Bad Gateway, nginx/1.12.0” error.
  • expose/proxy an internal service like eg: http://192.168.0.20 to https://something.domain.com (the LetsEncrypt cert already supports it)
    • I think I would need to access and modify the proxy nginx.conf file, but I cant seem to find it anywhere.

This would basically cover most use cases I think.

Can anyone help?

I guess I have a similar issue. Except I am not using Lets encrypt. I would think the certfile and the keyfile is locally generated!?
In any case I get an ERR_CONNECTION_REFUSED. Port forwarding is set up on port 80->80 and 443->443 pointing to my hass.io server. Changing the port forward from 80 -> 8123 things run smoothly though totally insecure.

Hey, I managed to get this working (config over here), using certbot and nginx_proxy.

These plugins are made by @bestlibre

Works absolutely great, 100x better than the hass.io-provided LetsEncrypt, from the docs.

I hope this is helpful. :slight_smile:

Thanks! But I managed to install the Caddy proxy add-on instead and it works great. I didnt have to create an account on Lets encrypt or generate certificates at all. Very neat. You can install the add-on from @bestlibre repo. (https://github.com/bestlibre/hassio-addons).

1 Like

Hey Martin , Could you help me with caddy config? i tried many ways, but its not working…