# JupyterHub in Docker and Nginx on host: Websocket problem

**URL:** <https://discourse.jupyter.org/t/jupyterhub-in-docker-and-nginx-on-host-websocket-problem/19949>\
**Category:** JupyterHub\
**Tags:** docker\
**Created:** [June 15, 2023, 10:10pm UTC](https://discourse.jupyter.org/t/jupyterhub-in-docker-and-nginx-on-host-websocket-problem/19949 "2023-06-15T22:10:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmikushin](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/dmikushin/32/10209_2.png) [@dmikushin](https://discourse.jupyter.org/u/dmikushin)\
**Post date:** [June 15, 2023, 10:10pm UTC](https://discourse.jupyter.org/t/jupyterhub-in-docker-and-nginx-on-host-websocket-problem/19949/1 "2023-06-15T22:10:41Z")

</div>

I’m using the official Nginx proxy settings, including websocket configuration as presented in the official documentation: [https://jupyterhub.readthedocs.io/en/stable/reference/config-proxy.html#nginx](https://jupyterhub.readthedocs.io/en/stable/reference/config-proxy.html#nginx) Server starts, and the Jupyter main page loads, however, I keep getting Websocket errors in the Chrome developer console:

`WebSocket connection to 'ws://localhost/api/events/subscribe?token=8acfafc93ec11a9acfeeb21f680d8008a4a0def370750ace' failed:`

It looks like the offiicial Nginx config no longer works with the official Jupyter containers. Could someone confirm, please? If it worked for you, what was your container hash?

---

<div class="post-metadata">

**Author:** ![minrk](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/minrk/32/13_2.png) [@minrk](https://discourse.jupyter.org/u/minrk)\
**Post date:** [August 9, 2023, 11:32am UTC](https://discourse.jupyter.org/t/jupyterhub-in-docker-and-nginx-on-host-websocket-problem/19949/2 "2023-08-09T11:32:25Z")

</div>

If this is with JupyterHub, I suspect you might be hitting [this issue](https://discourse.jupyter.org/t/websocket-and-404-api-me-error-on-jupyterlab/20700) using the legacy notebook server, which doesn’t provide this endpoint. Check the single-user server logs to see if it says it’s starting “Jupyter Server” or “Notebook” and the version.

You can specifically launch jupyter-server with `JUPYTERHUB_SINGLEUSER_APP=jupyter-server` in the spawner environment.
