# HA configuration and Websocket-proxy

**URL:** <https://forums.suse.com/t/ha-configuration-and-websocket-proxy/695>\
**Category:** Rancher 1.x\
**Created:** [October 13, 2015, 7:59pm UTC](https://forums.suse.com/t/ha-configuration-and-websocket-proxy/695 "2015-10-13T19:59:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhumrich](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/nhumrich/32/344_2.png) [@nhumrich](https://forums.suse.com/u/nhumrich)\
**Post date:** [October 13, 2015, 7:59pm UTC](https://forums.suse.com/t/ha-configuration-and-websocket-proxy/695/1 "2015-10-13T19:59:29Z")

</div>

The docs for HA configuration ([http://docs.rancher.com/rancher/installing-rancher/installing-server/multi-nodes/](http://docs.rancher.com/rancher/installing-rancher/installing-server/multi-nodes/)) state that a websocket-proxy needs to be running. However it never mentions what port the proxy needs to listen on

```
docker run -d -p <port>:<port> -v $(pwd)/api.crt:/api.crt rancher/server websocket-proxy -jwt-public-key-file=/api.crt -listen-address=0.0.0.0:<port>

```

and as far as I can tell, there is no way for it to discover the host.  
How is the websocket-proxy even being used/discovered? Does it need to run on a specific host?

---

<div class="post-metadata">

**Author:** ![cloudnautique](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cloudnautique/32/26_2.png) [@cloudnautique](https://forums.suse.com/u/cloudnautique)\
**Post date:** [October 13, 2015, 8:43pm UTC](https://forums.suse.com/t/ha-configuration-and-websocket-proxy/695/2 "2015-10-13T20:43:08Z")

</div>

Hello, you’ll need to set

```auto
CATTLE_HOST_API_PROXY_MODE: “ha”
CATTLE_HOST_API_PROXY_HOST: “” //This will need to be accessible from your browser AND to ALL compute nodes

```

On the rancher/server container at startup. The `mode` variable tells the server not to run the proxy internally(weird things happen). The `host` variable is something like `ws-proxy.myrancherexample.com:443`. The variable tells Rancher where to go to for websocket connections. You will need it to be the same scheme (HTTP(S)) as the Rancher server otherwise the browser will complain.

If you are using SSL you’ll have to proxy it through Nginx or something that does the termination since websocket-proxy can’t term ssl on its own.

---

<div class="post-metadata">

**Author:** ![nhumrich](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/nhumrich/32/344_2.png) [@nhumrich](https://forums.suse.com/u/nhumrich)\
**Post date:** [October 13, 2015, 8:56pm UTC](https://forums.suse.com/t/ha-configuration-and-websocket-proxy/695/3 "2015-10-13T20:56:18Z")

</div>

Ah I get it now, I was just confused because I had to set that env-var BEFORE creating the websocket-proxy, so when I set it I set it to the url to my host (port 8080).  
It might make more sense in the docs to start the websocket-proxy before starting the rancher server.

Thanks,  
Nick

---

<div class="post-metadata">

**Author:** ![cloudnautique](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cloudnautique/32/26_2.png) [@cloudnautique](https://forums.suse.com/u/cloudnautique)\
**Post date:** [October 14, 2015, 8:39pm UTC](https://forums.suse.com/t/ha-configuration-and-websocket-proxy/695/4 "2015-10-14T20:39:20Z")

</div>

Ah, yeah… we need to clarify that more.

Its one of those chicken egg things, you need Rancher server up before you can start websocket-proxy because you need the api.crt.

Are you up and running with the proxy behind SSL now?

---

<div class="post-metadata">

**Author:** ![nhumrich](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/nhumrich/32/344_2.png) [@nhumrich](https://forums.suse.com/u/nhumrich)\
**Post date:** [October 14, 2015, 8:54pm UTC](https://forums.suse.com/t/ha-configuration-and-websocket-proxy/695/5 "2015-10-14T20:54:13Z")

</div>

Yep, everything seems to be working fine now. Thanks!

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [October 15, 2015, 4:30pm UTC](https://forums.suse.com/t/ha-configuration-and-websocket-proxy/695/6 "2015-10-15T16:30:32Z")

</div>


