Connecting to SurrealDB on Layerbase Cloud

SurrealDB uses HTTP and SDK clients for multi-model data, SurrealQL, and graph-shaped application models.

Best for: Multi-model prototypes, graph-like data, flexible schemas, and apps built around SurrealQL.

1

Open your database in the dashboard

Go to /cloud, click the database you just created, and the connection panel shows the host, port, username, password, and a ready-to-paste connection string for the engine.

Use the generated namespace, database, username, and password from the dashboard.

2

TLS is required, on by default

Use the https:// endpoint from Quick Connect.

SurrealDB HTTP API over HTTPS

3

Use any standard client

SurrealDB works with the normal client family for that engine. Start with the dashboard snippet, then move the same URL and credentials into your app environment.

If your client has separate direct, pooled, TLS, or HTTP options, prefer the exact variant shown in Quick Connect.

bashSurrealDB
curl -u root:password -H "NS: app" -H "DB: app" "https://your-host.cloud.layerbase.dev/sql"

SurrealDB notes

  • If SurrealDB is not enabled for Cloud creation, run it locally with SpinDB while cloud support is gated.
  • SurrealQL-specific client setup varies by SDK.