{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2e6290be-706d-412e-b660-def0aa678ac6",
    "slug": "9router-gateway",
    "name": "9router",
    "description": "Self-host 9router: OpenAI-compatible endpoint, 100+ models, fallback & more",
    "url": "https://railway.com/deploy/9router-gateway",
    "upstream": {
      "image": "decolua/9router:0.5.40"
    }
  },
  "services": [
    {
      "name": "9router",
      "source": {
        "image": "decolua/9router:0.5.40"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "9router",
      "description": "App HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "20128"
    },
    {
      "key": "BASE_URL",
      "service": "9router",
      "description": "Public self-callback URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATA_DIR",
      "service": "9router",
      "description": "SQLite location on mounted volume",
      "secret": false,
      "strategy": "default",
      "default": "/app/data"
    },
    {
      "key": "HOSTNAME",
      "service": "9router",
      "description": "Bind all interfaces for routing",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "NODE_ENV",
      "service": "9router",
      "description": "Production Next.js runtime",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "JWT_SECRET",
      "service": "9router",
      "description": "Signs dashboard session cookies",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "API_KEY_SECRET",
      "service": "9router",
      "description": "HMAC secret for issued API keys",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MACHINE_ID_SALT",
      "service": "9router",
      "description": "Salt for machine ID hashing",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "REQUIRE_API_KEY",
      "service": "9router",
      "description": "Reject unauthenticated /v1 calls",
      "secret": true,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "INITIAL_PASSWORD",
      "service": "9router",
      "description": "Seeds first dashboard login",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "AUTH_COOKIE_SECURE",
      "service": "9router",
      "description": "Secure cookie flag behind HTTPS",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENABLE_REQUEST_LOGS",
      "service": "9router",
      "description": "Keep request bodies off disk",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "NEXT_PUBLIC_BASE_URL",
      "service": "9router",
      "description": "Legacy public base URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "OBSERVABILITY_ENABLED",
      "service": "9router",
      "description": "Enable usage and quota tracking",
      "secret": false,
      "strategy": "default",
      "default": "true"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "9router-gateway"
      }
    },
    "cli": "railway deploy --template 9router-gateway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2e6290be-706d-412e-b660-def0aa678ac6",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2b737620-dfd8-4406-8b8a-45576a766a34": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/9router.svg",
                  "name": "9router",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "decolua/9router:0.5.40"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "App HTTP listening port",
                      "defaultValue": "20128"
                    },
                    "BASE_URL": {
                      "isOptional": false,
                      "description": "Public self-callback URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATA_DIR": {
                      "isOptional": false,
                      "description": "SQLite location on mounted volume",
                      "defaultValue": "/app/data"
                    },
                    "HOSTNAME": {
                      "isOptional": false,
                      "description": "Bind all interfaces for routing",
                      "defaultValue": "0.0.0.0"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Production Next.js runtime",
                      "defaultValue": "production"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "Signs dashboard session cookies",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "API_KEY_SECRET": {
                      "isOptional": false,
                      "description": "HMAC secret for issued API keys",
                      "defaultValue": "{{API_KEY_SECRET}}"
                    },
                    "MACHINE_ID_SALT": {
                      "isOptional": false,
                      "description": "Salt for machine ID hashing",
                      "defaultValue": "{{MACHINE_ID_SALT}}"
                    },
                    "REQUIRE_API_KEY": {
                      "isOptional": false,
                      "description": "Reject unauthenticated /v1 calls",
                      "defaultValue": "true"
                    },
                    "INITIAL_PASSWORD": {
                      "isOptional": false,
                      "description": "Seeds first dashboard login",
                      "defaultValue": "{{INITIAL_PASSWORD}}"
                    },
                    "AUTH_COOKIE_SECURE": {
                      "isOptional": false,
                      "description": "Secure cookie flag behind HTTPS",
                      "defaultValue": "true"
                    },
                    "ENABLE_REQUEST_LOGS": {
                      "isOptional": false,
                      "description": "Keep request bodies off disk",
                      "defaultValue": "false"
                    },
                    "NEXT_PUBLIC_BASE_URL": {
                      "isOptional": false,
                      "description": "Legacy public base URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "OBSERVABILITY_ENABLED": {
                      "isOptional": false,
                      "description": "Enable usage and quota tracking",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "2b737620-dfd8-4406-8b8a-45576a766a34": {
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T10:14:45.332Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-08T22:41:35.577Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_b753aa40f48b470892b1",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 17,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "9router"
  }
}
