---
title: "Deploy JupyterLab"
description: "Persistent JupyterLab with scientific Python and generated token login."
category: "AI/ML"
url: https://railway.com/deploy/jupyterlab-1
---

# Deploy JupyterLab

Persistent JupyterLab with scientific Python and generated token login.

**[Deploy JupyterLab on Railway](https://railway.com/template/jupyterlab-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/jupyterlab-1/manifest.json

- **Creator:** leodev
- **Category:** AI/ML

## Template content

### JupyterLab

- **Source:** https://github.com/leoisadev1/railway-template-jupyterlab
- **Start command:** `/usr/local/bin/railway-start.sh`
- **Health check:** /login
- **Public domain:** Yes

## Documentation

# Deploy and Host JupyterLab on Railway

JupyterLab is a browser-based scientific Python workspace for notebooks, data exploration, and terminal access. This single-user template includes NumPy, pandas, SciPy, matplotlib, and scikit-learn, with persistent storage and a generated login token.

## About Hosting JupyterLab

The template builds the public [wrapper repository](https://github.com/leoisadev1/railway-template-jupyterlab) over the official Jupyter scipy-notebook image, pinned by version and digest. Railway provides HTTPS and a volume mounted at `/home/jovyan`. The upstream startup helper repairs volume ownership, then runs Jupyter as jovyan, UID 1000. Runtime files use `/tmp/jupyter-runtime` with normal permission checks.

After the `/login` healthcheck passes, copy the generated `JUPYTER_TOKEN` from Railway's Variables panel, open the service domain, and paste the token into the login form. Create a Python notebook from the Launcher. The healthcheck verifies the web server, not notebook kernel execution.

## Why Deploy JupyterLab on Railway?

Railway connects the GitHub source, builds the container, supplies HTTPS, generates the login credential, and mounts persistent workspace storage. Notebooks and files under `/home/jovyan` survive redeployment. This template was tested with a real browser login, notebook execution, saved-file readback, and persistence across a corrected-source redeployment.

Keep the token private: anyone with it can execute code and access workspace files and environment variables. This is not a multi-tenant notebook service. Rotate the token in Variables and redeploy when needed. Empty or whitespace-only tokens fail startup. Login-form password changes are disabled so a saved password cannot bypass token rotation. Leave `RAILWAY_RUN_UID` unset; no passwordless sudo is granted.

## Common Use Cases

- Explore datasets with pandas and NumPy.
- Develop and save Python notebooks for scientific analysis.
- Prototype scikit-learn models using CPU resources.
- Use the browser terminal to manage a personal research workspace.

## Dependencies for JupyterLab

- A Railway account with resources for a large scientific Python image; budget at least 1 GB memory and increase it for your workload.
- The public GitHub wrapper source and official `quay.io/jupyter/scipy-notebook:2026-09-07` image pinned to `sha256:ec7343ba248a7473c42322e86e7157bef9ebc9253c40a88e573b3fcf607a9a8a`.
- A Railway volume at `/home/jovyan` and required `JUPYTER_TOKEN`, defaulting to `${{secret()}}`.

The listener uses Railway's `PORT`, falling back to 8888 only when it is absent. Railway terminates HTTPS; forwarded headers are trusted and cross-origin access is disabled by default. `/tmp/jupyter-runtime` and `/opt/conda` are not persistent. Use `pip install --user` for packages under `/home/jovyan/.local`, then restart the kernel. For reproducible image-level changes, fork the repository and edit its Dockerfile.

### Deployment Dependencies

No external database, model-provider credential, or paid application license is required. Jupyter Docker Stacks and JupyterLab use BSD licenses; included packages retain their upstream licenses. A volume is not a backup: export important notebooks and back up data separately. Deleting the volume deletes the workspace. The `lost+found` directory on a new volume is normal.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/jupyterlab-1
