Skip to content

Instantly share code, notes, and snippets.

@jtpio
Last active February 27, 2020 17:28
Show Gist options
  • Save jtpio/88d98746ed8577403d4e4497370c6950 to your computer and use it in GitHub Desktop.
Save jtpio/88d98746ed8577403d4e4497370c6950 to your computer and use it in GitHub Desktop.
JupyterHub + Traefik as a proxy

JupyterHub + Traefik

Sample configuration for running JupyterHub locally with Traefik as a proxy.

Setup

conda env create
conda activate jhub-traefik

python -m jupyterhub_traefik_proxy.install --traefik --output=/usr/local/bin

python -m jupyterhub -f jupyterhub_config.py --debug
name: jhub-traefik
channels:
- conda-forge
dependencies:
- jupyterhub
- notebook
- pip
- pip:
- jupyterhub-traefik-proxy
from jupyterhub.auth import DummyAuthenticator
from jupyterhub.spawner import SimpleLocalProcessSpawner
from jupyterhub_traefik_proxy import TraefikTomlProxy
c = get_config() # noqa
c.JupyterHub.authenticator_class = DummyAuthenticator
c.JupyterHub.spawner_class = SimpleLocalProcessSpawner
c.JupyterHub.proxy_class = TraefikTomlProxy
c.JupyterHub.allow_named_servers = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment