• Start
Sign In

Overview

Embedding SurrealDB

In this section, you will find detailed instructions on how to embed SurrealDB into your application depending on your programming language.

Instead of connecting to a remote server, you can run SurrealDB directly inside your application process. Embedded mode gives you the full query engine with no network overhead, which is useful for local-first applications, edge deployments, and testing.

The following languages are supported:

When embedding SurrealDB in web browsers, you have two options:

  • IndexedDB: SurrealDB can be configured to use IndexedDB to store and persist data within the web browser. SurrealDB first serializes both keys and values into a Uint8Array, utilizing IndexedDB as a binary key-value store - offering good performance, and with the ability to offer all of the functionality and features that SurrealDB offers when running in alternative ways.

  • SDK: Alternatively, you can use the SurrealDB SDK to connect to a remote SurrealDB instance instead of using IndexedDB for local persistence.

Was this page helpful?