{
  "manifest_version": "1.0.0",
  "template": {
    "id": "0d344ced-f8e3-44de-8339-e54dc408a4ef",
    "slug": "surrealdb-4x",
    "name": "SurrealDB 4.x",
    "description": "A scalable, distributed, collaborative, document-graph database",
    "url": "https://railway.com/deploy/surrealdb-4x",
    "upstream": {
      "image": "surrealdb/surrealdb:v4"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "SurrealDB 4.x (Latest)",
      "source": {
        "image": "surrealdb/surrealdb:v4"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "SurrealDB 4.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 4.x (Latest)",
      "description": "The logging level for the database server",
      "secret": false,
      "strategy": "default",
      "default": "trace"
    },
    {
      "key": "SURREAL_URL",
      "service": "SurrealDB 4.x (Latest)",
      "description": "Public database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SURREAL_BIND",
      "service": "SurrealDB 4.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 4.x (Latest)",
      "description": "Public database hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SURREAL_PASS",
      "service": "SurrealDB 4.x (Latest)",
      "description": "The password for the initial database user",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SURREAL_PATH",
      "service": "SurrealDB 4.x (Latest)",
      "description": "Database path used for storing data",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SURREAL_PORT",
      "service": "SurrealDB 4.x (Latest)",
      "description": "Public database port",
      "secret": false,
      "strategy": "default",
      "default": "443"
    },
    {
      "key": "SURREAL_USER",
      "service": "SurrealDB 4.x (Latest)",
      "description": "The username for the initial database user",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "SurrealDB 4.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 4.x (Latest)",
      "description": "Public database HTTP URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SURREAL_PRIVATE_URL",
      "service": "SurrealDB 4.x (Latest)",
      "description": "Private database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SURREAL_PRIVATE_HOST",
      "service": "SurrealDB 4.x (Latest)",
      "description": "Private database hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SURREAL_PRIVATE_PORT",
      "service": "SurrealDB 4.x (Latest)",
      "description": "The Private port that Surreal runs on",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "SURREAL_CAPS_ALLOW_ALL",
      "service": "SurrealDB 4.x (Latest)",
      "description": "Allow all capabilities",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SURREAL_HTTP_PRIVATE_URL",
      "service": "SurrealDB 4.x (Latest)",
      "description": "Private database HTTP URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "surrealdb-4x"
      }
    },
    "cli": "railway deploy --template surrealdb-4x",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "0d344ced-f8e3-44de-8339-e54dc408a4ef",
            "serializedConfig": {
              "services": {
                "4b7e91f2-e33d-4adb-9a8d-f96adb703b9d": {
                  "icon": "https://surrealdb.com/static/icon/icon.png",
                  "name": "SurrealDB 4.x (Latest)",
                  "build": {},
                  "deploy": {
                    "startCommand": "/surreal start --deny-guests",
                    "healthcheckPath": "/health"
                  },
                  "source": {
                    "image": "surrealdb/surrealdb:v4"
                  },
                  "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": "Public database HTTP URL",
                      "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": "Private database HTTP URL",
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:${{SURREAL_PRIVATE_PORT}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "4b7e91f2-e33d-4adb-9a8d-f96adb703b9d": {
                      "mountPath": "/data",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "SurrealDB 4.x (Latest)",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-11-03T22:15:11.821Z",
  "generator_version": "0.1.0"
}
