Skip to end of banner
Go to start of banner

How to install TLJH on Nimbus

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

This guide documents the tasks associated with installing and configuring "The Littlest Jupyterhub" (TLJH) on Nimbus. It is assumed you've already created a VM and are able to log on to it using ssh. The developer's documentation for TLJH is available at  https://the-littlest-jupyterhub.readthedocs.io/en/latest/install/custom-server.html

Network setup:

Jupyterhub will require the standard HTTPS port and we also want to redirect HTTP to HTTPS, so we need to open these ports:

  1. From your Nimbus dashboard, under the "network" section of the left-hand navigation bar, select "security groups", then click on "create security group" on the right hand side:
    • Name: give it a meaningful name (eg jupyterhub)
    • Description: open ports to allow jupyterhub to communicate

    Once created, click on "manage rules" for that security group, then click on "add rule" in the top right, click Rule and then select HTTP from the drop-down menu. 

  2. Repeat for HTTPS, then it should look like this – 


Install TLJH:

  1. ssh into the VM and check if Python 3, curl, and git are installed using the following command (should be installed by default with latest Ubuntu):

    apt list python3 git curl
  2. Download and run the installer using the following code, making sure to replace <admin username> with the username of the account that will act as adminstrator. If you have yet to create any accounts on the VM simply use "ubuntu". 

    curl https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo -E python3 - --admin  <admin username>
  3. If everything runs as it should you'll see the following output with the final message being "Done!"

  4. You can then access the jupyterhub from the public IP associated with your VM, for eg. http://146.118.66.157, and you should see the sign-in page shown below. Note we will resolve the security warning next. If you fail to connect to the jupyterhub check that the security group created in the network setup section has been added to your instance.

Enabling HTTPS:

In order to set up HTTPS using TLJH and Lets encrypt you need a domain name for your hub. You may be able to arrange one with your institution, however if you just want a free and easy solution you can use a DNS service provider. I use Dynu, its free, has a good selection of features, no pesky reminders to register every month, and great documentation. See below for an example of my DNS control panel:

 Once you have a domain name you simply:

  1. Modify the TLJH config like so

    sudo tljh-config set https.enabled true
    sudo tljh-config set https.letsencrypt.email you@example.com
    sudo tljh-config add-item https.letsencrypt.domains yourhub.yourdomain.edu

    replacing you@example.com with your email address and yourhub.yourdomain.edu with your domain name.

  2. You can check your config file with 

    sudo tljh-config show
  3. Then reload the proxy to load the new configuration

    sudo tljh-config reload proxy

At this point, the proxy should negotiate with Let’s Encrypt to set up a trusted HTTPS certificate for you. It may take a moment for the proxy to negotiate with Let’s Encrypt to get your certificates, after which you can access your Hub securely at https://yourhub.yourdomain.edu.



  • No labels