The Founder’s Guide:

How to Install the Jupyter Notebook Server on Linux

The condensed tutorial with copy and paste code and screenshots

“The expanded version of this article uses concise explanations to help you learn what’s happening 💡”

Open Terminal:

  1. Click “Activities” in the top-left corner
  2. Enter “Terminal” into the search bar
  3. Click “Terminal”

Install Jupyter Notebook:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
python -m pip install jupyter

Install the WebSocket Extension:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
python -m pip install jupyter_http_over_ws

Restart Bash:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
exec $SHELL

Create the Configuration File:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
jupyter notebook --generate-config

Open the Jupyter Directory:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
cd $HOME/.jupyter

Create the SSL Certificate:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
  4. Enter “US” into “Country Name”
  5. Press “Enter”
  6. Enter “.” into the remaining fields
  7. Press “Enter”
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem

Create the JSON File:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
echo "" > $HOME/.jupyter/jupyter_notebook_config.json

Open the JSON File:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
gedit $HOME/.jupyter/jupyter_notebook_config.json

Edit the JSON File:

  1. Copy the JSON from below these instructions
  2. Paste the JSON into Text Editor
  3. Change “User” to the Unix username
  4. Click the “File” menu
  5. Click “Save”

Create the Password:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
jupyter notebook password

Install Net Tools:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
sudo apt-get install net-tools

Get the IPv4 Address Netmask:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
  4. Write down the “IPv4 Address” and “Netmask”
ifconfig

Log into the Router:

  1. Open the web browser
  2. Copy the router IP address from below these instructions
  3. Paste the router IP address into the web browser
  4. Press “Enter”
  5. Log into the router
192.168.0.1

Set up Port Forwarding:

  1. Find the “Port Forwarding” page
  2. Paste the IPv4 address into the “Enter IP Address” text field
  3. Copy the port from below these instructions
  4. Paste the port into the “WAN Starting Port” text field
  5. Paste the port into the “WAN Ending Port” text field
  6. Select “All IP Addresses”
  7. Click “Apply”
8889

Get the Default Route and DNS:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
  4. Click “Wifi” or “Network”
  5. Click “⚙”
  6. Write down the “Default Route” and “DNS
gnome-control-center

Set the Static IP Address:

  1. Click the “IPv4” tab
  2. Select “Manual”
  3. Enter the “IPv4 Address,” “Netmask,” “Gateway,” and DNS” from earlier
  4. Click “Apply”

Open Crontab:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
crontab -e

Edit the Crontab File:

  1. Navigate to the bottom of the file using the “↓” key
  2. Copy the code from below these instructions
  3. Press “Shift” + “Control” + “V” to paste the code into Terminal
  4. Press “Control” + “S” to save the changes
  5. Press “Control” + “X” to exit Crontab
  6. Restart the computer
@reboot cd; source /.bashrc; /home/user/.pyenv/shims/jupyter-notebook >> ~/cronrun.log 2>&1

Access the Server From the Local Network:

  1. Log into a different computer or laptop
  2. Connect to the same WiFi network
  3. Enter the IPv4 Address into the web browser
  4. Prepend “https://” to the IP address
  5. Append “8889” to the IP address
  6. Press “Enter”
  7. Type “thisisunsafe”
  8. Enter the password
  9. Click “Log In”

Get the Public IP Address:

  1. Copy the URL from below these instructions
  2. Paste the URL into the web browser
  3. Write down the public IP address
https://www.google.com/search?q=whatsmyip

Access the Server From a Remote Network:

  1. Log into a different computer or laptop
  2. Connect to a different WiFi network
  3. Enter the public IP address into the web browser
  4. Prepend “https://” to the IP address
  5. Append “8889” to the IP address
  6. Press “Enter”
  7. Type “thisisunsafe”
  8. Enter the password
  9. Click “Log In”

“Hopefully, this article helped you get the 👯‍♀️🏆👯‍♀️ remember to subscribe to get more content 🏅”

Next Steps:

This article is part of a mini-series that helps readers set up everything they need to start learning about artificial intelligence, machine learning, deep learning, and or data science. It includes articles that contain instructions with copy and paste code and screenshots to help readers get the outcome as soon as possible. It also includes articles that contain instructions with explanations and screenshots to help readers learn about what’s happening.

Linux:
01. Install and Manage Multiple Python Versions
02. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
03. Install the Jupyter Notebook Server
04. Install Virtual Environments in Jupyter Notebook
05. Install the Python Environment for AI and Machine Learning
WSL2:
01. Install Windows Subsystem for Linux 2
02. Install and Manage Multiple Python Versions
03. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
04. Install the Jupyter Notebook Server
05. Install Virtual Environments in Jupyter Notebook
06. Install the Python Environment for AI and Machine Learning
07. Install Ubuntu Desktop With a Graphical User Interface (Bonus)
Windows 10:
01. Install and Manage Multiple Python Versions
02. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
03. Install the Jupyter Notebook Server
04. Install Virtual Environments in Jupyter Notebook
05. Install the Python Environment for AI and Machine Learning
Mac:
01. Install and Manage Multiple Python Versions
02. Install the Jupyter Notebook Server
03. Install Virtual Environments in Jupyter Notebook
04. Install the Python Environment for AI and Machine Learning

From: Non-Technical | To: Technical | Writes: To Make It Easier For Everyone | Topics: #Setup #Basics #AI #MachineLearning #DeepLearning #Repositories

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store