• Start
Sign In

Connect

Connect to an instance

The four routes to an instance: SurrealDB Studio, the CLI, a client SDK, and the HTTP API. Includes where to find the connection details.

An instance exposes one endpoint, and every client reaches it the same way.

What differs is the tool you use and how you authenticate.

RouteUse it for
SurrealDB StudioRunning queries and browsing data in a graphical interface.
CLIAn interactive SurrealQL shell, and one-off queries from a terminal or a script.
SDKApplication code in Rust, JavaScript, Python, .NET, PHP, and the other supported languages.
HTTPcURL, Postman, and any HTTP client, including bulk import.

You need:

  • An account. See Accounts and sign-in.

  • A running instance. See Create an instance.

  • A namespace and a database to work in. SurrealDB needs both to know where a query runs. See system structure.

  • Credentials, unless you connect from SurrealDB Studio, which authenticates with your own session.

The Connect menu of the instance in SurrealDB Studio holds the endpoint. It also produces a ready-made command or snippet for each route, with the details of your instance already filled in. Copying from there avoids transcription mistakes in the hostname.

surrealctl instance endpoint prints the same endpoint, and surrealctl instance token issues a token for it. Both are useful in scripts and in CI, where opening a browser is not an option. See surrealctl instances.

Was this page helpful?