Table of Contents
- Update the system and install PIP
- Install Jupyter Notebook
- Configure Jupyter
- Modify firewall
If you are using a different system, please check our other tutorials.
Jupyter Notebook, derived from IPython, is a widely used, interactive data science web application which can be used to create and share scientific computing-related documents.
This article will show you how to install Jupyter Notebook on An ITWeb.Services Ubuntu 16.04 server instance for remote access using
Before getting started, you need to:
- Deploy a fresh IT Web Services Ubuntu 16.04 server instance.
https://www.itweb.services/tutorials/linux-guides/how-to-use-sudo-on-debian-centos-and-freebsd”>non-root sudo user, and let’s say the username is “
juser“. You should follow the Debian instructions but execute
/etc/init.d/ssh restart instead of
Update the system and install PIP
Use the following commands to update the system:
sudo apt-get update -y sudo apt-get install python3-pip -y pip3 install --upgrade pip
Install Jupyter Notebook
Install Jupyter Notebook.
sudo apt-get install python3-setuptools -y sudo pip3 install jupyter
Before configuring Jupyter Notebook, we’ll need to make a config file, to do so, let’s move to our home directory and make a new one.
cd ~ jupyter notebook --generate-config
Next, let’s create a hashed password for our server, execute the following command and follow the instructions.
jupyter notebook password
For the sake of this tutorial, let’s say the password is “
jupyter“. This will create the hash and save it in your
jupyter_notebook_config.json which will be located at
Now, since we want at least some security let’s make an SSL certificate under the
cd .jupyter mkdir cert cd cert openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout jkey.key -out jcert.pem
Now let’s edit the
jupter_notebook_config.py. Open it with your favorite text editor and find the following lines, uncomment them, and change them as shown below.
#c.NotebookApp.password = '' #c.NotebookApp.port = 8888 #c.NotebookApp.ip = 'localhost' #c.NotebookApp.open_browser = False #c.NotebookApp.certfile = '' #c.NotebookApp.keyfile = ''
c.NotebookApp.password = 'sha1:<your sha hashed password>' c.NotebookApp.port = 8888 c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.certfile = '/home/juser/.jupyter/cert/jcert.pem' c.NotebookApp.keyfile = '/home/juser/.jupyter/cert/jkey.key'
Note: Remember your hashed password was saved under
Modify the firewall rules.
sudo apt-get install firewalld -y sudo firewall-cmd --zone=public --add-port=8888/tcp --permanent sudo systemctl restart firewalld.service
Run Jupyter Notebook with the command
jupyter notebook, and visit
https://<your server ip>:8888, ignore the security warning and use the password set earlier.
Remember you can run it with
nohup if you want to log out and keep it running.
nohup jupyter notebook &
Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!