{
  "manifest_version": "1.0.0",
  "template": {
    "id": "98fd2f3e-7aad-45b0-8960-9b99b07d719a",
    "slug": "restate-durable-workflows",
    "name": "Restate durable workflows",
    "description": "Durable workflows and virtual objects with authenticated ingress and state.",
    "url": "https://railway.com/deploy/restate-durable-workflows",
    "upstream": {
      "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
    }
  },
  "services": [
    {
      "name": "Restate",
      "source": {
        "image": "ghcr.io/restatedev/restate:1.7.2@sha256:d39111bd494dd7cf4e107c913c89e38572f454292805ad0b9a0f0485a91e4b24"
      },
      "needs_volume": true,
      "volume_mount_path": "/restate-data",
      "http": false
    },
    {
      "name": "Restate Gateway",
      "source": {
        "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Restate",
      "description": "Private admin listener used by Railway health checks.",
      "secret": false,
      "strategy": "default",
      "default": "9070"
    },
    {
      "key": "RESTATE_NODE_NAME",
      "service": "Restate",
      "description": "Stable node identity that selects the persisted data directory; do not change after initialization.",
      "secret": false,
      "strategy": "default",
      "default": "restate-1"
    },
    {
      "key": "RESTATE_LISTEN_MODE",
      "service": "Restate",
      "description": "Uses TCP listeners required by Railway private networking.",
      "secret": false,
      "strategy": "default",
      "default": "tcp"
    },
    {
      "key": "RESTATE_CLUSTER_NAME",
      "service": "Restate",
      "description": "Stable single-node cluster name.",
      "secret": false,
      "strategy": "default",
      "default": "railway-restate"
    },
    {
      "key": "RESTATE_DISABLE_TELEMETRY",
      "service": "Restate",
      "description": "Disables Restate telemetry by default.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RESTATE_ADVERTISED_ADDRESS",
      "service": "Restate",
      "description": "Private fabric address; never expose this listener publicly.",
      "secret": false,
      "strategy": "default",
      "default": "http://127.0.0.1:5122/"
    },
    {
      "key": "RESTATE_LOG_DISABLE_ANSI_CODES",
      "service": "Restate",
      "description": "Keeps Railway logs free of terminal escape codes.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RESTATE_ADMIN__ADVERTISED_ADDRESS",
      "service": "Restate",
      "description": "Authenticated public gateway URL shown to operators and the Web UI.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RESTATE_ROCKSDB_TOTAL_MEMORY_SIZE",
      "service": "Restate",
      "description": "RocksDB memory budget for this small single-node starter.",
      "secret": false,
      "strategy": "default",
      "default": "256.0 MiB"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Restate",
      "description": "Allows Restate to flush and shut down cleanly.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "RESTATE_INGRESS__ADVERTISED_ADDRESS",
      "service": "Restate",
      "description": "Authenticated public invocation base URL used by the Web UI and clients.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RESTATE_WORKER__INVOKER__MEMORY_LIMIT",
      "service": "Restate",
      "description": "Bounded service-invocation memory budget.",
      "secret": false,
      "strategy": "default",
      "default": "256.0 MiB"
    },
    {
      "key": "RESTATE_ADMIN__QUERY_ENGINE__MEMORY_SIZE",
      "service": "Restate",
      "description": "Bounded SQL introspection query-engine memory budget.",
      "secret": false,
      "strategy": "default",
      "default": "64.0 MiB"
    },
    {
      "key": "RESTATE_BIFROST__RECORD_CACHE_MEMORY_SIZE",
      "service": "Restate",
      "description": "Bounded durable-log record-cache memory budget.",
      "secret": false,
      "strategy": "default",
      "default": "64.0 MiB"
    },
    {
      "key": "PORT",
      "service": "Restate Gateway",
      "description": "Caddy listener exposed through the Railway domain.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "ADMIN_UPSTREAM",
      "service": "Restate Gateway",
      "description": "Private Restate admin/UI upstream.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GATEWAY_CONFIG",
      "service": "Restate Gateway",
      "description": "Audited Caddy routing policy that authenticates public traffic and strips its Authorization header before journaling.",
      "secret": false,
      "strategy": "default",
      "default": ":8080 {\n  handle_path /healthz {\n    rewrite * /health\n    reverse_proxy http://__ADMIN_UPSTREAM__\n  }\n  @protected not path /healthz\n  basic_auth @protected {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle_path /invoke/* {\n    reverse_proxy h2c://__INGRESS_UPSTREAM__ {\n      header_up -Authorization\n    }\n  }\n  handle {\n    reverse_proxy http://__ADMIN_UPSTREAM__ {\n      header_up -Authorization\n    }\n  }\n}"
    },
    {
      "key": "GATEWAY_PASSWORD",
      "service": "Restate Gateway",
      "description": "Generated Basic Auth password; store it securely and rotate deliberately.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "GATEWAY_USERNAME",
      "service": "Restate Gateway",
      "description": "Basic Auth username for the UI, admin API, and invocation route.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "INGRESS_UPSTREAM",
      "service": "Restate Gateway",
      "description": "Private Restate invocation upstream.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "restate-durable-workflows"
      }
    },
    "cli": "railway deploy --template restate-durable-workflows",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "98fd2f3e-7aad-45b0-8960-9b99b07d719a",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "36a06c16-4a0c-4ac9-8bd8-85b9de859d07": {
                  "icon": null,
                  "name": "Restate",
                  "deploy": {
                    "startCommand": "/usr/local/bin/restate-server --auto-provision true",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/restatedev/restate:1.7.2@sha256:d39111bd494dd7cf4e107c913c89e38572f454292805ad0b9a0f0485a91e4b24"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Private admin listener used by Railway health checks.",
                      "defaultValue": "9070"
                    },
                    "RESTATE_NODE_NAME": {
                      "isOptional": false,
                      "description": "Stable node identity that selects the persisted data directory; do not change after initialization.",
                      "defaultValue": "restate-1"
                    },
                    "RESTATE_LISTEN_MODE": {
                      "isOptional": false,
                      "description": "Uses TCP listeners required by Railway private networking.",
                      "defaultValue": "tcp"
                    },
                    "RESTATE_CLUSTER_NAME": {
                      "isOptional": false,
                      "description": "Stable single-node cluster name.",
                      "defaultValue": "railway-restate"
                    },
                    "RESTATE_DISABLE_TELEMETRY": {
                      "isOptional": false,
                      "description": "Disables Restate telemetry by default.",
                      "defaultValue": "true"
                    },
                    "RESTATE_ADVERTISED_ADDRESS": {
                      "isOptional": false,
                      "description": "Private fabric address; never expose this listener publicly.",
                      "defaultValue": "http://127.0.0.1:5122/"
                    },
                    "RESTATE_LOG_DISABLE_ANSI_CODES": {
                      "isOptional": false,
                      "description": "Keeps Railway logs free of terminal escape codes.",
                      "defaultValue": "true"
                    },
                    "RESTATE_ADMIN__ADVERTISED_ADDRESS": {
                      "isOptional": false,
                      "description": "Authenticated public gateway URL shown to operators and the Web UI.",
                      "defaultValue": "https://${{Restate Gateway.RAILWAY_PUBLIC_DOMAIN}}/"
                    },
                    "RESTATE_ROCKSDB_TOTAL_MEMORY_SIZE": {
                      "isOptional": false,
                      "description": "RocksDB memory budget for this small single-node starter.",
                      "defaultValue": "256.0 MiB"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allows Restate to flush and shut down cleanly.",
                      "defaultValue": "60"
                    },
                    "RESTATE_INGRESS__ADVERTISED_ADDRESS": {
                      "isOptional": false,
                      "description": "Authenticated public invocation base URL used by the Web UI and clients.",
                      "defaultValue": "https://${{Restate Gateway.RAILWAY_PUBLIC_DOMAIN}}/invoke/"
                    },
                    "RESTATE_WORKER__INVOKER__MEMORY_LIMIT": {
                      "isOptional": false,
                      "description": "Bounded service-invocation memory budget.",
                      "defaultValue": "256.0 MiB"
                    },
                    "RESTATE_ADMIN__QUERY_ENGINE__MEMORY_SIZE": {
                      "isOptional": false,
                      "description": "Bounded SQL introspection query-engine memory budget.",
                      "defaultValue": "64.0 MiB"
                    },
                    "RESTATE_BIFROST__RECORD_CACHE_MEMORY_SIZE": {
                      "isOptional": false,
                      "description": "Bounded durable-log record-cache memory budget.",
                      "defaultValue": "64.0 MiB"
                    }
                  },
                  "volumeMounts": {
                    "36a06c16-4a0c-4ac9-8bd8-85b9de859d07": {
                      "sizeMB": 5000,
                      "mountPath": "/restate-data"
                    }
                  }
                },
                "f042496f-75a7-409e-8159-c44b364eaa54": {
                  "icon": null,
                  "name": "Restate Gateway",
                  "deploy": {
                    "startCommand": "/bin/sh -ec 'password_hash=\"$(caddy hash-password --plaintext \"$GATEWAY_PASSWORD\")\"; printf \"%s\\n\" \"$GATEWAY_CONFIG\" | sed -e \"s|__USERNAME__|$GATEWAY_USERNAME|g\" -e \"s|__PASSWORD_HASH__|$password_hash|g\" -e \"s|__ADMIN_UPSTREAM__|$ADMIN_UPSTREAM|g\" -e \"s|__INGRESS_UPSTREAM__|$INGRESS_UPSTREAM|g\" >/tmp/Caddyfile; exec caddy run --config /tmp/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Caddy listener exposed through the Railway domain.",
                      "defaultValue": "8080"
                    },
                    "ADMIN_UPSTREAM": {
                      "isOptional": false,
                      "description": "Private Restate admin/UI upstream.",
                      "defaultValue": "${{Restate.RAILWAY_PRIVATE_DOMAIN}}:9070"
                    },
                    "GATEWAY_CONFIG": {
                      "isOptional": false,
                      "description": "Audited Caddy routing policy that authenticates public traffic and strips its Authorization header before journaling.",
                      "defaultValue": ":8080 {\n  handle_path /healthz {\n    rewrite * /health\n    reverse_proxy http://__ADMIN_UPSTREAM__\n  }\n  @protected not path /healthz\n  basic_auth @protected {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle_path /invoke/* {\n    reverse_proxy h2c://__INGRESS_UPSTREAM__ {\n      header_up -Authorization\n    }\n  }\n  handle {\n    reverse_proxy http://__ADMIN_UPSTREAM__ {\n      header_up -Authorization\n    }\n  }\n}"
                    },
                    "GATEWAY_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated Basic Auth password; store it securely and rotate deliberately.",
                      "defaultValue": "{{GATEWAY_PASSWORD}}"
                    },
                    "GATEWAY_USERNAME": {
                      "isOptional": false,
                      "description": "Basic Auth username for the UI, admin API, and invocation route.",
                      "defaultValue": "admin"
                    },
                    "INGRESS_UPSTREAM": {
                      "isOptional": false,
                      "description": "Private Restate invocation upstream.",
                      "defaultValue": "${{Restate.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Restate Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-06T00:13:21.283Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_0d568a1e0c9d4b8eae65",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 27,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Restate Gateway"
  }
}
