Back to top
Documentation Command-line tool Upgrade command

Upgrade command

This command upgrades SurrealDB to the latest version, nightly or a specified version

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

Command options

Argument Description
--nightly Optional Install the nightly version of SurrealDB
--version Optional Install a specific version of SurrealDB
--dry-run Optional Do not actually replace the currently installed binary

Example usage

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

user@localhost % surreal upgrade

Global install

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

user@localhost % sudo surreal upgrade

Install nightly

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

user@localhost % surreal upgrade --nightly

Install specific version

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

user@localhost % surreal upgrade --version v1.0.0-beta.10

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.

user@localhost % surreal upgrade --help
Upgrade to the latest stable version

Usage: surreal upgrade [OPTIONS]

      --nightly            Install the latest nightly version
      --version <VERSION>  Install a specific version
      --dry-run            Don't actually replace the executable
  -h, --help               Print help