Deploying Jupyterhub on Azure for Individual Students or Class Groups
Published Jan 21 2020 08:08 AM 5,504 Views

We have been working on two new Azure templates to help academics and students deploy a JupyterHub Server using a Ubuntu Linux VM.

These templates allow you to deploy a CPU or GPU based VM in the resource group location and will return the admin user name, Virtual Network Name, Network Security Group Name and FQDN.

If you are new to Azure virtual machines, see:

If you are new to template deployment, see:

Azure Resource Manager documentation


By default, the template allows network traffic through HTTP and https, do not modify the network and security group rules.

The deployment will take around 10 minutes - first, all your resources will be deployed, and then THLJ will be installed on your VM. Before start using the Jupyter Server, you will need to think about how many users will connect to the VM. The virtual machine can be scaled up depending on your subscription to a larger machine if you need it.

For Classroom Environments 

It is recommended 1 GB of memory per user if you are using a CPU based VM and 2 GB of memory per user if you are using a GPU based virtual machine.

The Classroom template supports the following VM Sizes which have been optimized for multi-user experiences.

CPU Machines

  • "CPU-8GB": "Standard_F4s_v2"
  • "CPU-14GB": "Standard_DS3_v2"
  • "CPU-16GB": "Standard_D4s_v3"
  • "CPU-28GB": "Standard_DS4_v2"
  • "CPU-32GB": "Standard_F4s_v2"
  • "CPU-64GB": "Standard_D16s_v3"
  • "CPU-112GB": "Standard_DS14-4_v2"
  • "CPU-128GB": "Standard_E16s_v3"
  • "CPU-256Gb": "Standard_E32_v3"
  • "CPU-432Gb":"Standard E64_v3"

GPU Machines

  • "GPU-56GB": "Standard_NC6_Promo"
  • "GPU-112GB":"Standard_NV12"
  • "GPU-224GB":"Standard_NV24"

i.e. if you want a CPU based VM to be used by 80 users, you will need a VM with 100 GB of memory.

For more details on Azure Compute Sizes

Storage Support

It is recommended that you store all data on the external storage provided to the Virtual Machine, you can setup a external disk of the following size.

  • 1024
  • 2048
  • 4096
  • 8192
  • 16384
  • 32767

Architecture of the Deployment

All the resources associated to the Jupyter Deployment are grouped in the same region defined for your Resource group.



To check your new Virtual Machine Expand the left-hand panel by clicking on the “>>” button on the top left corner of your dashboard. Find the Virtual Machines tab and click on it.


To connect with our JupyterHub, you will need to copy the Public IP address of your virtual machine, and trying to access it with a browser.


Note that accessing the JupyterHub will fail until the installation is complete, so if you just created it, be patient.

When the installation is complete, it should give you a JupyterHub login page:


Login using the admin username you typed at the time of creating the virtual machine and the password.

Templates Location


Student/Individual JupyterHub Template

Classroom JupyterHub Template


Post Deployment Steps

To set up our connection via HTTPS, you will need to type some commands into the Linux Shell Script of the virtual machine. Let's go to the resource, and enter on the Run command section.


Now, click on the [RunShellScript] button. You will need to introduce the next commands to configure the HTTPS.

sudo tljh-config set https.enabled true sudo tljh-config set sudo tljh-config add-item <domain.PublicIP> sudo tljh-config reload proxy

Where is your email address and domain.PublicIP is the domain where your hub will be running. Here is an example of how it should look like:


After that, let's press the [Run] button. If we visit our public IP where our Jupyter-Hub is been running, we will see something like that:


Setting up Storage and sharing notebooks

Adding users to the Jupyterhub

Configuring Environments

Install conda, pip or apt packages

[Change default User Interface for users] (

Configure resources available to users

System Maintenance

Additional Resources

Version history
Last update:
‎May 24 2021 03:59 AM
Updated by: