# Tljh+jupyter-proxy-server for flask

**URL:** <https://discourse.jupyter.org/t/tljh-jupyter-proxy-server-for-flask/561>\
**Category:** JupyterHub\
**Created:** [March 22, 2019, 4:45am UTC](https://discourse.jupyter.org/t/tljh-jupyter-proxy-server-for-flask/561 "2019-03-22T04:45:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![story645](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/story645/32/288_2.png) [@story645](https://discourse.jupyter.org/u/story645)\
**Post date:** [March 22, 2019, 4:45am UTC](https://discourse.jupyter.org/t/tljh-jupyter-proxy-server-for-flask/561/1 "2019-03-22T04:45:37Z")

</div>

I’m using the littlest jupyterhub to teach all the things Python because the lab I was assigned doesn’t have Python installed locally. Asked on twitter ([https://twitter.com/story645/status/1108854840048926720](https://twitter.com/story645/status/1108854840048926720)) and was recommended Jupyter-proxy server, so installed it and enabled the lab extension and I have no idea how to configure this for flask or if it’s even installed properly (is there a test?)  
Thanks, Hannah

ETA: I’ve since broken this so badly that notebook will load but lab won’t and I don’t know how to figure out the issue (tired jupyter --debug & jupyter --troubleshoot)

---

<div class="post-metadata">

**Author:** ![betatim](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/betatim/32/10_2.png) [@betatim](https://discourse.jupyter.org/u/betatim)\
**Post date:** [March 22, 2019, 8:54am UTC](https://discourse.jupyter.org/t/tljh-jupyter-proxy-server-for-flask/561/2 "2019-03-22T08:54:34Z")

</div>

When I used jupyter-server-proxy to make the VS Code binder I had to run these three lines:

> <https://github.com/betatim/vscode-binder/blob/af74434ad5ddbd039e9a0b33dd2d8ee182c3d159/postBuild#L3-L6>

in addition to installing the `jupyter-server-proxy` package via a `requirements.txt`. After that it worked for proxying arbitrary ports. I’m not sure if you need the lab extension to make the proxying work or if that is just needed if you want the clever “launcher icon” thing.

One additional thing to note: if you are using TLJH all your users have to share the available ports, so they can’t all use port 5000 and they can look at each other’s work if they know the port someone else is using. To get that kind of separation you need to use containers or some other advanced magic (maybe someone knows if you can use systemd units and isolate network interfaces?).

---

<div class="post-metadata">

**Author:** ![story645](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/story645/32/288_2.png) [@story645](https://discourse.jupyter.org/u/story645)\
**Post date:** [March 22, 2019, 9:39am UTC](https://discourse.jupyter.org/t/tljh-jupyter-proxy-server-for-flask/561/3 "2019-03-22T09:39:29Z")

</div>

The port thing isn’t a problem 'cause flask takes a port arg. Will try your fix soon ish. Also do you have any tips for unbreaking /lab being a blank page? I think I installed stuff to user and system when trying to install the extensions

---

<div class="post-metadata">

**Author:** ![betatim](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/betatim/32/10_2.png) [@betatim](https://discourse.jupyter.org/u/betatim)\
**Post date:** [March 22, 2019, 12:41pm UTC](https://discourse.jupyter.org/t/tljh-jupyter-proxy-server-for-flask/561/4 "2019-03-22T12:41:47Z")

</div>

> [@story645](#):
>
> Also do you have any tips for unbreaking /lab being a blank page?

No idea. I have to (shamefully) admit that I hardly ever use the lab interface :-/ Classic notebook for life ✊
