{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4aee1b03-0cc3-4342-b3d7-56aa671c8620",
    "slug": "jupyter",
    "name": "JupyterLab",
    "description": "JupyterLab notebooks, terminal and file browser in one hosted workspace",
    "url": "https://railway.com/deploy/jupyter",
    "upstream": {
      "image": "quay.io/jupyter/scipy-notebook:latest"
    }
  },
  "services": [
    {
      "name": "jupyterlab",
      "source": {
        "image": "quay.io/jupyter/scipy-notebook:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "jupyterlab",
      "description": "Port the server binds and Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "8888"
    },
    {
      "key": "CHOWN_EXTRA",
      "service": "jupyterlab",
      "description": "Volume path the image takes ownership of",
      "secret": false,
      "strategy": "default",
      "default": "/data"
    },
    {
      "key": "JUPYTER_TOKEN",
      "service": "jupyterlab",
      "description": "Login token for the JupyterLab UI",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "NOTEBOOK_ARGS",
      "service": "jupyterlab",
      "description": "File-browser root, proxy awareness, idle-kernel culling",
      "secret": false,
      "strategy": "default",
      "default": "--ServerApp.root_dir=/data/notebooks --ServerApp.trust_xheaders=True --ServerApp.allow_remote_access=True --MappingKernelManager.cull_idle_timeout=3600 --MappingKernelManager.cull_interval=300 --MappingKernelManager.cull_busy=False --MappingKernelManager.cull_connected=False"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "jupyterlab",
      "description": "Start as root so the image can chown the volume",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "CHOWN_EXTRA_OPTS",
      "service": "jupyterlab",
      "description": "Chown the volume recursively",
      "secret": false,
      "strategy": "default",
      "default": "-R"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "jupyter"
      }
    },
    "cli": "railway deploy --template jupyter",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4aee1b03-0cc3-4342-b3d7-56aa671c8620",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "76837a74-e054-412b-ab1c-aa170b426c39": {
                  "icon": "https://cdn.simpleicons.org/jupyter/F37626.svg",
                  "name": "jupyterlab",
                  "deploy": {
                    "startCommand": "/usr/bin/tini -s -g -- /usr/local/bin/start.sh /bin/bash -c 'export HOME=/data/home; mkdir -p $HOME /data/notebooks; if [ ! -e $HOME/.bashrc ]; then cp -a /home/jovyan/. $HOME/; fi; export PATH=$HOME/.local/bin:$PATH; q=max; p=1; read -r q p < /sys/fs/cgroup/cpu.max 2>/dev/null; case $q in max) C=2;; *) C=$((q/p));; esac; if [ $C -lt 1 ]; then C=1; fi; export OMP_NUM_THREADS=$C MKL_NUM_THREADS=$C OPENBLAS_NUM_THREADS=$C NUMEXPR_NUM_THREADS=$C; echo [railway] HOME=$HOME cpu_threads=$C; exec /usr/local/bin/start-notebook.py'",
                    "healthcheckPath": "/api",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "quay.io/jupyter/scipy-notebook:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the server binds and Railway health-checks",
                      "defaultValue": "8888"
                    },
                    "CHOWN_EXTRA": {
                      "isOptional": false,
                      "description": "Volume path the image takes ownership of",
                      "defaultValue": "/data"
                    },
                    "JUPYTER_TOKEN": {
                      "isOptional": false,
                      "description": "Login token for the JupyterLab UI",
                      "defaultValue": "{{JUPYTER_TOKEN}}"
                    },
                    "NOTEBOOK_ARGS": {
                      "isOptional": false,
                      "description": "File-browser root, proxy awareness, idle-kernel culling",
                      "defaultValue": "--ServerApp.root_dir=/data/notebooks --ServerApp.trust_xheaders=True --ServerApp.allow_remote_access=True --MappingKernelManager.cull_idle_timeout=3600 --MappingKernelManager.cull_interval=300 --MappingKernelManager.cull_busy=False --MappingKernelManager.cull_connected=False"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Start as root so the image can chown the volume",
                      "defaultValue": "0"
                    },
                    "CHOWN_EXTRA_OPTS": {
                      "isOptional": false,
                      "description": "Chown the volume recursively",
                      "defaultValue": "-R"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8888": {
                        "port": 8888
                      }
                    }
                  },
                  "volumeMounts": {
                    "76837a74-e054-412b-ab1c-aa170b426c39": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "jupyterlab",
      "method": "GET",
      "path": "/api",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-06T04:14:42.626Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-05T08:11:17.149Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_8f9a2755d47c474e8e6e",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 66,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "jupyterlab"
  }
}
