{
  "manifest_version": "1.0.0",
  "template": {
    "id": "94c584f3-e30b-43de-9e4c-e1585e3bdf5d",
    "slug": "jupyterhub",
    "name": "JupyterHub",
    "description": "Multi-user Jupyter notebook server with per-user workspaces",
    "url": "https://railway.com/deploy/jupyterhub",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/jupyterhub-railway"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "jupyterhub",
      "source": {
        "repo": "https://github.com/gridalpha/jupyterhub-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/home",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "jupyterhub",
      "description": "Port the proxy binds and Railway probes",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "DATABASE_URL",
      "service": "jupyterhub",
      "description": "Hub database connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "JPY_COOKIE_SECRET",
      "service": "jupyterhub",
      "description": "Session cookie signing key, 32 bytes hex",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "JUPYTERHUB_HOME_ROOT",
      "service": "jupyterhub",
      "description": "Volume mount holding home directories",
      "secret": false,
      "strategy": "default",
      "default": "/home"
    },
    {
      "key": "JUPYTERHUB_ADMIN_USER",
      "service": "jupyterhub",
      "description": "First admin's username",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "JUPYTERHUB_CULL_EVERY",
      "service": "jupyterhub",
      "description": "Seconds between idle-culler runs",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "CONFIGPROXY_AUTH_TOKEN",
      "service": "jupyterhub",
      "description": "Hub-to-proxy shared secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "JUPYTERHUB_DEFAULT_URL",
      "service": "jupyterhub",
      "description": "Landing app; /tree for classic",
      "secret": false,
      "strategy": "default",
      "default": "/lab"
    },
    {
      "key": "JUPYTERHUB_IDLE_TIMEOUT",
      "service": "jupyterhub",
      "description": "Seconds idle before a server stops",
      "secret": false,
      "strategy": "default",
      "default": "3600"
    },
    {
      "key": "NATIVE_AUTH_OPEN_SIGNUP",
      "service": "jupyterhub",
      "description": "Require admin approval for signups",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "JUPYTERHUB_ADMIN_PASSWORD",
      "service": "jupyterhub",
      "description": "First admin's password, min 8 characters",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "NATIVE_AUTH_ENABLE_SIGNUP",
      "service": "jupyterhub",
      "description": "Serve the self-registration page",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "NATIVE_AUTH_MIN_PASSWORD_LENGTH",
      "service": "jupyterhub",
      "description": "Minimum account password length",
      "secret": true,
      "strategy": "default",
      "default": "8"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "jupyterhub",
      "description": "Health-check window on a cold first boot",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "jupyterhub",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "jupyterhub"
      }
    },
    "cli": "railway deploy --template jupyterhub",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "94c584f3-e30b-43de-9e4c-e1585e3bdf5d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "4402ef25-0e49-4baf-95e5-a754b29177c6": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, read by the server",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "4402ef25-0e49-4baf-95e5-a754b29177c6": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "81278782-5dd6-4b84-8771-037b6317857a": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/jupyter.svg",
                  "name": "jupyterhub",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/hub/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/jupyterhub-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the proxy binds and Railway probes",
                      "defaultValue": "8000"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Hub database connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "JPY_COOKIE_SECRET": {
                      "isOptional": false,
                      "description": "Session cookie signing key, 32 bytes hex",
                      "defaultValue": "{{JPY_COOKIE_SECRET}}"
                    },
                    "JUPYTERHUB_HOME_ROOT": {
                      "isOptional": true,
                      "description": "Volume mount holding home directories",
                      "defaultValue": "/home"
                    },
                    "JUPYTERHUB_ADMIN_USER": {
                      "isOptional": true,
                      "description": "First admin's username",
                      "defaultValue": "admin"
                    },
                    "JUPYTERHUB_CULL_EVERY": {
                      "isOptional": true,
                      "description": "Seconds between idle-culler runs",
                      "defaultValue": "600"
                    },
                    "CONFIGPROXY_AUTH_TOKEN": {
                      "isOptional": false,
                      "description": "Hub-to-proxy shared secret",
                      "defaultValue": "{{CONFIGPROXY_AUTH_TOKEN}}"
                    },
                    "JUPYTERHUB_DEFAULT_URL": {
                      "isOptional": true,
                      "description": "Landing app; /tree for classic",
                      "defaultValue": "/lab"
                    },
                    "JUPYTERHUB_IDLE_TIMEOUT": {
                      "isOptional": true,
                      "description": "Seconds idle before a server stops",
                      "defaultValue": "3600"
                    },
                    "NATIVE_AUTH_OPEN_SIGNUP": {
                      "isOptional": true,
                      "description": "Require admin approval for signups",
                      "defaultValue": "false"
                    },
                    "JUPYTERHUB_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First admin's password, min 8 characters",
                      "defaultValue": "{{JUPYTERHUB_ADMIN_PASSWORD}}"
                    },
                    "NATIVE_AUTH_ENABLE_SIGNUP": {
                      "isOptional": true,
                      "description": "Serve the self-registration page",
                      "defaultValue": "true"
                    },
                    "NATIVE_AUTH_MIN_PASSWORD_LENGTH": {
                      "isOptional": true,
                      "description": "Minimum account password length",
                      "defaultValue": "8"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": true,
                      "description": "Health-check window on a cold first boot",
                      "defaultValue": "600"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8000": {
                        "port": 8000
                      }
                    }
                  },
                  "volumeMounts": {
                    "81278782-5dd6-4b84-8771-037b6317857a": {
                      "mountPath": "/home"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "jupyterhub",
      "method": "GET",
      "path": "/hub/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-04T17:54:19.363Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-04T18:08:49.049Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_301ecac184e7416f9f33",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "DEPLOYING,SUCCESS"
      }
    ]
  }
}
