Logo
 

Use Jupyter Notebook on any server

This guide explains how to run a Jupyter Notebook on a department server and access it from your browser. The steps differ depending on whether the server has a public IP address or not.

Servers without public IP addresses (Turing, Kepler, Ada, Ampere, Neumann)

These servers require SSH tunneling through a public-facing server. Turing is used as an example here — replace it with the server you are using.

  1. SSH into Tesla (a public-facing server).
  2. From Tesla, SSH into Turing.
  3. Create a conda environment on Turing and activate it.
    Read instructions
  4. Install Jupyter: conda install jupyter
  5. Start the notebook: jupyter notebook --no-browser --port=8889 --ip=0.0.0.0
  6. You will see a token in the output. Copy it.
  7. On your local machine, open WSL (Windows) or Terminal (Linux/Mac) and set up an SSH tunnel:
    ssh -N -f -L localhost:8888:turing.ce.pdn.ac.lk:8889 YOUR_USERNAME@tesla.ce.pdn.ac.lk
  8. Open your browser and go to http://localhost:8888 . Paste the token when prompted.

Servers with public IP addresses (Tesla, Aiken)

These servers can be accessed directly. Tesla is used as an example here.

  1. SSH into Tesla.
  2. Create a conda environment and activate it.
    Read instructions
  3. Install Jupyter: conda install jupyter
  4. Start the notebook: jupyter notebook --no-browser --port=8080 --ip=0.0.0.0
  5. You will see a URL like http://SOMETHING:8080/tree?token=abc123def456
  6. Open your browser and go to http://tesla.ce.pdn.ac.lk:8080/tree?token=abc123def456 (replace the token with yours).
NOTE: If you are accessing Tesla from outside the university network, you will need to set up a SSH tunnel to Tesla to get access to a local port.
Edit this page on GitHub