SurrealDB logo

SurrealDB

Unified database and API platform for real‑time modern apps

SurrealDB delivers a cloud‑native, ACID‑compliant database with built‑in real‑time API, multi‑model support, and granular permissions, letting developers build secure, performant applications faster.

SurrealDB banner

Overview

Overview

SurrealDB is a cloud‑native database that also acts as a real‑time API backend. It supports tables, documents, and directed graph connections, allowing developers to store structured and unstructured data in a single engine. With ACID‑compliant multi‑row, multi‑table transactions, full‑text and geospatial indexing, and embedded JavaScript functions, it fits a wide range of modern workloads—from web and mobile apps to serverless functions.

Deployment

The platform can run as a standalone server, be embedded directly into an application, or be deployed in a distributed cluster. Installation is a single command on macOS, Linux, or Windows, and Docker images are available for container orchestration. For teams that prefer a managed solution, Surreal Cloud offers a hosted service with automatic scaling, backups, and monitoring, while still allowing self‑hosted deployments for full control.

Highlights

Built‑in real‑time API layer with WebSocket support
Multi‑model storage: tables, documents, and graph in one engine
ACID‑compliant transactions across single‑node and distributed clusters
Granular row‑level permissions and embedded JavaScript functions

Pros

  • Eliminates the need for a separate API layer, speeding development
  • Supports SQL, GraphQL, and WebSocket queries from client devices
  • Scales from single‑node to highly‑available distributed deployments
  • Simple installation via one‑line commands, Homebrew, Docker, or cloud

Considerations

  • Learning curve for multi‑model schema and permission system
  • Ecosystem and third‑party tooling are less mature than legacy databases
  • Advanced features like incremental views may require deeper expertise
  • Managed Surreal Cloud adds operational cost compared to self‑hosting

Managed products teams compare with

When teams consider SurrealDB, these hosted platforms usually appear on the same shortlist.

Azure Cosmos DB logo

Azure Cosmos DB

Fully managed, globally distributed NoSQL database service offering multi-model support with low-latency access worldwide

Backendless logo

Backendless

Backend-as-a-Service with database, realtime, auth, files, and cloud code

Firebase logo

Firebase

Backend services for auth, database, storage, and messaging

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Teams building real‑time collaborative applications
  • Projects that need a unified database and API without extra backend services
  • Developers wanting to query directly from browsers or edge functions
  • Applications requiring flexible schema and graph relationships

Not ideal when

  • Simple key‑value stores with minimal feature requirements
  • Environments mandating a single, well‑known relational database
  • Use cases that rely heavily on legacy ORM ecosystems
  • Scenarios demanding certified, audited compliance‑focused databases

How teams use it

Live collaborative editing tool

Provides instant data sync across users via WebSocket, eliminating a separate real‑time server.

Mobile app with offline‑first data

Embeds SurrealDB library to store structured and unstructured data locally, syncing seamlessly when connectivity returns.

Serverless function backend

Allows functions to execute SQL or GraphQL queries directly against SurrealDB, reducing latency and infrastructure overhead.

Geospatial analytics dashboard

Leverages built‑in geospatial queries and full‑text indexing to deliver fast location‑based insights.

Tech snapshot

Rust100%
Nix1%
Dockerfile1%
Shell1%
Makefile1%
DTrace1%

Tags

cloud-databasedistributed-databasegraph-databaserealtime-databasesurrealdbnosqldatabase-as-a-servicedevtoolsdistributediot-databasesqlsurrealwebdocument-databasebackend-as-a-servicedatabasedeveloper-toolsserverless

Frequently asked questions

Can SurrealDB be used as an embedded library?

Yes, it can run as an embedded library within applications, providing the same features as the standalone server.

What query languages does SurrealDB support?

It supports SQL‑style queries, GraphQL, and can be accessed via WebSocket, allowing both structured and unstructured data operations.

How does SurrealDB handle scaling?

It offers both single‑node mode and a highly‑scalable distributed mode that can be orchestrated with Docker, Kubernetes, or other container platforms.

Is there a hosted option?

Yes, Surreal Cloud provides a fully managed service with automatic backups, monitoring, and scaling.

What security features are included?

SurrealDB provides granular row‑level permissions and built‑in authentication mechanisms to control data access precisely.

Project at a glance

Active
Stars
30,894
Watchers
30,894
Forks
1,108
Repo age4 years old
Last commit4 hours ago
Primary languageRust

Last synced 3 hours ago