{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a18115fc-4565-4d61-a195-611ee0801c88",
    "slug": "hosted-sqlite-libsql",
    "name": "Hosted SQLite (libSQL)",
    "description": "SQLite over HTTP with a token made at deploy. Works with @libsql/client.",
    "url": "https://railway.com/deploy/hosted-sqlite-libsql",
    "upstream": {
      "image": "ghcr.io/tursodatabase/libsql-server@sha256:6dd3eb276d9d3604e4a48ac4a999a2e267814732d57d7e94c04ba71482333a67"
    }
  },
  "services": [
    {
      "name": "libsql",
      "source": {
        "image": "ghcr.io/tursodatabase/libsql-server@sha256:6dd3eb276d9d3604e4a48ac4a999a2e267814732d57d7e94c04ba71482333a67"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/sqld",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "SQLD_NODE",
      "service": "libsql",
      "description": "One server with no replication port. Leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "standalone"
    },
    {
      "key": "LIBSQL_URL",
      "service": "libsql",
      "description": "The database URL clients connect to. Use it as url in your libSQL client.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SQLD_HTTP_AUTH",
      "service": "libsql",
      "description": "Turns on auth with LIBSQL_AUTH_TOKEN. Leave as is.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIBSQL_AUTH_TOKEN",
      "service": "libsql",
      "description": "The token clients send, made fresh for each deploy. Use it as authToken in your libSQL client.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SQLD_HTTP_LISTEN_ADDR",
      "service": "libsql",
      "description": "Where the server listens. Leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0:8080"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "hosted-sqlite-libsql"
      }
    },
    "cli": "railway deploy --template hosted-sqlite-libsql",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a18115fc-4565-4d61-a195-611ee0801c88",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "e366cf5e-45fa-4260-913a-f12ba658bb20": {
                  "icon": "https://docs.turso.tech/favicon.svg",
                  "name": "libsql",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/tursodatabase/libsql-server@sha256:6dd3eb276d9d3604e4a48ac4a999a2e267814732d57d7e94c04ba71482333a67"
                  },
                  "variables": {
                    "SQLD_NODE": {
                      "isOptional": false,
                      "description": "One server with no replication port. Leave as is.",
                      "defaultValue": "standalone"
                    },
                    "LIBSQL_URL": {
                      "isOptional": false,
                      "description": "The database URL clients connect to. Use it as url in your libSQL client.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SQLD_HTTP_AUTH": {
                      "isOptional": false,
                      "description": "Turns on auth with LIBSQL_AUTH_TOKEN. Leave as is.",
                      "defaultValue": "basic:${{LIBSQL_AUTH_TOKEN}}"
                    },
                    "LIBSQL_AUTH_TOKEN": {
                      "isOptional": false,
                      "description": "The token clients send, made fresh for each deploy. Use it as authToken in your libSQL client.",
                      "defaultValue": "{{LIBSQL_AUTH_TOKEN}}"
                    },
                    "SQLD_HTTP_LISTEN_ADDR": {
                      "isOptional": false,
                      "description": "Where the server listens. Leave as is.",
                      "defaultValue": "0.0.0.0:8080"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "e366cf5e-45fa-4260-913a-f12ba658bb20": {
                      "mountPath": "/var/lib/sqld"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "libsql",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-17T16:14:42.276Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-17T12:54:22.878Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_fc242ae38a1446e295b4",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 17,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "libsql"
  }
}
