{
  "manifest_version": "1.0.0",
  "template": {
    "id": "480be259-4ecc-4c17-bae7-e4e4f91e95a8",
    "slug": "surrealdb-3x",
    "name": "SurrealDB 3.x",
    "description": "A scalable, distributed, collaborative, document-graph database",
    "url": "https://railway.com/deploy/surrealdb-3x",
    "upstream": {
      "image": "surrealdb/surrealdb:v3"
    }
  },
  "services": [
    {
      "name": "SurrealDB 3.x (Latest)",
      "source": {
        "image": "surrealdb/surrealdb:v3"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "SurrealDB 3.x (Latest)",
      "description": "The internal port railway will route external traffic to",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SURREAL_LOG",
      "service": "SurrealDB 3.x (Latest)",
      "description": "The logging level for the database server",
      "secret": false,
      "strategy": "default",
      "default": "trace"
    },
    {
      "key": "SURREAL_URL",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Public database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SURREAL_BIND",
      "service": "SurrealDB 3.x (Latest)",
      "description": "The hostname or ip address to listen for connections on",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SURREAL_HOST",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Public database hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SURREAL_PASS",
      "service": "SurrealDB 3.x (Latest)",
      "description": "The password for the initial database user",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SURREAL_PATH",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Database path used for storing data",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SURREAL_PORT",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Public database port",
      "secret": false,
      "strategy": "default",
      "default": "443"
    },
    {
      "key": "SURREAL_USER",
      "service": "SurrealDB 3.x (Latest)",
      "description": "The username for the initial database user",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Start Surreal as root to allow writing to the volume",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "SURREAL_HTTP_URL",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Provide a value for SURREAL_HTTP_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SURREAL_PRIVATE_URL",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Private database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SURREAL_PRIVATE_HOST",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Private database hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SURREAL_PRIVATE_PORT",
      "service": "SurrealDB 3.x (Latest)",
      "description": "The Private port that Surreal runs on",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "SURREAL_CAPS_ALLOW_ALL",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Allow all capabilities",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SURREAL_HTTP_PRIVATE_URL",
      "service": "SurrealDB 3.x (Latest)",
      "description": "Provide a value for SURREAL_HTTP_PRIVATE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "surrealdb-3x"
      }
    },
    "cli": "railway deploy --template surrealdb-3x",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "480be259-4ecc-4c17-bae7-e4e4f91e95a8",
            "serializedConfig": {
              "services": {
                "f5e49955-fc10-4624-a7ff-d5dd6f8e5edc": {
                  "icon": "https://surrealdb.com/static/icon/icon.png",
                  "name": "SurrealDB 3.x (Latest)",
                  "build": {},
                  "deploy": {
                    "startCommand": "/surreal start --deny-guests --no-banner",
                    "healthcheckPath": "/health"
                  },
                  "source": {
                    "image": "surrealdb/surrealdb:v3"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "The internal port railway will route external traffic to",
                      "defaultValue": "${{SURREAL_PRIVATE_PORT}}"
                    },
                    "SURREAL_LOG": {
                      "isOptional": false,
                      "description": "The logging level for the database server",
                      "defaultValue": "trace"
                    },
                    "SURREAL_URL": {
                      "isOptional": false,
                      "description": "Public database URL",
                      "defaultValue": "wss://${{RAILWAY_PUBLIC_DOMAIN}}/rpc"
                    },
                    "SURREAL_BIND": {
                      "isOptional": false,
                      "description": "The hostname or ip address to listen for connections on",
                      "defaultValue": "[::]:${{SURREAL_PRIVATE_PORT}}"
                    },
                    "SURREAL_HOST": {
                      "isOptional": false,
                      "description": "Public database hostname",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SURREAL_PASS": {
                      "isOptional": false,
                      "description": "The password for the initial database user",
                      "defaultValue": "{{SURREAL_PASS}}"
                    },
                    "SURREAL_PATH": {
                      "isOptional": false,
                      "description": "Database path used for storing data",
                      "defaultValue": "surrealkv:/${{RAILWAY_VOLUME_MOUNT_PATH}}/srdb.db"
                    },
                    "SURREAL_PORT": {
                      "isOptional": false,
                      "description": "Public database port",
                      "defaultValue": "443"
                    },
                    "SURREAL_USER": {
                      "isOptional": false,
                      "description": "The username for the initial database user",
                      "defaultValue": "{{SURREAL_USER}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Start Surreal as root to allow writing to the volume",
                      "defaultValue": "0"
                    },
                    "SURREAL_HTTP_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SURREAL_PRIVATE_URL": {
                      "isOptional": false,
                      "description": "Private database URL",
                      "defaultValue": "ws://${{RAILWAY_PRIVATE_DOMAIN}}:${{SURREAL_PRIVATE_PORT}}/rpc"
                    },
                    "SURREAL_PRIVATE_HOST": {
                      "isOptional": false,
                      "description": "Private database hostname",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "SURREAL_PRIVATE_PORT": {
                      "isOptional": false,
                      "description": "The Private port that Surreal runs on",
                      "defaultValue": "8000"
                    },
                    "SURREAL_CAPS_ALLOW_ALL": {
                      "isOptional": false,
                      "description": "Allow all capabilities",
                      "defaultValue": "true"
                    },
                    "SURREAL_HTTP_PRIVATE_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:${{SURREAL_PRIVATE_PORT}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "f5e49955-fc10-4624-a7ff-d5dd6f8e5edc": {
                      "mountPath": "/data",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "SurrealDB 3.x (Latest)",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-13T04:14:39.446Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-11T17:55:55.942Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_9c87b7d6d4684ff4911c",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 61,
    "typical_build_seconds": 0,
    "typical_start_seconds": 1,
    "slowest_service": "SurrealDB 3.x (Latest)"
  }
}
