SurrealDB Docs Logo

Enter a search query

Upgrade command

The upgrade command upgrades SurrealDB to the latest version, nightly or a specified version.

BEFORE YOU START

Make sure you’ve installed SurrealDB — it should only take a second!

Command options

ArgumentsDescription

--nightly

optional

installs the latest nightly version of SurrealDB

--alpha

optional

installs the latest alpha version of SurrealDB

--beta

optional

installs the latest beta version of SurrealDB

--version

optional

installs a specific version of SurrealDB

--dry-run

optional

Does not actually replace the currently installed version of SurrealDB.

Example usage

This example shows how you can use the upgrade command to upgrade to the latest version of SurrealDB

surreal upgrade

Global install

If SurrealDB is installed globally on your system, you might need to run the upgrade command with elevated permissions.

sudo surreal upgrade

Install specific version

Use the --version flag to upgrade to a specific version of SurrealDB.

surreal upgrade --version [VERSION]

Install the alpha release

Available since: v1.5.3

Use the --alpha flag to upgrade to the latest alpha version of SurrealDB.

surreal upgrade --alpha

Install the beta release

Available since: v1.1.0

Use the --beta flag to upgrade to the latest beta version of SurrealDB.

surreal upgrade --beta

Install the nightly release

Use the --nightly flag to upgrade to the latest nightly version of SurrealDB.

surreal upgrade --nightly

Command help

To see the help information and usage instructions, in a terminal run the surreal upgrade --help command without any further arguments. This command gives general information on the arguments, inputs, and additional options for the upgrade command.

surreal upgrade --help

The output of the above command:

Upgrade to the latest stable version Usage: surreal upgrade [OPTIONS] Options: --nightly Install the latest nightly version --alpha Install the latest alpha version --beta Install the latest beta version --version <VERSION> Install a specific version --dry-run Don't actually replace the executable -h, --help Print help
© SurrealDB GitHub Discord Community Cloud Features Releases Install