{
  "manifest_version": "1.0.0",
  "template": {
    "id": "373743fc-0e44-4b6f-9b40-14115224086f",
    "slug": "grist-spreadsheet",
    "name": "Grist",
    "description": "Deploy Grist, the open-source relational spreadsheet, on Railway",
    "url": "https://railway.com/deploy/grist-spreadsheet",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/grist-railway"
    }
  },
  "services": [
    {
      "name": "grist",
      "source": {
        "image": "gristlabs/grist:stable"
      },
      "needs_volume": true,
      "volume_mount_path": "/persist",
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "gateway",
      "source": {
        "repo": "https://github.com/gridalpha/grist-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "grist",
      "description": "HTTP listening port for Grist",
      "secret": false,
      "strategy": "default",
      "default": "8484"
    },
    {
      "key": "REDIS_URL",
      "service": "grist",
      "description": "Session and coordination store",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GRIST_HOST",
      "service": "grist",
      "description": "Bind address; never an IPv6 literal",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "APP_HOME_URL",
      "service": "grist",
      "description": "Public base URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "grist",
      "description": "Node heap and DNS order",
      "secret": false,
      "strategy": "default",
      "default": "--no-deprecation --dns-result-order=ipv6first --max-old-space-size=3072"
    },
    {
      "key": "TYPEORM_HOST",
      "service": "grist",
      "description": "Home database host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TYPEORM_PORT",
      "service": "grist",
      "description": "Home database port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TYPEORM_TYPE",
      "service": "grist",
      "description": "Home database driver",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "TYPEORM_LOGGING",
      "service": "grist",
      "description": "Silences SQL statement logging",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "GRIST_IN_SERVICE",
      "service": "grist",
      "description": "Skips the first-run setup wizard",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "GRIST_SINGLE_ORG",
      "service": "grist",
      "description": "Single team site served by this server",
      "secret": false,
      "strategy": "default",
      "default": "grist"
    },
    {
      "key": "TYPEORM_DATABASE",
      "service": "grist",
      "description": "Home database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TYPEORM_PASSWORD",
      "service": "grist",
      "description": "Home database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TYPEORM_USERNAME",
      "service": "grist",
      "description": "Home database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GRIST_ADMIN_EMAIL",
      "service": "grist",
      "description": "Installation admin account",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GRIST_FORCE_LOGIN",
      "service": "grist",
      "description": "Blocks all anonymous access",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "GRIST_DEFAULT_EMAIL",
      "service": "grist",
      "description": "Owner of the team site",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GRIST_SANDBOX_FLAVOR",
      "service": "grist",
      "description": "Formula sandbox; pyodide is the fallback",
      "secret": false,
      "strategy": "default",
      "default": "gvisor"
    },
    {
      "key": "GRIST_SESSION_SECRET",
      "service": "grist",
      "description": "Session cookie signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "GRIST_ANON_PLAYGROUND",
      "service": "grist",
      "description": "Disables anonymous scratch documents",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "GRIST_TELEMETRY_LEVEL",
      "service": "grist",
      "description": "Disables usage telemetry",
      "secret": false,
      "strategy": "default",
      "default": "off"
    },
    {
      "key": "GRIST_FORWARD_AUTH_HEADER",
      "service": "grist",
      "description": "Identity header from the gateway",
      "secret": false,
      "strategy": "default",
      "default": "X-Forwarded-User"
    },
    {
      "key": "GRIST_FORWARD_AUTH_LOGOUT_PATH",
      "service": "grist",
      "description": "Path that clears the browser credential",
      "secret": false,
      "strategy": "default",
      "default": "/_oauth/logout"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auth password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "gateway",
      "description": "HTTP listening port for the gateway",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "GRIST_UPSTREAM",
      "service": "gateway",
      "description": "Private address of Grist",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GRIST_ADMIN_EMAIL",
      "service": "gateway",
      "description": "Sign-in name and Grist identity",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "GRIST_ADMIN_PASSWORD",
      "service": "gateway",
      "description": "Sign-in password, hashed at boot",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "grist-spreadsheet"
      }
    },
    "cli": "railway deploy --template grist-spreadsheet",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "373743fc-0e44-4b6f-9b40-14115224086f",
            "serializedConfig": {
              "buckets": {
                "47e3b5b5-a7cc-4599-9c13-84f791ffe519": {
                  "name": "grist-docs"
                }
              },
              "services": {
                "0d7e0249-15ff-45ef-afed-08b6145b951f": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/grist.svg",
                  "name": "grist",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/status",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "gristlabs/grist:stable"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port for Grist",
                      "defaultValue": "8484"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Session and coordination store",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "GRIST_HOST": {
                      "isOptional": false,
                      "description": "Bind address; never an IPv6 literal",
                      "defaultValue": "0.0.0.0"
                    },
                    "APP_HOME_URL": {
                      "isOptional": false,
                      "description": "Public base URL",
                      "defaultValue": "https://${{gateway.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Node heap and DNS order",
                      "defaultValue": "--no-deprecation --dns-result-order=ipv6first --max-old-space-size=3072"
                    },
                    "TYPEORM_HOST": {
                      "isOptional": false,
                      "description": "Home database host",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "TYPEORM_PORT": {
                      "isOptional": false,
                      "description": "Home database port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "TYPEORM_TYPE": {
                      "isOptional": false,
                      "description": "Home database driver",
                      "defaultValue": "postgres"
                    },
                    "TYPEORM_LOGGING": {
                      "isOptional": false,
                      "description": "Silences SQL statement logging",
                      "defaultValue": "false"
                    },
                    "GRIST_IN_SERVICE": {
                      "isOptional": false,
                      "description": "Skips the first-run setup wizard",
                      "defaultValue": "true"
                    },
                    "GRIST_SINGLE_ORG": {
                      "isOptional": false,
                      "description": "Single team site served by this server",
                      "defaultValue": "grist"
                    },
                    "TYPEORM_DATABASE": {
                      "isOptional": false,
                      "description": "Home database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "TYPEORM_PASSWORD": {
                      "isOptional": false,
                      "description": "Home database password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "TYPEORM_USERNAME": {
                      "isOptional": false,
                      "description": "Home database user",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "GRIST_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Installation admin account",
                      "defaultValue": "${{gateway.GRIST_ADMIN_EMAIL}}"
                    },
                    "GRIST_FORCE_LOGIN": {
                      "isOptional": false,
                      "description": "Blocks all anonymous access",
                      "defaultValue": "true"
                    },
                    "GRIST_DEFAULT_EMAIL": {
                      "isOptional": false,
                      "description": "Owner of the team site",
                      "defaultValue": "${{gateway.GRIST_ADMIN_EMAIL}}"
                    },
                    "GRIST_SANDBOX_FLAVOR": {
                      "isOptional": false,
                      "description": "Formula sandbox; pyodide is the fallback",
                      "defaultValue": "gvisor"
                    },
                    "GRIST_SESSION_SECRET": {
                      "isOptional": false,
                      "description": "Session cookie signing key",
                      "defaultValue": "{{GRIST_SESSION_SECRET}}"
                    },
                    "GRIST_ANON_PLAYGROUND": {
                      "isOptional": false,
                      "description": "Disables anonymous scratch documents",
                      "defaultValue": "false"
                    },
                    "GRIST_TELEMETRY_LEVEL": {
                      "isOptional": false,
                      "description": "Disables usage telemetry",
                      "defaultValue": "off"
                    },
                    "GRIST_FORWARD_AUTH_HEADER": {
                      "isOptional": false,
                      "description": "Identity header from the gateway",
                      "defaultValue": "X-Forwarded-User"
                    },
                    "GRIST_FORWARD_AUTH_LOGOUT_PATH": {
                      "isOptional": false,
                      "description": "Path that clears the browser credential",
                      "defaultValue": "/_oauth/logout"
                    }
                  },
                  "volumeMounts": {
                    "0d7e0249-15ff-45ef-afed-08b6145b951f": {
                      "mountPath": "/persist"
                    }
                  }
                },
                "c6446cfc-38ab-4a93-a587-d4aaccc8beb8": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auth password, read by the server",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "c6446cfc-38ab-4a93-a587-d4aaccc8beb8": {
                      "mountPath": "/data"
                    }
                  }
                },
                "e9c5f160-4f70-4be3-8123-fb6089e29ddb": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "e9c5f160-4f70-4be3-8123-fb6089e29ddb": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "f5f9374a-467d-4e87-a678-a28a0fa49b83": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/caddy.svg",
                  "name": "gateway",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/grist-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port for the gateway",
                      "defaultValue": "8080"
                    },
                    "GRIST_UPSTREAM": {
                      "isOptional": false,
                      "description": "Private address of Grist",
                      "defaultValue": "${{grist.RAILWAY_PRIVATE_DOMAIN}}:8484"
                    },
                    "GRIST_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Sign-in name and Grist identity",
                      "defaultValue": "admin@example.com"
                    },
                    "GRIST_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Sign-in password, hashed at boot",
                      "defaultValue": "{{GRIST_ADMIN_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-21T20:07:33.705Z",
  "success_rate_30d": 0.1429,
  "validation": {
    "last_run_id": "run_7bc9c073bd69419f81a8",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ],
    "typical_ready_seconds": 47
  }
}
