{
  "manifest_version": "1.0.0",
  "template": {
    "id": "ad4282db-64a2-48f3-8fba-1e4b03a3604a",
    "slug": "deploy-9router-openrouter-alternative",
    "name": "9Router vs OpenRouter",
    "description": "Self-hosted OpenRouter alternative for coding tools",
    "url": "https://railway.com/deploy/deploy-9router-openrouter-alternative",
    "upstream": {
      "image": "decolua/9router:0.5.95@sha256:4316fefb95ea642d57db885d906b1227b1768b15ac5def314621fd781da7b3f1"
    }
  },
  "services": [
    {
      "name": "9router",
      "source": {
        "image": "decolua/9router:0.5.95@sha256:4316fefb95ea642d57db885d906b1227b1768b15ac5def314621fd781da7b3f1"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "9router",
      "description": "HTTP port for the dashboard and API (20128).",
      "secret": false,
      "strategy": "default",
      "default": "20128"
    },
    {
      "key": "BASE_URL",
      "service": "9router",
      "description": "Public HTTPS URL used by server-side callbacks.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATA_DIR",
      "service": "9router",
      "description": "SQLite database and backups location on the volume.",
      "secret": false,
      "strategy": "default",
      "default": "/app/data"
    },
    {
      "key": "HOSTNAME",
      "service": "9router",
      "description": "Bind address; 0.0.0.0 so Railway can reach the app.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "CLOUD_URL",
      "service": "9router",
      "description": "Cloud sync endpoint base (9router.com).",
      "secret": false,
      "strategy": "default",
      "default": "https://9router.com"
    },
    {
      "key": "JWT_SECRET",
      "service": "9router",
      "description": "Signs dashboard auth cookies; keep stable.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "API_KEY_SECRET",
      "service": "9router",
      "description": "HMAC secret for generated API keys; keep stable.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MACHINE_ID_SALT",
      "service": "9router",
      "description": "Salt for stable machine ID hashing.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "REQUIRE_API_KEY",
      "service": "9router",
      "description": "Require a Bearer API key on /v1 routes.",
      "secret": true,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "INITIAL_PASSWORD",
      "service": "9router",
      "description": "First dashboard login password, generated per deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "AUTH_COOKIE_SECURE",
      "service": "9router",
      "description": "HTTPS-only auth cookie; true behind Railway HTTPS.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENABLE_REQUEST_LOGS",
      "service": "9router",
      "description": "Log full requests and responses; leave false.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "NEXT_PUBLIC_BASE_URL",
      "service": "9router",
      "description": "Public HTTPS URL shown in the dashboard UI.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "9router",
      "description": "Seconds to let in-flight requests finish before an old deployment stops.",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "deploy-9router-openrouter-alternative"
      }
    },
    "cli": "railway deploy --template deploy-9router-openrouter-alternative",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "ad4282db-64a2-48f3-8fba-1e4b03a3604a",
            "serializedConfig": {
              "services": {
                "ef2f81c2-967c-4086-8658-c1ab8456bd5f": {
                  "icon": null,
                  "name": "9router",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "decolua/9router:0.5.95@sha256:4316fefb95ea642d57db885d906b1227b1768b15ac5def314621fd781da7b3f1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port for the dashboard and API (20128).",
                      "defaultValue": "20128"
                    },
                    "BASE_URL": {
                      "isOptional": false,
                      "description": "Public HTTPS URL used by server-side callbacks.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATA_DIR": {
                      "isOptional": false,
                      "description": "SQLite database and backups location on the volume.",
                      "defaultValue": "/app/data"
                    },
                    "HOSTNAME": {
                      "isOptional": false,
                      "description": "Bind address; 0.0.0.0 so Railway can reach the app.",
                      "defaultValue": "0.0.0.0"
                    },
                    "CLOUD_URL": {
                      "isOptional": false,
                      "description": "Cloud sync endpoint base (9router.com).",
                      "defaultValue": "https://9router.com"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "Signs dashboard auth cookies; keep stable.",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "SEARXNG_URL": {
                      "isOptional": true,
                      "description": "Optional SearXNG search endpoint for web search.",
                      "defaultValue": ""
                    },
                    "HEADROOM_URL": {
                      "isOptional": true,
                      "description": "Optional Headroom compress endpoint for token savings.",
                      "defaultValue": ""
                    },
                    "API_KEY_SECRET": {
                      "isOptional": false,
                      "description": "HMAC secret for generated API keys; keep stable.",
                      "defaultValue": "{{API_KEY_SECRET}}"
                    },
                    "MACHINE_ID_SALT": {
                      "isOptional": false,
                      "description": "Salt for stable machine ID hashing.",
                      "defaultValue": "{{MACHINE_ID_SALT}}"
                    },
                    "REQUIRE_API_KEY": {
                      "isOptional": false,
                      "description": "Require a Bearer API key on /v1 routes.",
                      "defaultValue": "true"
                    },
                    "INITIAL_PASSWORD": {
                      "isOptional": false,
                      "description": "First dashboard login password, generated per deploy.",
                      "defaultValue": "{{INITIAL_PASSWORD}}"
                    },
                    "AUTH_COOKIE_SECURE": {
                      "isOptional": false,
                      "description": "HTTPS-only auth cookie; true behind Railway HTTPS.",
                      "defaultValue": "true"
                    },
                    "ENABLE_REQUEST_LOGS": {
                      "isOptional": false,
                      "description": "Log full requests and responses; leave false.",
                      "defaultValue": "false"
                    },
                    "NEXT_PUBLIC_BASE_URL": {
                      "isOptional": false,
                      "description": "Public HTTPS URL shown in the dashboard UI.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds to let in-flight requests finish before an old deployment stops.",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:20128": {
                        "port": 20128
                      }
                    }
                  },
                  "volumeMounts": {
                    "ef2f81c2-967c-4086-8658-c1ab8456bd5f": {
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "9router",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-17T04:14:47.046Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-17T02:21:04.592Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_6f9b587b7e5b4788abf2",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 18,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "9router"
  }
}
