Deploy JupyterLab
Persistent JupyterLab with scientific Python and generated token login.
JupyterLab
Just deployed
/home/jovyan
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 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-07image pinned tosha256:ec7343ba248a7473c42322e86e7157bef9ebc9253c40a88e573b3fcf607a9a8a. - A Railway volume at
/home/jovyanand requiredJUPYTER_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.
Template Content
JupyterLab
leoisadev1/railway-template-jupyterlab