Jupyter on Jetstream2¶
You can run Jupyter on Jetstream2 in two ways:
- Web Desktop (graphical desktop in the browser). Fastest way to get started if you want a full desktop UI. Requires enabling the Web Desktop when you create the instance.
- Remote (web shell or SSH). Run Jupyter directly in a terminal and connect from your local browser. This method DOES NOT require enabling the Web Desktop.
Choose the Web Desktop if you need a graphical environment (file manager, other GUI tools). Choose the Remote method if you prefer a lighter setup, are comfortable in a terminal, or forgot to enable the Web Desktop at launch.
Quick Comparison¶
Feature | Web Desktop | Remote (web shell / SSH) |
---|---|---|
Needs Web Desktop enabled at launch | Yes | No |
Uses instance internal browser | Yes | No (uses your local browser) |
Extra firewall steps (Rocky9) | No (local desktop session) | Yes (open port 8888) |
Good for GUI tools beyond Jupyter | Yes | Limited to terminal |
Lower resource overhead | Medium | Slightly lower |
Method 1: Web Desktop (browser-based graphical environment)¶
Prerequisites: * Launch your instance via Exosphere * Ensure you selected the Web Desktop option during creation (see the create instance guide).
Use this when you: * Want the quickest path to a ready-to-use Jupyter desktop environment. * Need other graphical tools (file manager, editors, browsers) alongside Jupyter. * Already enabled the Web Desktop during instance creation and prefer an all-in-browser workflow.
Steps: 1. Open the instance in Exosphere. 2. Start a Web Desktop session. 3. Open a terminal inside the Web Desktop. 4. Load the appropriate module and start Jupyter:
module load miniforge
jupyter lab
module load anaconda
jupyter notebook
module load anaconda
jupyter notebook
You should see a browser window (inside the Web Desktop) open automatically. If it does not, copy the tokenized URL printed in the terminal and paste it into the Web Desktop browser.
Method 2: Remote (web shell or SSH) — no Web Desktop needed¶
Prerequisites:
* Instance is running and reachable via SSH or the Exosphere web shell.
* Ability to copy URLs from the terminal into your local browser.
* Rocky9 only: sudo
access to update the firewall the first time you open the port.
Use this when you: * Did not enable (or do not want) the Web Desktop. * Prefer to connect from your own local browser directly. * Are working over a plain SSH session or the Exosphere web shell.
How it works:
We provide a helper script jupyter-ip.sh
that discovers the VM’s public IP and injects it into the Jupyter URL. A VM does not inherently know its public IP, so this script saves you from manually editing the URL.
Steps:
1. Open an Exosphere web shell OR SSH into the instance from your local machine.
2. Load the module for your OS image.
3. Run jupyter-ip.sh
(it launches Jupyter and prints a URL with a security token).
4. Copy the final line containing the public IP (e.g., http://149.165.xxx.xxx:8888/?token=...
) into your local machine’s browser.
module load miniforge
jupyter-ip.sh
module load anaconda
jupyter-ip.sh
module load anaconda
jupyter-ip.sh
# Open the port in the firewall (one-time setup)
sudo firewall-cmd --add-port=8888/tcp --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-ports | grep 8888
Expected tail of the output (example):
To access the notebook, open this file in a browser:
file:///home/exouser/.local/share/jupyter/runtime/nbserver-100997-open.html
Or copy and paste one of these URLs:
http://neatly-trusting-chow-gui:8888/?token=723fa5a01f6dc27b0ec655846572513757e921aaf247cbb7
or http://149.165.154.8:8888/?token=723fa5a01f6dc27b0ec655846572513757e921aaf247cbb7
Use the last line (the one with the numeric public IP) in your local browser.
Notes & Tips¶
- Security: The token in the URL acts as an access key. Anyone with that full URL can access the session until you stop Jupyter.
- Stopping Jupyter: Press
Ctrl+C
twice in the terminal running it. - Different port: If 8888 is in use, Jupyter will auto-increment (8889, 8890, …). The script will still show the correct URL.
- JupyterLab vs Notebook: You can usually substitute
jupyter lab
for a richer interface if the module provides it (e.g., aftermodule load miniforge
). The helper script focuses on simplifying the URL, not forcing a UI.
If you started with the Web Desktop but later prefer the remote approach, simply close the Web Desktop session and follow Method 2 in a terminal.