How to Install: JupyterHub 0.9.1 and Optimus on Ubuntu 18.04 LTS

Jesus Arrioja
Optimus
Published in
3 min readJul 27, 2018

What is JupyterHUB?

JupyterHub is a multi-user server, manages and proxies multiple instances of the single-user Jupyter notebook server.

JupyterHub can be used in different cases. for example, courses in data science or research teams.

There were two options for using the notebook in both cases. The first method would be to require users to install the notebook themselves on their own computers. To run it, they would have to first start the Jupyter notebook server from the command line, which would then give them access to the notebook files through the browser. The second (and more easy way for the users) method would be to launch a server running JupyterHub, which requires no installation on the part of the user — they simply go to a website, log in, and immediately have access to the Jupyter notebook.

If you wanna know more about JupyterHub you can get more info here.

Create a New Ubuntu Server on Digitalocean

I recommend a create a droplet with at least 2GB of RAM and 2 vCPUs.

Connect to your server

You will need aN SSH Client to connect to your server. You can use putty or bitvise Tunnelier on Windows, or use Terminal in Linux and MacOS

Write or copy and paste this commands lines in your console. Copy and execute one line at time.

Installing Anaconda 3

Update the packages lists and install all the necessary packages for Jupyterhub

Installing JupyterHub

Configuration Basics

On startup, you will need to generate a default configuration file, jupyterhub_config.py, for that use.

This default jupyterhub_config.py file contains comments and guidance for all configuration variables and their default values. I recommend storing configuration files in the standard UNIX filesystem location, i.e. /etc/jupyterhub.

The file with the basic configuration should look like this.

Create users

Adding users via the admin interface is mainly useful if you have an external authentication system, such as LDAP or OAuth. If it’s a local system user and you are using PAM authenticator, then the user will have no password set until you call passwd.

The best way to add users if you are using normal system users is to use normal system user commands, such as adduser. If this is for a class, external authentication mechanisms such as OAuth have the benefit of not having to distribute usernames and passwords.

To run Jupyterhub with the basic configuration set above, use:

Scripts for Unattended Install

JupyterHUB basic configuration.

JupyterHUB basic configuration + run as a service.

to stop the service use systemctl stop jupyterhub

--

--