{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b0d3f73f-88bb-4392-aed6-feb5ed497515",
    "slug": "stalwart-webmail",
    "name": "Stalwart Webmail",
    "description": "Self-hosted webmail for your Stalwart mail server (JMAP)",
    "url": "https://railway.com/deploy/stalwart-webmail",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/zaur"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "webmail",
      "source": {
        "repo": "https://github.com/nomideusz/zaur"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/.data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "HOST",
      "service": "webmail",
      "description": "Bind address - leave as :: (dual-stack)",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "PORT",
      "service": "webmail",
      "description": "App port - leave as 3000",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "SESSION_SECRET",
      "service": "webmail",
      "description": "Auto-generated - seals sign-in credentials in the server-side store",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PUBLIC_APP_NAME",
      "service": "webmail",
      "description": "App name shown in the UI, page titles and PWA manifest",
      "secret": false,
      "strategy": "default",
      "default": "Webmail"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "webmail",
      "description": "Run as root so the /app/.data volume is writable",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "PUBLIC_JMAP_SERVER_URL",
      "service": "webmail",
      "description": "Base URL of your Stalwart (JMAP) server, e.g. https://mail.example.com",
      "secret": false,
      "strategy": "ask_user"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "stalwart-webmail"
      }
    },
    "cli": "railway deploy --template stalwart-webmail",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b0d3f73f-88bb-4392-aed6-feb5ed497515",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "5caefbb0-df29-4aad-9690-9e0aa36fc331": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/zaur/main/apps/webmail/static/pwa-192x192.png",
                  "name": "webmail",
                  "build": {
                    "dockerfilePath": "apps/webmail/Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/zaur",
                    "rootDirectory": "/"
                  },
                  "variables": {
                    "HOST": {
                      "isOptional": false,
                      "description": "Bind address - leave as :: (dual-stack)",
                      "defaultValue": "::"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "App port - leave as 3000",
                      "defaultValue": "3000"
                    },
                    "SESSION_SECRET": {
                      "isOptional": false,
                      "description": "Auto-generated - seals sign-in credentials in the server-side store",
                      "defaultValue": "{{SESSION_SECRET}}"
                    },
                    "PUBLIC_APP_NAME": {
                      "isOptional": true,
                      "description": "App name shown in the UI, page titles and PWA manifest",
                      "defaultValue": "Webmail"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so the /app/.data volume is writable",
                      "defaultValue": "0"
                    },
                    "PUBLIC_JMAP_SERVER_URL": {
                      "isOptional": false,
                      "description": "Base URL of your Stalwart (JMAP) server, e.g. https://mail.example.com",
                      "defaultValue": "{{PUBLIC_JMAP_SERVER_URL}}"
                    },
                    "STALWART_OAUTH_ENABLED": {
                      "isOptional": true,
                      "description": "Set true to sign in via Stalwart OAuth instead of password",
                      "defaultValue": ""
                    },
                    "STALWART_OAUTH_CLIENT_ID": {
                      "isOptional": true,
                      "description": "OAuth client id registered in Stalwart (PKCE S256)",
                      "defaultValue": ""
                    },
                    "STALWART_OAUTH_ISSUER_URL": {
                      "isOptional": true,
                      "description": "Stalwart base URL for OAuth - usually same as PUBLIC_JMAP_SERVER_URL",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "5caefbb0-df29-4aad-9690-9e0aa36fc331": {
                      "mountPath": "/app/.data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "webmail",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T22:14:50.114Z",
  "generator_version": "0.1.0"
}
