Create service nbviewer#
Configuring the notebook viewer as a JupyterHub service has the advantage that only users who have previously logged on to JupyterHub can call up the
nbviewerinstance. This can be used to protect access to notebooks as a JupyterHub service in/srv/jupyter/jupyter-tutorial/jupyterhub_config.py:c.JupyterHub.services = [ { 'name': 'nbviewer', 'url': 'http://127.0.0.1:9000', 'cwd': '/srv/jupyterhub/nbviewer-repo', 'command': ['/srv/jupyter/.local/share/virtualenvs/jupyter-tutorial--q5BvmfG/bin/python', '-m', 'nbviewer'] } ]
nameThe path name under which the notebook viewer can be reached::
/services/<name>urlProtocol, address and port used by
nbviewercwdThe path to the
nbviewerrepositorycommandCommand to start
nbviewer