{
  "manifest_version": "1.0.0",
  "template": {
    "id": "6ca3911b-27bc-4743-9737-2c8ffa326f0d",
    "slug": "stalwart-1",
    "name": "Stalwart",
    "description": "Mailbox server: JMAP, IMAP, CalDAV, CardDAV, and a web admin.",
    "url": "https://railway.com/deploy/stalwart-1",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/stalwart-railway"
    }
  },
  "services": [
    {
      "name": "stalwart",
      "source": {
        "repo": "https://github.com/nomideusz/stalwart-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "stalwart",
      "description": "Web admin port Railway routes to. Don't change.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "STALWART_PUBLIC_URL",
      "service": "stalwart",
      "description": "Public base URL, wired to your Railway domain. Don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "STALWART_RECOVERY_ADMIN",
      "service": "stalwart",
      "description": "Administrator login for the setup wizard, as user:password. Auto-generated.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "stalwart",
      "description": "Grace period for the first boot to answer the healthcheck.",
      "secret": false,
      "strategy": "default",
      "default": "600"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "stalwart-1"
      }
    },
    "cli": "railway deploy --template stalwart-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "6ca3911b-27bc-4743-9737-2c8ffa326f0d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "ed2cb874-6f24-48fc-8699-4ce7ac2fef15": {
                  "icon": "https://raw.githubusercontent.com/stalwartlabs/stalwart/main/img/logo-red.svg",
                  "name": "stalwart",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz/live",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/stalwart-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Web admin port Railway routes to. Don't change.",
                      "defaultValue": "8080"
                    },
                    "STALWART_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public base URL, wired to your Railway domain. Don't change.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "STALWART_RECOVERY_ADMIN": {
                      "isOptional": false,
                      "description": "Administrator login for the setup wizard, as user:password. Auto-generated.",
                      "defaultValue": "{{STALWART_RECOVERY_ADMIN}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "Grace period for the first boot to answer the healthcheck.",
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "ed2cb874-6f24-48fc-8699-4ce7ac2fef15": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "stalwart",
      "method": "GET",
      "path": "/healthz/live",
      "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-04T12:42:40.333Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_edfadea9621b439395d0",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 109,
    "typical_build_seconds": 10,
    "typical_start_seconds": 10,
    "slowest_service": "stalwart"
  }
}
