Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

surrealdb

> 编程语言
Free

A scalable, distributed, collaborative, document-graph database, for the realtime web

33.4K stars0 likes1 views
WebsiteGitHub

About

A scalable, distributed, collaborative, document-graph database, for the realtime web

     

           

       

             


  What is SurrealDB?

SurrealDB is a multi-model database built in Rust designed to unify multiple data models into a single engine. SurrealDB combines document, graph, relational, time-series, geospatial and key-value data types with powerful search and retrieval functionalities (full-text, vector, hybrid) and real-time and event-driven capabilities, enabling developers to build powerful applications faster and more efficiently. SurrealDB can also be used as a backend-as-a-service given its support for end user authentication. Given that it’s a single Rust binary, SurrealDB can run embedded (in‐app), in the browser (via WebAssembly), in the edge, self-hosted as single backend node, or in a distributed cluster in the cloud.

SurrealDB is used for data-intensive systems such as applications requiring multiple data types, data layer for AI agents, knowledge graphs, real-time apps (e.g. recommendation engines, fraud detection systems) and embedded/edge systems. With SurrealDB, you can simplify your database and API infrastructure, reduce development time, and build secure, performant apps quickly and cost-effectively.

Key features of SurrealDB include:

  • Reduces development time: SurrealDB simplifies your database and API stack by removing the need for most server-side components, allowing you to build secure, performant apps faster and cheaper.
  • Multi-model: native multi-model support for document, graph, relational (enforcing schema and schemaless), time-series, geospatial and retrieval (full-text, vector, hybrid). This is offered natively through SurrealQL, SurrealDB's SQL-like intuitive query language.
  • Real-time collaborative API backend service: SurrealDB functions as both a database and an API backend service, enabling real-time collaboration.
  • Support for multiple querying languages: SurrealDB supports SQL querying from client devices, GraphQL, ACID transactions, WebSocket connections, structured and unstructured data, graph querying, full-text and vector indexing, and geospatial querying.
  • Granular access control: SurrealDB provides row-level permissions-based access control, giving you the ability to manage data access with precision.

View the features, the latest releases, and documentation.

  Contents

  • Database, API, and permissions
  • Tables, documents, and graph
  • Advanced inter-document relations and analysis. No JOINs. No pain.
  • Simple schema definition for frontend and backend development
  • Connect and query directly from web-browsers and client devices
  • Query the database with the tools you want
  • Realtime live queries and data changes direct to application
  • Scale effortlessly to hundreds of nodes for high-availability and scalability
  • Extend your database with JavaScript functions
  • Designed to be embedded or to run distributed in the cloud

  Features

  • Database server, or embedded library
  • Multi-row, multi-table ACID transactions
  • Single-node, or highly-scalable distributed mode
  • Record links and directed typed graph connections
  • Store structured and unstructured data
  • Incrementally computed views for pre-computed advanced analytics
  • Realtime-API layer, and security permissions built in
  • Store and model data in any way with tables, documents, and graph
  • Simple schema definition for frontend and backend development
  • Connect and query directly from web-browsers and client devices
  • Use embedded JavaScript functions for custom advanced functionality
  • MCP (Model Context Protocol) server for LLM and AI-agent integration

  Documentation

For guidance on installation, development, deployment, and administration, take a look at the following resources:

  • Documentation: https://surrealdb.com/docs
  • SurrealDB University: https://surrealdb.com/learn
  • Aeon's Surreal Renaissance (interactive book): https://surrealdb.com/learn/book

  Getting started

Getting started with SurrealDB is as easy as starting up the SurrealDB database server, choosing your platform, and integrating its SDK into your code. You can easily get started with your platform of choice by reading one of our tutorials.

Server side code

                 

Client side apps

       

  SurrealDB Cloud

SurrealDB is available as a managed cloud service. Forget about infrastructure operations, monitoring, backups or capacity planning. SurrealDB Cloud allows you to focus on building great products using the power and flexibility of SurrealDB in just a few clicks. Grow from prototype to enterprise-scale. The SurrealDB Cloud scalable architecture allows your database to evolve as your application grows, ensuring you are always ahead of demand. However if you want to deploy SurrealDB yourself, keep reading below.

  Installation

