Installation
Firstly, choose which operating system you’ll be running JupyterHub on.
-
Install & activate WSL
Section titled “Install & activate WSL”As JupyterHub only supports Linux, we need to make a virtual Linux environment within Windows. We can do this using WSL2.
-
Open
Powershellas an administrator.Hint
Right click on the Windows icon on your taskbar and selectTerminal (admin) -
Install WSL components
Terminal window wsl --install -d Ubuntu-22.04 -
Once installed, enable
systemdTerminal window sudo nano /etc/wsl.confA window will open, type in this:
/etc/wsl.conf [boot]systemd=trueThen use
Control + X ControlX and then typeY Y and hit enter. -
Finally, restart your WSL.
Terminal window wsl --shutdown
-
-
Install JupyterHub
Section titled “Install JupyterHub”Now, with our WSL instance set up, we can move onto installing TLJH.
-
Make sure you’re in WSL
Terminal window wsl -
Make sure you have
python3,python3-dev,curlandgitinstalled.Terminal window sudo apt install python3 python3-dev git curl -
Run TLJH’s installer
Make sure you replace
<admin-user>with your preferred username.Terminal window curl -L https://tljh.jupyter.org/bootstrap.py | sudo python3 - --admin <admin-user> -
Configure admin account
If all goes well, you should see this at the end of the logs:
Waiting for JupyterHub to come up (1/20 tries)Done!Visit http://localhost, and input the
<admin-user>username you chose above, and a password of your choice.
-
-
Configure networking
Section titled “Configure networking”With our TLJH instance authenticated, we now need to allow students & staff across the network to connect to this device.
Since JupyterHub runs inside WSL, you need to forward traffic from Windows to the WSL VM. Run these commands in PowerShell as administrator:
-
Get your WSL IP address
Terminal window wsl hostname -I -
Set up port forwarding (replace
<WSL_IP>with the IP from the previous step)Terminal window netsh interface portproxy add v4tov4 listenport=80 listenaddress=0.0.0.0 connectport=80 connectaddress=<WSL_IP> -
Allow inbound traffic through the firewall (only needed once)
Terminal window New-NetFirewallRule -DisplayName "JupyterHub" -Direction Inbound -LocalPort 80 -Protocol TCP -Action Allow
-
-
Make sure you have
python3,python3-dev,curlandgitinstalled.Terminal window sudo apt install python3 python3-dev git curl -
Run TLJH’s installer
Make sure you replace
<admin-user>with your preferred username.Terminal window curl -L https://tljh.jupyter.org/bootstrap.py | sudo python3 - --admin <admin-user> -
Configure admin account
If all goes well, you should see this at the end of the logs:
Waiting for JupyterHub to come up (1/20 tries)Done!Visit http://localhost, and input the
<admin-user>username you chose above, and a password of your choice.
Now, move onto the next step - configuring access.