Skip to content

axelmartenssonmodelon/jupyter-server-proxy

 
 

Repository files navigation

Jupyter Server Proxy

ReadTheDocs badge GitHub Workflow Status PyPI badge Conda badge NPM badge

Jupyter Server Proxy lets you run arbitrary external processes (such as RStudio, Shiny Server, Syncthing, PostgreSQL, Code Server, etc) alongside your notebook server and provide authenticated web access to them using a path like /rstudio next to others like /lab. Alongside the python package that provides the main functionality, the JupyterLab extension (@jupyterhub/jupyter-server-proxy) provides buttons in the JupyterLab launcher window to get to RStudio for example.

Note: This project used to be called nbserverproxy. As nbserverproxy is an older version of jupyter-server-proxy, uninstall nbserverproxy before installing jupyter-server-proxy to avoid conflicts.

The primary use cases are:

  1. Use with JupyterHub / Binder to allow launching users into web interfaces that have nothing to do with Jupyter - such as RStudio, Shiny, or OpenRefine.
  2. Allow access from frontend javascript (in classic notebook or JupyterLab extensions) to access web APIs of other processes running locally in a safe manner. This is used by the JupyterLab extension for dask.

The documentation contains information on installation & usage.

Security warning

Jupyter Server Proxy is often used to start a user defined process listening to some network port (e.g. http://localhost:4567) for a user starting a Jupyter Server that only that user has permission to access. The user can then access the started process proxied through the Jupyter Server.

For safe use of Jupyter Server Proxy, you should ensure that the process started by Jupyter Server proxy can't be accessed directly by another user and bypass the Jupyter Server's authorization!

A common strategy to enforce access proxied via Jupyter Server is to start Jupyter Server within a container and only allow network access to the Jupyter Server via the container.

For more insights, see Ryan Lovett's comment about it.

Install

Requirements

  • jupyterlab>=2 or notebook

Python package

pip

pip install jupyter-server-proxy

conda

conda install jupyter-server-proxy -c conda-forge

Local development

See the contributing guide.

JupyterLab extension

Note that as the JupyterLab extension only is a graphical interface to launch registered applications in the python package, the extension requires the python package to be installed.

As of version 3.0.0 the Python package ships with a JupyterLab 3 compatible extension, making this step only needed for JupyterLab 2.

jupyter labextension install @jupyterhub/jupyter-server-proxy

Disable

Server extension

jupyter serverextension disable --sys-prefix jupyter_server_proxy
jupyter server extension disable --sys-prefix jupyter_server_proxy

Notebook classic extension

jupyter nbextension disable --sys-prefix --py jupyter_server_proxy

JupyterLab extension

jupyter labextension disable @jupyterhub/jupyter-server-proxy

About

Jupyter notebook server extension to proxy web services.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 89.3%
  • TypeScript 4.8%
  • RobotFramework 3.6%
  • JavaScript 2.2%
  • HTML 0.1%