{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1dcc1da0-faa2-4d43-9360-2e7916239390",
    "slug": "unla-mcp-gateway",
    "name": "Unla MCP Gateway",
    "description": "MCP gateway and management UI with persistent SQLite and owner access.",
    "url": "https://railway.com/deploy/unla-mcp-gateway",
    "upstream": {
      "repo_url": "https://github.com/orenaksakal/railway-templates"
    }
  },
  "services": [
    {
      "name": "core",
      "source": {
        "repo": "https://github.com/orenaksakal/railway-templates"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": false
    },
    {
      "name": "unla",
      "source": {
        "repo": "https://github.com/orenaksakal/railway-templates"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "ENV",
      "service": "core",
      "description": "Firecrawl runtime mode. Keep local for this self-hosted deployment.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "LOGGER_LEVEL",
      "service": "core",
      "description": "Logger level for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "OAUTH2_ISSUER",
      "service": "core",
      "description": "Oauth2 issuer resolved automatically from the linked service. Keep this reference when using the included topology.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "GATEWAY_DB_NAME",
      "service": "core",
      "description": "Gateway db name for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/app/data/unla.db"
    },
    {
      "key": "VITE_WS_BASE_URL",
      "service": "core",
      "description": "Vite ws base url for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/api/ws"
    },
    {
      "key": "APISERVER_DB_NAME",
      "service": "core",
      "description": "Apiserver db name for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/app/data/unla.db"
    },
    {
      "key": "VITE_API_BASE_URL",
      "service": "core",
      "description": "Vite api base url for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/api"
    },
    {
      "key": "SUPER_ADMIN_PASSWORD",
      "service": "core",
      "description": "Generated super admin password. Keep private and preserve with backups.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SUPER_ADMIN_USERNAME",
      "service": "core",
      "description": "Super admin username for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "LLM_CONFIG_ADMIN_ONLY",
      "service": "core",
      "description": "Llm config admin only for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "core",
      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
      "secret": false,
      "strategy": "default",
      "default": "templates/unla/Dockerfile"
    },
    {
      "key": "APISERVER_JWT_SECRET_KEY",
      "service": "core",
      "description": "Generated apiserver jwt secret key. Keep private and preserve with backups.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "VITE_MCP_GATEWAY_BASE_URL",
      "service": "core",
      "description": "Vite mcp gateway base url for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/gateway"
    },
    {
      "key": "VITE_GATEWAY_SERVICE_BASE_URL",
      "service": "core",
      "description": "Vite gateway service base url resolved automatically from the linked service. Keep this reference when using the included topology.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "VITE_DIRECT_MCP_GATEWAY_MODIFIER",
      "service": "core",
      "description": "Vite direct mcp gateway modifier for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/gateway"
    },
    {
      "key": "PORT",
      "service": "unla",
      "description": "HTTP port inside this service. Keep the default to match its Railway public port and health check.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "OWNER_AUTH",
      "service": "unla",
      "description": "Owner auth for unla. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "UPSTREAM_HOST",
      "service": "unla",
      "description": "Upstream host resolved automatically from the linked service. Keep this reference when using the included topology.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "UPSTREAM_PORT",
      "service": "unla",
      "description": "Upstream port for unla. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "ACCESS_PASSWORD",
      "service": "unla",
      "description": "Generated access password. Keep private and preserve with backups.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "unla",
      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
      "secret": false,
      "strategy": "default",
      "default": "shared/round6-gateway/Dockerfile"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "unla-mcp-gateway"
      }
    },
    "cli": "railway deploy --template unla-mcp-gateway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1dcc1da0-faa2-4d43-9360-2e7916239390",
            "serializedConfig": {
              "services": {
                "ca7bbd44-4df6-54a0-ada5-d8c9920aa8fe": {
                  "name": "core",
                  "build": {
                    "builder": "RAILPACK",
                    "dockerfilePath": "templates/unla/Dockerfile"
                  },
                  "deploy": {
                    "requiredMountPath": "/app/data",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "orenaksakal/railway-templates",
                    "branch": "codex/fifteen-template-drafts"
                  },
                  "variables": {
                    "ENV": {
                      "isOptional": false,
                      "description": "Firecrawl runtime mode. Keep local for this self-hosted deployment.",
                      "defaultValue": "production"
                    },
                    "LOGGER_LEVEL": {
                      "isOptional": false,
                      "description": "Logger level for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "info"
                    },
                    "OAUTH2_ISSUER": {
                      "isOptional": false,
                      "description": "Oauth2 issuer resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "https://${{unla.RAILWAY_PUBLIC_DOMAIN}}/gateway"
                    },
                    "GATEWAY_DB_NAME": {
                      "isOptional": false,
                      "description": "Gateway db name for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/app/data/unla.db"
                    },
                    "VITE_WS_BASE_URL": {
                      "isOptional": false,
                      "description": "Vite ws base url for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/api/ws"
                    },
                    "APISERVER_DB_NAME": {
                      "isOptional": false,
                      "description": "Apiserver db name for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/app/data/unla.db"
                    },
                    "VITE_API_BASE_URL": {
                      "isOptional": false,
                      "description": "Vite api base url for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/api"
                    },
                    "SUPER_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated super admin password. Keep private and preserve with backups.",
                      "defaultValue": "{{SUPER_ADMIN_PASSWORD}}"
                    },
                    "SUPER_ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "Super admin username for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "admin"
                    },
                    "LLM_CONFIG_ADMIN_ONLY": {
                      "isOptional": false,
                      "description": "Llm config admin only for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "true"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
                      "defaultValue": "templates/unla/Dockerfile"
                    },
                    "APISERVER_JWT_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Generated apiserver jwt secret key. Keep private and preserve with backups.",
                      "defaultValue": "{{APISERVER_JWT_SECRET_KEY}}"
                    },
                    "VITE_MCP_GATEWAY_BASE_URL": {
                      "isOptional": false,
                      "description": "Vite mcp gateway base url for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/gateway"
                    },
                    "VITE_GATEWAY_SERVICE_BASE_URL": {
                      "isOptional": false,
                      "description": "Vite gateway service base url resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "https://${{unla.RAILWAY_PUBLIC_DOMAIN}}/gateway"
                    },
                    "VITE_DIRECT_MCP_GATEWAY_MODIFIER": {
                      "isOptional": false,
                      "description": "Vite direct mcp gateway modifier for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/gateway"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "b8bdcf68-4112-5e15-97a4-6ff3af885a9d": {
                      "mountPath": "/app/data"
                    }
                  }
                },
                "e017c24a-3b01-56cb-881d-078c4d84d662": {
                  "name": "unla",
                  "build": {
                    "builder": "RAILPACK",
                    "dockerfilePath": "shared/round6-gateway/Dockerfile"
                  },
                  "deploy": {
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "orenaksakal/railway-templates",
                    "branch": "codex/fifteen-template-drafts"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port inside this service. Keep the default to match its Railway public port and health check.",
                      "defaultValue": "8080"
                    },
                    "OWNER_AUTH": {
                      "isOptional": false,
                      "description": "Owner auth for unla. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "true"
                    },
                    "UPSTREAM_HOST": {
                      "isOptional": false,
                      "description": "Upstream host resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "${{core.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "UPSTREAM_PORT": {
                      "isOptional": false,
                      "description": "Upstream port for unla. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "80"
                    },
                    "ACCESS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated access password. Keep private and preserve with backups.",
                      "defaultValue": "{{ACCESS_PASSWORD}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
                      "defaultValue": "shared/round6-gateway/Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "unla",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-13T22:14:35.692Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-13T20:11:43.261Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_698af67c546a4d7f9ce5",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 83,
    "typical_build_seconds": 31,
    "typical_start_seconds": 10,
    "slowest_service": "core"
  }
}
