Installing on OVH#
By the end of this tutorial, you should have a JupyterHub with some admin users and a user environment with packages you want installed running on OVH.
An OVH account.
Step 1: Installing The Littlest JupyterHub#
Let’s create the server on which we can run JupyterHub.
Log in to the OVH Control Panel.
Click the Public Cloud button in the navigation bar.
If you don’t have an OVH Stack, you can create one by clicking on the following button:
Select a name for the project:
If you don’t have a payment method yet, select one and click on “Create my project”:
Using the Public Cloud interface, click on Create an instance:
Select a model for the instance. A good start is the S1-4 model under Shared resources which comes with 4GB RAM, 1 vCores and 20GB SSD.
Select a region.
Select Ubuntu 22.04 as the image:
OVH requires setting an SSH key to be able to connect to the instance. You can create a new SSH by following these instructions. Be sure to copy the content of the
~/.ssh/id_rsa.pubfile, which corresponds to the public part of the SSH key.
Select Configure your instance, and select a name for the instance. Under Post-installation script, copy the text below and paste it in the text box. Replace
<admin-user-name>with the name of the first admin user for this JupyterHub. This admin user can log in after the JupyterHub is set up, and can configure it to their needs. Remember to add your username!
#!/bin/bash curl -L https://tljh.jupyter.org/bootstrap.py \ | sudo python3 - \ --admin <admin-user-name>
Select a billing period: monthly or hourly.
Click the Create an instance button! You will be taken to a different screen, where you can see progress of your server being created.
In a few seconds your server will be created, and you can see the public IP used to access it.
The Littlest JupyterHub is now installing in the background on your new server. It takes around 5-10 minutes for this installation to complete.
Check if the installation is complete by copying the public ip of your server, and trying to access it with a browser. This will fail until the installation is complete, so be patient.
When the installation is complete, it should give you a JupyterHub login page.
Login using the admin user name you used in step 6, and a password. Use a strong password & note it down somewhere, since this will be the password for the admin user account from now on.
Congratulations, you have a running working JupyterHub!
Step 2: Adding more users#
Most administration & configuration of the JupyterHub can be done from the web UI directly. Let’s add a few users who can log in!
In the File menu select the entry for the Hub Control Panel.
In the control panel, open the Admin link in the top left.
This opens up the JupyterHub admin page, where you can add / delete users, start / stop peoples’ servers and see who is online.
Click the Add Users button.
A Add Users dialog box opens up.
Type the names of users you want to add to this JupyterHub in the dialog box, one per line.
You can tick the Admin checkbox if you want to give admin rights to all these users too.
Click the Add Users button in the dialog box. Your users are now added to the JupyterHub! When they log in for the first time, they can set their password - and use it to log in again in the future.
Congratulations, you now have a multi user JupyterHub that you can add arbitrary users to!
Step 3: Install conda / pip packages for all users#
The User Environment is a conda environment that is shared by all users
in the JupyterHub. Libraries installed in this environment are immediately
available to all users. Admin users can install packages in this environment
Log in as an admin user and open a Terminal in your Jupyter Notebook.
sudo -E conda install -c conda-forge gdal
sudo -Eis very important!
Install there with
sudo -E pip install there
there are now available to all users in JupyterHub.
If a user already had a python notebook running, they have to restart their notebook’s
kernel to make the new libraries available.
See Install conda, pip or apt packages for more information.