Deploy JupyterHub

Multi-user Jupyter: JupyterLab per user, admin approval, data on a volume

Deploy JupyterHub

/data

Deploy and Host JupyterHub on Railway

JupyterHub is Project Jupyter's multi-user notebook server. People sign in through one web address and each gets their own JupyterLab, home folder and Python kernels, run by the hub on the same server. Teachers, research groups and data teams use it to share one Python environment without installing anything on laptops.

About Hosting JupyterHub

Hosting JupyterHub means running the hub, its HTTP proxy and one JupyterLab process per active user, and keeping accounts and home folders when the server restarts. This template runs all three in one Railway service built from a public GitHub repo on the official jupyterhub/jupyterhub:6.2.0 image (pinned by digest), using JupyterHub's default local process spawner, so no Docker-in-Docker or Kubernetes is needed. A volume at /data holds the hub's SQLite database, cookie secret and every user's home folder. The first deploy creates an admin account with a generated password; other people sign up and wait for your approval. Railway serves it over HTTPS on a public domain.

Common Use Cases

  • A shared JupyterLab for a class or workshop, with one login per student
  • A small team's notebook server for data analysis with NumPy, pandas and Matplotlib
  • A private, always-on Python notebook you can open from any browser

Dependencies for JupyterHub Hosting

  • A Railway volume for the hub database and user home folders (created by the template)
  • About 0.5 GB of RAM for the hub plus one active user; 2 GB or more for a group

Deployment Dependencies

Implementation Details

The template deploys one service, JupyterHub: the hub, configurable-http-proxy on port 8000 and each user's JupyterLab 4.6.6 server, with NumPy, pandas, Matplotlib, git and nano installed. The health check is /hub/health, and the service restarts if the hub stops.

After deploying:

  1. Open the public URL and sign in as admin with JUPYTERHUB_ADMIN_PASSWORD from the service's Variables tab. Your JupyterLab opens in about 10 seconds with a Welcome.ipynb.
  2. Send people https://YOUR-DOMAIN/hub/signup, then approve them at https://YOUR-DOMAIN/hub/authorize. The Admin page lists users and running servers.
  3. Users can install extra packages for themselves with %pip install --user PACKAGE-NAME. They are kept in their home folder on the volume.

Memory: at 0.5 GB (Railway's Free plan) the template runs the hub and one user server at a time, which is enough for small notebooks. It allows three servers at 1 GB and about 26 at 8 GB. A notebook that runs out of memory only restarts its own kernel. Idle kernels and servers stop after an hour (JUPYTERHUB_IDLE_TIMEOUT, in seconds). Railway has no GPU, so this is CPU-only.

Updates: the service builds from aalfath/jupyterhub-railway-template. When a new JupyterHub or JupyterLab version is merged there, Railway shows "update available" on your service. Read the changelog, then apply it. Your volume is kept, and the hub upgrades its own database.

Why Deploy JupyterHub on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying JupyterHub on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

Tracklayer
1