{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a429dcff-4281-411e-a69e-661971ab57c2",
    "slug": "headroom",
    "name": "Headroom",
    "description": "Headroom compression proxy. Cuts LLM token usage",
    "url": "https://railway.com/deploy/headroom",
    "upstream": {
      "image": "ghcr.io/chopratejas/headroom:0.6.7-code-nonroot"
    }
  },
  "services": [
    {
      "name": "Headroom",
      "source": {
        "image": "ghcr.io/chopratejas/headroom:0.6.7-code-nonroot"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/nonroot/.headroom",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "HOME",
      "service": "Headroom",
      "description": "Home directory of the non-root container user; base path of the writable Headroom workspace.",
      "secret": false,
      "strategy": "default",
      "default": "/home/nonroot"
    },
    {
      "key": "PORT",
      "service": "Headroom",
      "description": "Port",
      "secret": false,
      "strategy": "default",
      "default": "8787"
    },
    {
      "key": "HEADROOM_HOST",
      "service": "Headroom",
      "description": "Headroom host",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "HEADROOM_PORT",
      "service": "Headroom",
      "description": "Headroom port",
      "secret": false,
      "strategy": "default",
      "default": "8787"
    },
    {
      "key": "HEADROOM_CONFIG_DIR",
      "service": "Headroom",
      "description": "Headroom reads and writes its configuration from this directory.",
      "secret": false,
      "strategy": "default",
      "default": "/home/nonroot/.headroom/config"
    },
    {
      "key": "HEADROOM_PROXY_TOKEN",
      "service": "Headroom",
      "description": "Bearer token required from NON-loopback callers on the /v1/* data plane",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "HEADROOM_UPDATE_CHECK",
      "service": "Headroom",
      "description": "Set to 'off' to disable the CLI update check in a long-lived server deployment.",
      "secret": false,
      "strategy": "default",
      "default": "off"
    },
    {
      "key": "HEADROOM_WORKSPACE_DIR",
      "service": "Headroom",
      "description": "Writable workspace directory",
      "secret": false,
      "strategy": "default",
      "default": "/home/nonroot/.headroom"
    },
    {
      "key": "HEADROOM_SKIP_UPSTREAM_CHECK",
      "service": "Headroom",
      "description": "When 1, /readyz does not gate readiness on reaching an upstream LLM API, so the deploy is healthy regardless of which provider you target. Set to 0 to have readiness verify the default upstream (api.anthropic.com).",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "headroom"
      }
    },
    "cli": "railway deploy --template headroom",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a429dcff-4281-411e-a69e-661971ab57c2",
            "serializedConfig": {
              "services": {
                "45e91709-6a65-43c1-88f0-5487b4165df6": {
                  "icon": "https://vaze.up.railway.app/api/hosting/headroom.png",
                  "name": "Headroom",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/readyz",
                    "healthcheckTimeout": 600
                  },
                  "source": {
                    "image": "ghcr.io/chopratejas/headroom:0.6.7-code-nonroot"
                  },
                  "variables": {
                    "HOME": {
                      "isOptional": false,
                      "description": "Home directory of the non-root container user; base path of the writable Headroom workspace.",
                      "defaultValue": "/home/nonroot"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Port",
                      "defaultValue": "8787"
                    },
                    "HEADROOM_HOST": {
                      "isOptional": false,
                      "description": "Headroom host",
                      "defaultValue": "0.0.0.0"
                    },
                    "HEADROOM_PORT": {
                      "isOptional": false,
                      "description": "Headroom port",
                      "defaultValue": "8787"
                    },
                    "HEADROOM_CONFIG_DIR": {
                      "isOptional": false,
                      "description": "Headroom reads and writes its configuration from this directory.",
                      "defaultValue": "/home/nonroot/.headroom/config"
                    },
                    "HEADROOM_PROXY_TOKEN": {
                      "isOptional": false,
                      "description": "Bearer token required from NON-loopback callers on the /v1/* data plane",
                      "defaultValue": "{{HEADROOM_PROXY_TOKEN}}"
                    },
                    "HEADROOM_UPDATE_CHECK": {
                      "isOptional": false,
                      "description": "Set to 'off' to disable the CLI update check in a long-lived server deployment.",
                      "defaultValue": "off"
                    },
                    "HEADROOM_WORKSPACE_DIR": {
                      "isOptional": false,
                      "description": "Writable workspace directory",
                      "defaultValue": "/home/nonroot/.headroom"
                    },
                    "HEADROOM_SKIP_UPSTREAM_CHECK": {
                      "isOptional": false,
                      "description": "When 1, /readyz does not gate readiness on reaching an upstream LLM API, so the deploy is healthy regardless of which provider you target. Set to 0 to have readiness verify the default upstream (api.anthropic.com).",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8787
                      }
                    }
                  },
                  "volumeMounts": {
                    "45e91709-6a65-43c1-88f0-5487b4165df6": {
                      "mountPath": "/home/nonroot/.headroom"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Headroom",
      "method": "GET",
      "path": "/readyz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-09T01:22:48.379Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_879a625904354ee79c83",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 27,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Headroom"
  }
}
