JupyterLab on Ubuntu 24.04 – A Modern IDE for Data Science, AI, and Interactive Computing

JupyterLab is the next-generation web-based interface for Project Jupyter, offering an extensible, modular IDE-like experience tailored for interactive data science and scientific computing. When deployed on Ubuntu 24.04, it benefits from a stable, modern Linux platform that is widely adopted across academia, enterprise, and cloud environments.


What Is JupyterLab?

JupyterLab is an open-source web application that provides:

  • Code notebooks with support for over 100 programming languages
  • Interactive terminals, code consoles, and rich text editors
  • Visual data tools (e.g., plots, dashboards, widgets)
  • Real-time collaboration (optional extensions or JupyterHub integration)
  • File browser and drag-and-drop support for building workflows

Unlike the classic Jupyter Notebook interface, JupyterLab offers tabbed documents, split views, workspace persistence, and powerful plugin support.


Why Ubuntu 24.04 for JupyterLab?

Ubuntu 24.04 LTS (“Noble Numbat”) is well-suited for JupyterLab deployments due to:

  • Long-Term Support (until 2029)
  • Linux Kernel 6.8+ with hardware and containerization improvements
  • Latest Python 3.12 available via system packages or pyenv
  • Strong ecosystem support for scientific libraries (NumPy, SciPy, TensorFlow, PyTorch)
  • Compatibility with Docker, Singularity, and systemd-based environments

Ubuntu is also the default base image for many cloud services and containerized environments, making it ideal for deploying JupyterLab in production, development, or hybrid cloud scenarios.


JupyterLab Architecture

ComponentFunctionality
Notebook ServerPython-based web server managing kernels and user sessions
KernelsLanguage-specific execution engines (e.g., IPython, R, Julia, Scala)
Frontend (UI)Web-based React/PhosphorJS application served via Tornado HTTP server
ExtensionsPlugins for themes, file viewers, Git integration, LSP, dashboards

The notebook server communicates with kernels via ZeroMQ and exposes a RESTful API for external tooling and collaboration.


Key Features on Ubuntu 24.04

  • Multi-language support: Python, R, Julia, C++, Bash, JavaScript, and more
  • Rich text/Markdown editing: Including LaTeX, equations, and HTML rendering
  • Interactive visualization: Integrations with Matplotlib, Plotly, Bokeh, Vega
  • Parallel computing: Use with Dask, Spark, Ray, or joblib for distributed tasks
  • Version control: Git integration via extensions (e.g., jupyterlab-git)
  • Environment management: Seamless use with venv, conda, or Docker
  • Notebook conversion: Export to PDF, HTML, Markdown, or LaTeX via nbconvert

Ubuntu 24.04 provides access to the latest compilers, GPU drivers (NVIDIA), and system packages, which are essential for data workflows that require acceleration or heavy computation.


Use Cases

JupyterLab on Ubuntu 24.04 is ideal for:

  • Data science and analytics pipelines
  • Machine learning prototyping and model training
  • Bioinformatics and scientific research
  • Education and training environments
  • Real-time data visualization in dashboards or reports
  • Collaborative computing in research labs or industry teams

It also integrates well with JupyterHub for multi-user deployments, making it suitable for shared computing resources like research clusters or university servers.


Advanced Integration Possibilities

Tool / PlatformIntegration Mode
Docker & KubernetesRun isolated JupyterLab containers with GPU or CPU profiles
VS Code / GitHub CodespacesUse .ipynb inside remote or cloud-based IDEs
JupyterHubMulti-user deployment with authentication and resource quotas
Apache Spark / HadoopRun distributed data processing inside notebooks
TensorBoardVisualize deep learning models directly in notebooks
DVC / MLflowTrack experiments and model metrics from within JupyterLab

With extensions and system packages, JupyterLab can become a full-featured development environment for data workflows on Ubuntu 24.04.


Performance and Security

Ubuntu 24.04 offers several features that enhance JupyterLab performance and security:

AreaBenefit on Ubuntu 24.04
Systemd integrationManage JupyterLab as a background service
TLS supportEasily set up HTTPS with Let’s Encrypt and NGINX
Kernel isolationCombine with conda or virtualenv for project-based kernels
AppArmor profilesLimit resource access from kernel subprocesses
UFW / Fail2BanProtect remote-access servers against brute-force attacks
Jupyter tokens / OAuthSecure access to the UI and REST API

JupyterLab can also be deployed inside hardened containers with custom access rules, especially in production or public-facing deployments.


Step 1: Create a VPS Instance on Shape.Host

To begin, you’ll need a cloud server running Ubuntu 24.04. Shape.Host makes this process fast and user-friendly.

Instructions to create your server:

