# Unable to get jupyter server proxy working on theia

**URL:** <https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104>\
**Category:** General\
**Created:** [January 21, 2020, 11:04pm UTC](https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104 "2020-01-21T23:04:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickhan123](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/nickhan123/32/1485_2.png) [@nickhan123](https://discourse.jupyter.org/u/nickhan123)\
**Post date:** [January 21, 2020, 11:04pm UTC](https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104/1 "2020-01-21T23:04:13Z")

</div>

Hey all, total newbie here.  
I’m trying to get jupyter notebook working on Theia. I have installed jsp using the command “pip install jupyter-server-proxy” and proceeded to follow the instructions on [https://jupyter-server-proxy.readthedocs.io/en/latest/convenience/packages/theia.html](https://jupyter-server-proxy.readthedocs.io/en/latest/convenience/packages/theia.html)

Can anyone let me know what I’m doing wrong here?

---

<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:** [January 22, 2020, 6:04am UTC](https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104/2 "2020-01-22T06:04:43Z")

</div>

I’m not sure what the solution is, however I do have a (very very) old binder repo that install theia: [https://github.com/betatim/theia-binder](https://github.com/betatim/theia-binder) maybe that gives you some new ideas for what to do.

---

<div class="post-metadata">

**Author:** ![manniche](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manniche/32/799_2.png) [@manniche](https://discourse.jupyter.org/u/manniche)\
**Post date:** [January 27, 2020, 8:33pm UTC](https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104/3 "2020-01-27T20:33:31Z")

</div>

Hi @nickhan123,

besides the configuration you linked to, you’ll also need to configure the server proxy in your `~/.jupyter/jupyter_notebook_config.py`, e.g.

```auto
import os
c.ServerProxy.servers = {
  'theia': {
    'command': [
      '/path/to/bin/theia',
        'start', 
        os.environ.get("HOME"),
        '--hostname=127.0.0.1',
        '--port={port}'
    ],
    'timeout': 30,
    'launcher_entry': {
      'title': 'Theia'
    }
  }
}

```

Hope this helps.

---

<div class="post-metadata">

**Author:** ![dirkcgrunwald](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/dirkcgrunwald/32/1347_2.png) [@dirkcgrunwald](https://discourse.jupyter.org/u/dirkcgrunwald)\
**Post date:** [January 28, 2020, 5:03am UTC](https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104/4 "2020-01-28T05:03:21Z")

</div>

It’s also possible to package that as a “pip” python package for the configuration. I thought that [https://github.com/jupyterhub/jupyter-server-proxy/tree/master/contrib/theia](https://github.com/jupyterhub/jupyter-server-proxy/tree/master/contrib/theia) had this included.

For example, in [https://github.com/dirkcgrunwald/jupyter\_codeserver\_proxy-](https://github.com/dirkcgrunwald/jupyter_codeserver_proxy-) I set up a proxy for VScode. The installation then looks like the code below. The challenge is that you need to install the jupyterlab-server-proxy to get any of this to work and the version that’s in `pip` or `conda` is too old for jupyterlab-1.0 and above, if I recall.

```auto
RUN (cd /tmp && \
        git clone https://github.com/jupyterhub/jupyter-server-proxy && \
        cd /tmp/jupyter-server-proxy/jupyterlab-server-proxy && \
        npm install && npm run build && jupyter labextension link . && \
        rm -rf /tmp/jupyter-server-proxy )

RUN $CONDA_DIR/bin/pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple jupyter-codeserver-proxy==1.0b3

RUN cd /opt && \
        mkdir /opt/code-server && \
        cd /opt/code-server && \
        wget -qO- https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-linux-x86_64.tar.gz | tar zxvf - --strip-components=1
ENV PATH=/opt/code-server:$PATH

```

The resulting proxy display looks like the following on our setup. I could never get the VScode tile to get to where e.g the Terminal is (which would make more sense) but I didn’t invest much time in trying.  
 ![vscode](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/e/eaad9149fb4cb3334b98219294963b971934640c.png)

---

<div class="post-metadata">

**Author:** ![chuckcode](https://avatars.discourse-cdn.com/v4/letter/c/f04885/32.png) [@chuckcode](https://discourse.jupyter.org/u/chuckcode)\
**Post date:** [July 9, 2020, 12:38am UTC](https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104/5 "2020-07-09T00:38:37Z")

</div>

Hi All, Curious if you got this working @nickhan123 or @manniche? I’m also a relative newbie to extensions and jupyter proxy servers and haven’t been able to get it to work. I think the idea of modern editors inside of jupyterlab could be really transformative, but I’m having a hard time putting things all together. A concrete end to end example of theia or code server would really help as I can install theia or code-server, how to point juptyerlab to them seems to not be happing with ‘pip install jupyter-server-proxy’ and debugging is challenging. dirkcgrunwald example is useful but I can’t install docker in current environment and don’t have his image.

---

<div class="post-metadata">

**Author:** ![manniche](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manniche/32/799_2.png) [@manniche](https://discourse.jupyter.org/u/manniche)\
**Post date:** [August 6, 2020, 9:59am UTC](https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104/6 "2020-08-06T09:59:28Z")

</div>

Not able to post a complete working example here, unfortunately. Even though this is arguably easier to do in a docker container, you should basically follow the commands in the Dockerfile definition given above. Additionally, you need to place the configuration file I listed above in the path I also specified.  
You can try starting jupyterlab from the command line and watch the log output to see if there are any errors or warnings. You are welcome to paste any log output you get in here.

---

<div class="post-metadata">

**Author:** ![matthew.brett](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/matthew.brett/32/2204_2.png) [@matthew.brett](https://discourse.jupyter.org/u/matthew.brett)\
**Post date:** [August 6, 2020, 4:40pm UTC](https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104/7 "2020-08-06T16:40:53Z")

</div>

Just to say - I would also be very interested to get such a setup working. Has anyone got a recent version of Theia to work (as opposed to VSCode)?

---

<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:** [August 10, 2020, 8:38pm UTC](https://discourse.jupyter.org/t/unable-to-get-jupyter-server-proxy-working-on-theia/3104/8 "2020-08-10T20:38:20Z")

</div>

[https://github.com/betatim/theia-binder](https://github.com/betatim/theia-binder) does this help?
