{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a51fbc4b-59c3-4536-b935-a9c1fdb2057a",
    "slug": "mastra-server-with-studio",
    "name": "Mastra Server With Studio",
    "description": "Mastra server with Studio UI - build, test, and manage AI agents",
    "url": "https://railway.com/deploy/mastra-server-with-studio",
    "upstream": {
      "repo_url": "https://github.com/Sjotie/mastra-studio-railway"
    }
  },
  "services": [
    {
      "name": "Mastra Studio",
      "source": {
        "repo": "https://github.com/Sjotie/mastra-studio-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MODEL",
      "service": "Mastra Studio",
      "description": "Model for the starter agent in provider/model format, e.g. openai/gpt-5.4-mini or anthropic/claude-sonnet-4-6 (set the matching provider API key variable).",
      "secret": false,
      "strategy": "default",
      "default": "openai/gpt-5.4-mini"
    },
    {
      "key": "DATABASE_URL",
      "service": "Mastra Studio",
      "description": "LibSQL storage URL. Default file:/data/mastra.db is backed by the attached volume so agent memory and Studio data persist across deploys.",
      "secret": false,
      "strategy": "default",
      "default": "file:/data/mastra.db"
    },
    {
      "key": "OPENAI_API_KEY",
      "service": "Mastra Studio",
      "description": "Your OpenAI API key, used by the default openai/... model. If you switch MODEL to another provider, add that provider's key variable instead (e.g. ANTHROPIC_API_KEY).",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "STUDIO_AUTH_KEY",
      "service": "Mastra Studio",
      "description": "Auto-generated login key for Studio. Open your deployed URL and sign in with this key; API routes accept it as a Bearer token. Remove the variable to disable auth (not recommended).",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mastra-server-with-studio"
      }
    },
    "cli": "railway deploy --template mastra-server-with-studio",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a51fbc4b-59c3-4536-b935-a9c1fdb2057a",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "b3b362fd-5af7-41f3-942a-aa6e73535c52": {
                  "icon": "https://unpkg.com/mastra/dist/studio/mastra.svg",
                  "name": "Mastra Studio",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/Sjotie/mastra-studio-railway",
                    "rootDirectory": "server-with-studio"
                  },
                  "variables": {
                    "MODEL": {
                      "isOptional": true,
                      "description": "Model for the starter agent in provider/model format, e.g. openai/gpt-5.4-mini or anthropic/claude-sonnet-4-6 (set the matching provider API key variable).",
                      "defaultValue": "openai/gpt-5.4-mini"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "LibSQL storage URL. Default file:/data/mastra.db is backed by the attached volume so agent memory and Studio data persist across deploys.",
                      "defaultValue": "file:/data/mastra.db"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": false,
                      "description": "Your OpenAI API key, used by the default openai/... model. If you switch MODEL to another provider, add that provider's key variable instead (e.g. ANTHROPIC_API_KEY).",
                      "defaultValue": "{{OPENAI_API_KEY}}"
                    },
                    "STUDIO_AUTH_KEY": {
                      "isOptional": false,
                      "description": "Auto-generated login key for Studio. Open your deployed URL and sign in with this key; API routes accept it as a Bearer token. Remove the variable to disable auth (not recommended).",
                      "defaultValue": "{{STUDIO_AUTH_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "b3b362fd-5af7-41f3-942a-aa6e73535c52": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Mastra Studio",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T10:07:26.547Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_1ebcebac515545808171",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 125,
    "typical_build_seconds": 47,
    "typical_start_seconds": 10,
    "slowest_service": "Mastra Studio"
  }
}
