# how to use jupyter-server-proxy with a Z2JH deployment

**URL:** <https://discourse.jupyter.org/t/how-to-use-jupyter-server-proxy-with-a-z2jh-deployment/5866>\
**Category:** Zero to JupyterHub on Kubernetes\
**Created:** [September 5, 2020, 12:47am UTC](https://discourse.jupyter.org/t/how-to-use-jupyter-server-proxy-with-a-z2jh-deployment/5866 "2020-09-05T00:47:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhinav\_Singh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/abhinav_singh/32/2672_2.png) [@Abhinav\_Singh](https://discourse.jupyter.org/u/Abhinav_Singh)\
**Post date:** [September 5, 2020, 12:47am UTC](https://discourse.jupyter.org/t/how-to-use-jupyter-server-proxy-with-a-z2jh-deployment/5866/1 "2020-09-05T00:47:45Z")

</div>

I have installed the jupyterhub on Kubernetes on GKE by following the guide.

I am running various services on the notebook like Tensorboard and Spark UI. These services are running on port inside the pods. And of course, these ports are not reachable from my hub IP.

I tried to use jupyter-server-proxy for the same. I did the below steps. I opened the terminal and ran below steps

```auto
1. mkdir www
2. cd www
3. echo "hi" >> index.html
4. python -m http.server 9000

```

![Screenshot 2020-09-04 at 5 09 57 PM](https://user-images.githubusercontent.com/10808722/92235735-ccd04c00-eed1-11ea-90a0-8e790164b768.png)

Now I went to this URL - [http://my-hub-ip/user/my-user-name/proxy/9000/](http://my-hub-ip/user/my-user-name/proxy/9000/)

I got a 404 error. Any suggestions on how should I fix it. I have verified that jupyter\_server\_proxy is enabled.

 ![Screenshot 2020-09-04 at 5 13 12 PM](https://user-images.githubusercontent.com/10808722/92235821-f4271900-eed1-11ea-9357-43e6ddaed240.png)

I have noticed one thing that whenever I try to access [http://my-hub-ip/user/my-user-name/proxy/9000/](http://my-hub-ip/user/my-user-name/proxy/9000/) my browser automatically redirects me to [http://my-hub-ip/user/my-user-name/proxy/9000](http://my-hub-ip/user/my-user-name/proxy/9000)

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [September 5, 2020, 8:04am UTC](https://discourse.jupyter.org/t/how-to-use-jupyter-server-proxy-with-a-z2jh-deployment/5866/2 "2020-09-05T08:04:05Z")

</div>

Welcome to the forum!

Please could you show us how you created the singleuser environment, for example could you link to the Dockerfile?

---

<div class="post-metadata">

**Author:** ![Abhinav\_Singh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/abhinav_singh/32/2672_2.png) [@Abhinav\_Singh](https://discourse.jupyter.org/u/Abhinav_Singh)\
**Post date:** [September 6, 2020, 4:57am UTC](https://discourse.jupyter.org/t/how-to-use-jupyter-server-proxy-with-a-z2jh-deployment/5866/3 "2020-09-06T04:57:45Z")

</div>

Hi @manics,

I am using `jupyter/datascience-notebook` image and this is the Dockerfile

[https://github.com/jupyter/docker-stacks/blob/6d42503c684f3de9b17ce92a6b0c952ef2d1ecd8/datascience-notebook/Dockerfile](https://github.com/jupyter/docker-stacks/blob/master/datascience-notebook/Dockerfile)

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [September 7, 2020, 8:44pm UTC](https://discourse.jupyter.org/t/how-to-use-jupyter-server-proxy-with-a-z2jh-deployment/5866/4 "2020-09-07T20:44:20Z")

</div>

You’ll need to build your own image that includes jupyter-server-proxy.

---

<div class="post-metadata">

**Author:** ![Abhinav\_Singh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/abhinav_singh/32/2672_2.png) [@Abhinav\_Singh](https://discourse.jupyter.org/u/Abhinav_Singh)\
**Post date:** [September 9, 2020, 6:28pm UTC](https://discourse.jupyter.org/t/how-to-use-jupyter-server-proxy-with-a-z2jh-deployment/5866/5 "2020-09-09T18:28:23Z")

</div>

Hi,

yes I have fixed it. I was using the wrong image.

---

<div class="post-metadata">

**Author:** ![kevinevelasco](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/kevinevelasco/32/18159_2.png) [@kevinevelasco](https://discourse.jupyter.org/u/kevinevelasco)\
**Post date:** [April 5, 2025, 12:45am UTC](https://discourse.jupyter.org/t/how-to-use-jupyter-server-proxy-with-a-z2jh-deployment/5866/6 "2025-04-05T00:45:19Z")

</div>

Hey how did u make it work? I have the same use case
