JupyterHub Configuration Guide

31/1/2023 Using TLJH (The littlest JupyterHub) is better option for a small team and using one server

The TLJH

I decided that I will use the TLJH for my Security Team's Jupyter Hub after I read the documentation and did some lab with it (https://tljh.jupyter.org/en/latest/)

My Goal is to set up a Jupyter Hub for my team so that they can share their Jupyter notebook and also I can manage the Analyst that is actively crafting notebooks and making use of it.

The TLJH has something called the TLJH Installer which is small and easy to configure (You can read that in the documentation)

Basic Configuration

I use a VM that runs Ubuntu 18.04 to host this JupyterHub Server with a storage of 70GB and 4GB of RAM

Using this command to download the installer and set up my version of JupyterHub, the user environment will include:

  • pandas

  • matplotlibs

  • networkx

  • pyvis

  • voila

  • And a shared directory

curl -L https://tljh.jupyter.org/bootstrap.py \
    | sudo python3 - \ --admin admin --show-progress-page \
    --user-requirements-txt-url https://raw.githubusercontent.com/https://raw.githubusercontent.com/Zeroska/tljh-user-env-requirement/main/requirement.txt
    --plugin git+https://github.com/kafonek/tljh-shared-directory --plugin git+https://github.com/Zeroska/tljh-voila-gallery@master

These will get you up and running but if you don't like the environment you can change the requirement or the shared folder's name

More Configuration

After the basic configuration, you might want to configure how the user will log in, and which port should we expose, I write a script that automates those stuff for you

Summary the script will do these things:

  • Expose port 8888 for the user to connect via IP Address

  • Setup the Authentication (The user will change the password when login for the first time) which is set up by default (you have to go to this path <your_server_ip>/hub/auth/change-password) to change your password

Conclusion

Running this to help my team take notes and do data analysis is wonderful. Combine it with VLAN Monitoring you got yourself an interactive documentation.

Last updated

Was this helpful?