Launch Jupyter Hub in Q Blocks Instance
Last updated
Last updated
Q Blocks instances offer Jupyter Lab access out of the box. It is great for quickly spawning up multiple notebooks, python console and terminal access within your browser. It also offers support for extensions that add superpowers to your notebooks.
However, there is another offering from the Jupyter community called as Jupyter Hub.
Unlike Notebooks or Lab, Jupyter Hub lets you have multiple user access.
If you are looking for extending access within your team to multiple users so they can have their isolated environments for running and managing notebooks then Hub is the best solution for you.
So, let’s get started!
Run this command as qblocks user:
This script will install required dependencies and Jupyter hub software.
See this on where to find Extra Port and Host information.
Run this command as qblocks user:
EXTRA_PORT is the extra port shown under More info section of your instance.
Jupyter hub can be accessed at this URL:
Replace Host and Extra port with the values shown in More info section of your instance. See above mentioned guide to find Extra port and Host information.
Jupyter Hub URL can be shared across your team and each user account in your instance can access Jupyter Hub with their respective credentials.
You may read further if you want to add an SSL certificate to access Jupyter Hub over HTTPS.
Jupyter Hub accepts a python configuration file in which you can specify all the necessary conditions like port mapping and security certificates.
Generate or use an existing SSL certificate.
Store the certificate files in /home/qblocks/
as ssl.key and ssl.crt.
Please Note:
A self signed OpenSSL certificate may not be secure enough and we would recommend you to follow the industry standard practices to access your web services securely.
Create a Jupyter Hub configuration file
Store this config file as /home/qblocks/jupyterhub_config.py
:
Make sure to replace EXTRA_PORT with your instance’s extra port
Launch Jupyter Hub with configuration file:
Visit https://HOST:EXTRA_PORT to access Jupyter Hub over https
See this section on .
If you don’t have an SSL certificate, it can be generated using OpenSSL ().
More info on Jupyter Hub config available .
If you still face issues setting it up then don't hesitate to reach out to us at: