NEW

SurrealDB 4 is here, introducing SurrealDB Earth and SurrealDS!

Learn more

How to install SurrealDB,
wherever you run it

Cloud. Fully managed on SurrealDB Cloud from a free tier, or serverless on SurrealDB Earth with nothing to install.
Binary. One surreal binary for macOS, Linux, Windows and Docker, holding the CLI and the server together.
Latest. SurrealDB
v4.0.0
, with its release notes and those of every earlier version on the releases page.

01 |INSTALL THE CLI

Choose your platform. One command installs the CLI and the server as a single executable.

macOS

Install on macOS

On macOS, run the SurrealDB install script, or install with Homebrew. Either way you get the command-line tools and the SurrealDB server as a single executable.

# Direct install
curl -sSf https://install.surrealdb.com | sh

# Homebrew
brew install surrealdb/tap/surreal
Linux

Install on Linux

The preferred way to get going on Unix systems is the SurrealDB install script. Run the following in your terminal and follow the on-screen instructions.

curl -sSf https://install.surrealdb.com | sh
Windows

Install on Windows

On Windows, install the SurrealDB command-line tool by running the following in PowerShell.

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

Install on Docker

Docker lets you run SurrealDB without installing any CLI tools locally. The container includes the full CLI for import/export and for running a server.

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

02 |VERIFY AND RUN

Confirm the install, then start. Check the CLI is on your path and bring up a local server.

Version

Check the version

Confirms the CLI is on your path and which release it is.

surreal version
Start

Start a local server

An in-memory instance on port 8000, with a root user for the session.

surreal start --user root --pass secret memory
Persist

Persist to disk

The same server with its data kept in a SurrealKV directory.

surreal start --user root --pass secret surrealkv://data
Shell

Open a SQL shell

An interactive SurrealQL prompt against the running server.

surreal sql --endpoint http://localhost:8000 --user root --pass secret --ns test --db test

THE PLATFORM

Everything an application and its agents know. Five surfaces, one engine.

IN PRODUCTION

Trusted at scale. Samsung, Nvidia, Verizon, Tencent, and Walmart run on SurrealDB.

14,000+

Developers building on SurrealDB Cloud

4M+

Developers building on SurrealDB worldwide

FROM THE TEAMS

SurrealDB gives us a foundation where we can unify semantic search, knowledge graphs, and AI-driven decision making without stitching together multiple systems. Collapsing responsibility into SurrealDB has become our default engineering posture.
Justin Foley

VP of Engineering, Later

GET STARTED

Start building with SurrealDB. Read the docs, try it in the cloud, or start building.