SurrealDB is designed to be simple to install and simple to run - using just one command from your terminal. In addition to traditional installation, SurrealDB can be installed and run with HomeBrew, Docker, or using any other container orchestration tool such as Docker Compose, Docker Swarm, Rancher, or in Kubernetes.

 Install on macOS

The quickest way to get going with SurrealDB on macOS is to use Homebrew. This will install both the command-line tools, and the SurrealDB server as a single executable. If you don't use Homebrew, follow the instructions for Linux below to install SurrealDB.

bash
brew install surrealdb/tap/surreal

If you want to test a version with the latest features, published every night, install the nightly version:

bash
brew install surrealdb/tap/surreal-nightly

 Install on Linux

The easiest and preferred way to get going with SurrealDB on Unix operating systems is to install and use the SurrealDB command-line tool. Run the following command in your terminal and follow the on-screen instructions.

bash
curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh

If you want to run a beta release, before the next version is released, the beta version:

bash
curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh -s -- --beta

If you want to test a version with the latest features, published every night, install the nightly version:

bash
curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh -s -- --nightly

 Install on Windows

The easiest and preferred way to get going with SurrealDB on Windows is to install and use the SurrealDB command-line tool. Run the following command in your terminal and follow the on-screen instructions.

powershell
iwr https://windows.surrealdb.com -useb | iex

If you want to test a version with the latest features, published every night, install the nightly version:

powershell
iex "& { $(irm https://windows.surrealdb.com) } -Nightly"

 Run using Docker

Docker can be used to manage and run SurrealDB database instances without the need to install any command-line tools. The SurrealDB docker container contains the full command-line tools for importing and exporting data from a running server, or for running a server itself.

bash
docker run --rm --pull always --name surrealdb -p 8000:8000 surrealdb/surrealdb:latest start

For just getting started with a development server running in memory, you can pass the container a basic initialization to set the user and password as root and enable logging.

bash
docker run --rm --pull always --name surrealdb -p 8000:8000 surrealdb/surrealdb:latest start --log info --user root --pass root memory

  Quick look

With strongly-typed data types, data can be fully modelled right in the database.

surrealql
UPDATE person SET
    waist = <int> "34",
    height = <float> 201,

Issues· 683 open

View all issuesOpen on GitHub
  • #7539

    Bug: index on an array field gives `acl = x` two answers (count 1, rows none), and `CONTAINS`/`CONTAINSANY` never use it

    triageUpdated Sep 30, 2026
  • #7554

    panicked at surrealdb/kvs-rocksdb/src/owned_tx.rs

    triagetopic:stabilityUpdated Sep 30, 2026
  • #7553

    Bug: embedded engine: `DEFINE TABLE IF NOT EXISTS` succeeds, but the next read in the same session reports the table does not exist (concurrent first access to a fresh database)

    Updated Sep 30, 2026
  • #7541

    3.3.0: REBUILD INDEX on a large DiskANN (I8, 4096-dim) index fails with TransactionConflict; CONCURRENTLY leaves compacting:true with KNN ~270x slower

    Updated Sep 29, 2026
  • #7552

    Bug: concurrent writes during `DEFINE`/`REBUILD INDEX … CONCURRENTLY` can leave stale (and occasionally missing) index entries

    Updated Sep 29, 2026
  • #7547

    Bug: `TIMEOUT $param` on a SELECT inside a closure is silently ignored (the parameter reads as NONE)

    Updated Sep 29, 2026
  • #7551

    Bug: DEFINE INDEX … CONCURRENTLY does not become ready while the table receives sustained writes (RocksDB)

    Updated Sep 29, 2026
  • #7550

    Bug: `DEFINE INDEX … CONCURRENTLY` can permanently miss writes committed while the build starts (first build only; `REBUILD INDEX … CONCURRENTLY` does not have this window)

    Updated Sep 29, 2026
  • #7542

    HNSW: a KNN query during DEFINE INDEX ... CONCURRENTLY returns the whole table (3.2.4) or no rows (nightly), with no error

    Updated Sep 29, 2026
  • #7543

    HNSW: INFO FOR INDEX reports ready for minutes while the graph is still being built, and KNN meanwhile returns fewer than K rows (3.2.4, 3.3.0-beta.3; fixed on nightly)

    Updated Sep 29, 2026

> Tags

Rustbackend-as-a-servicecloud-databasedatabase

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedDec 4, 2026
Category编程语言
PricingFree

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言