{
  "manifest_version": "1.0.0",
  "template": {
    "id": "04492f61-e49f-49f5-95e8-88ae1beb681c",
    "slug": "jupyter-notebook-and-jupyterlab-cloud-de",
    "name": "Jupyter Notebook & JupyterLab Cloud Deployment (with Spark Support)",
    "description": "[Jun '26] One-click JupyterLab hosting for big data, and ML workflows.",
    "url": "https://railway.com/deploy/jupyter-notebook-and-jupyterlab-cloud-de",
    "upstream": {
      "image": "jupyter/all-spark-notebook"
    }
  },
  "services": [
    {
      "name": "Jupyter",
      "source": {
        "image": "jupyter/all-spark-notebook"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/jovyan/work",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Jupyter",
      "description": "Port Jupyter listens on",
      "secret": false,
      "strategy": "default",
      "default": "8888"
    },
    {
      "key": "RESTARTABLE",
      "service": "Jupyter",
      "description": "Allows Jupyter to auto-restart if it crashes.",
      "secret": false,
      "strategy": "default",
      "default": "yes"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Jupyter",
      "description": "Runs the container as root (0) to allow password setup and package installs.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "JUPYTER_PASSWORD",
      "service": "Jupyter",
      "description": "login password - generated automatically",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "EXTRA_PIP_PACKAGES",
      "service": "Jupyter",
      "description": "Space-separated list of pip packages to auto-install at startup",
      "secret": false,
      "strategy": "default",
      "default": "pandas openai"
    },
    {
      "key": "JUPYTER_ENABLE_LAB",
      "service": "Jupyter",
      "description": "Enables JupyterLab interface instead of the classic notebook.",
      "secret": false,
      "strategy": "default",
      "default": "yes"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "jupyter-notebook-and-jupyterlab-cloud-de"
      }
    },
    "cli": "railway deploy --template jupyter-notebook-and-jupyterlab-cloud-de",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "04492f61-e49f-49f5-95e8-88ae1beb681c",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "40e17b79-ffb8-4cf7-a26d-742866c71961": {
                  "icon": "https://devicons.railway.app/jupyter",
                  "name": "Jupyter",
                  "deploy": {
                    "startCommand": "/bin/sh -c \" \\     if [ -n \\\"${EXTRA_PIP_PACKAGES}\\\" ]; then \\         echo \\\"Installing extra pip packages: ${EXTRA_PIP_PACKAGES}\\\"; \\         pip install --no-cache-dir ${EXTRA_PIP_PACKAGES}; \\     else \\         echo \\\"No extra pip packages to install\\\"; \\     fi && \\     (echo ${JUPYTER_PASSWORD}; echo ${JUPYTER_PASSWORD}) | jupyter server password 2>&1 && \\     chown ${NB_UID} /home/jovyan/.jupyter/jupyter_server_config.json && \\     rm -rf ${RAILWAY_VOLUME_MOUNT_PATH}/lost+found && \\     chown -R ${NB_UID} ${RAILWAY_VOLUME_MOUNT_PATH} && \\     start.sh run-one-constantly jupyter lab 2>&1 \\ \"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "jupyter/all-spark-notebook"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Jupyter listens on",
                      "defaultValue": "8888"
                    },
                    "RESTARTABLE": {
                      "isOptional": false,
                      "description": "Allows Jupyter to auto-restart if it crashes.",
                      "defaultValue": "yes"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Runs the container as root (0) to allow password setup and package installs.",
                      "defaultValue": "0"
                    },
                    "JUPYTER_PASSWORD": {
                      "isOptional": false,
                      "description": "login password - generated automatically",
                      "defaultValue": "{{JUPYTER_PASSWORD}}"
                    },
                    "EXTRA_PIP_PACKAGES": {
                      "isOptional": false,
                      "description": "Space-separated list of pip packages to auto-install at startup",
                      "defaultValue": "pandas openai"
                    },
                    "JUPYTER_ENABLE_LAB": {
                      "isOptional": false,
                      "description": "Enables JupyterLab interface instead of the classic notebook.",
                      "defaultValue": "yes"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8888": {
                        "port": 8888
                      }
                    }
                  },
                  "volumeMounts": {
                    "40e17b79-ffb8-4cf7-a26d-742866c71961": {
                      "mountPath": "/home/jovyan/work"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-18T17:14:24.150Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_ec7400c83d9549f69a7a",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 79,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Jupyter"
  }
}