Go to https://shape.host and log into your account.

Click on “Create” from the left-hand menu.

Choose “Instance”.

Shape.host Resources dashboard with Create > Instance highlighted.

Select a server location closest to your users (e.g., Germany, Netherlands, USA).

Shape.host instance form with the data center location selector highlighted.

Pick Ubuntu 24.04 (64-bit) as the operating system.

Select a hosting plan with at least 2 CPUs, 4 GB RAM, and 20 GB SSD.

Shape.host instance form with the operating system image selector highlighted.

Click “Create Instance” and wait a few seconds for deployment.

Shape.host instance form with the Create Instance button highlighted.

Note down the public IP address of your instance from the “Resources” tab.

Shape.host Resources dashboard with the server IP address highlighted.

Step 2: Connect to Your Instance via SSH

From Linux/macOS:

ssh root@your_server_ip

This command initiates a secure SSH session into your cloud server using the root account.

From Windows (via PuTTY):

  1. Download and install PuTTY from putty.org.
  2. Open PuTTY and enter your instance’s IP address.
  3. Click “Open” and accept the SSH key if prompted.

Step 3: Install Required Packages

Update the package list:

apt update

Refreshes the list of available packages and their versions.

Terminal showing APT package management commands and output.

Install Python, pip, and virtual environment tools:

apt install python3-pip python3-venv

This installs Python’s package manager pip and venv which is used to create isolated Python environments.

Terminal showing APT package management commands and output.

Step 4: Create and Activate JupyterLab Environment

Create a project directory:

mkdir /opt/jupyterlab

Creates a folder to store JupyterLab and its virtual environment.

Navigate to the project directory:

cd /opt/jupyterlab

Create a Python virtual environment:

python3 -m venv venv

Initializes a virtual environment named venv inside the folder.

Activate the virtual environment:

source venv/bin/activate

Activates the virtual environment so that all Python packages install inside it.

Terminal showing Django or Python virtual environment commands.

Step 5: Install JupyterLab

Upgrade pip inside the virtual environment:

pip install --upgrade pip

Ensures you’re using the latest version of pip.

Terminal showing Python environment or package installation output.

Install JupyterLab:

pip install jupyterlab

Downloads and installs the latest version of JupyterLab.

Terminal showing Python environment or package installation output.

Step 6: Generate Configuration and Set Password

Run JupyterLab once to confirm:

jupyter lab

You should see output indicating that Jupyter is running (press Ctrl+C to stop it).

Terminal showing sh commands or output during Run JupyterLab once to confirm:.

Generate the configuration file:

jupyter lab --generate-config

Creates ~/.jupyter/jupyter_lab_config.py.

Terminal showing JupyterLab configuration file generation.

Edit the configuration:

nano ~/.jupyter/jupyter_lab_config.py

Add these lines (or uncomment and modify if already present):

c.ServerApp.ip = '0.0.0.0'
c.ServerApp.open_browser = False
c.ServerApp.port = 8888

These settings allow access from any IP address, disable the browser auto-launch, and set port 8888.

Set a password:

jupyter server password

This secures your JupyterLab instance with a password. You’ll be prompted to enter it twice.

Terminal showing nano commands or output during Set a password:.

Step 7: Create a Systemd Service

Create a systemd service file:

nano /etc/systemd/system/jupyterlab.service

Paste the following configuration:

[Unit]
Description=JupyterLab
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/jupyterlab
ExecStart=/opt/jupyterlab/venv/bin/jupyter lab --allow-root --ip=0.0.0.0 --port=8888 --no-browser
Restart=always

[Install]
WantedBy=multi-user.target
Terminal showing a systemd service unit configuration.

Reload systemd to apply changes:

systemctl daemon-reexec
systemctl daemon-reload

Enable JupyterLab to start on boot:

systemctl enable jupyterlab

Start the JupyterLab service:

systemctl restart jupyterlab
Terminal showing systemd service management commands or output.

Step 8: Open Firewall Ports

Allow SSH (for remote access):

ufw allow ssh

Allow JupyterLab’s default port:

ufw allow 8888

Enable the firewall:

ufw enable
Terminal showing firewall configuration commands and rules.

Step 9: Access JupyterLab

Open your browser and go to:

http://your_server_ip:8888

Log in using the password you set earlier.

JupyterLab login page.
JupyterLab launcher showing notebook and console options.

Congratulations! You’ve successfully set up JupyterLab on Ubuntu 24.04, running under a virtual environment and managed by systemd. With firewall rules in place and password authentication configured, your setup is secure and production-ready.

Looking for reliable cloud hosting? Try Shape.Host for scalable and performant Cloud VPS to power your development, data science, or production projects.