Use this tutorial to install SurrealDB on Windows operating systems using the SurrealDB install script, or using third-party package managers like Chocolatey or third-party like Scoop. Both the SurrealDB database server and the SurrealDB command-line tool are packaged and distributed as a single executable file which is easy to install and uninstall.
Installing SurrealDB using the install script
To get started, you can use the SurrealDB install script. This script securely downloads the latest version for the platform and CPU type. It installs SurrealDB into the C:\Program Files\SurrealDB folder, falling back to a user-specified folder if necessary.
Updating SurrealDB
To ensure that you are using the latest stable version (v3.0.4), update SurrealDB using the following command.
Confirming the installation
Once installed, you can run the SurrealDB command-line tool by using the surreal command. To check whether the installation was successful run the following command in your terminal.
The result should look similar to the output below, confirming that the SurrealDB command-line tool was installed successfully.
Installing SurrealDB using Chocolatey
If you use the Chocolatey package manager, then you can quickly install SurrealDB with one command. This will install a single executable containing both the command-line tool and the SurrealDB server.
Updating SurrealDB
To ensure that you are using the latest stable version (v3.0.4), update SurrealDB using the following command.
Installing SurrealDB using Scoop
If you use the Scoop package manager, then you can quickly install SurrealDB with one command. This will install a single executable containing both the command-line tool and the SurrealDB server.
Updating SurrealDB
To ensure that you are using the latest stable version (v3.0.4), update SurrealDB using the following command.
Troubleshooting
DLLs not installed
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.