Skip to content

Running

/

Installation

Windows

The PowerShell install script installs surreal, the SurrealDB command-line tool, and the database with it. surreal installs, updates and runs the database as a component, so surreal db start works from then on without a network connection. Chocolatey and Scoop are also available.

The install script downloads surreal and the database, checks each download against its published SHA-256, and installs surreal.exe into C:\Program Files\SurrealDB from an elevated shell, or %LOCALAPPDATA%\SurrealDB otherwise. It adds that folder to your user PATH.

irm https://windows.surrealdb.com | iex

irm | iex cannot pass options. To pass them, run the script as a script block. The database is installed by default; -NoDb installs surreal alone, and the database installs on first use instead.

& ([scriptblock]::Create((irm https://windows.surrealdb.com))) -NoDb

The SURREAL_CLI_INSTALL_DB environment variable (1 or 0) sets the same switch for callers that cannot pass options. See Install the SurrealDB CLI for every option, including installing the Cloud component alongside.

Use -Version to install and pin a database release.

& ([scriptblock]::Create((irm https://windows.surrealdb.com))) -Version <version>

Once installed, surreal upgrades itself and every installed component. The database stays on its current major line.

surreal upgrade

To move the database to another release, name it: surreal upgrade db@<version>. See Managing components.

Run the following command to check that the database component runs.

surreal db version
Sample output
3.3.4 for windows on x86_64

To list surreal and every component with the version that runs, use surreal version.

If you use the Chocolatey package manager, then you can quickly install SurrealDB with one command. This installs the database as a single surreal executable.

choco install surreal

To ensure that you are using the latest stable version (v3.3.4), update SurrealDB using the following command.

choco update surreal

If you use the Scoop package manager, then you can quickly install SurrealDB with one command. This installs the database as a single surreal executable.

scoop install surrealdb

To ensure that you are using the latest stable version (v3.3.4), update SurrealDB using the following command.

scoop update surrealdb

Attempting to open the executable at the install location throws errors that the following DLLs are not installed

If you encounter an error saying that the following DLLs are not installed:

  • VCRUNTIME140.dll

  • MSVCP140.dll

  • VCRUNTIME140_1.dll

Then you may need to install the Microsoft Visual C++ Redistributable for Visual Studio.

Was this page helpful?