The 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.
Installing with the install script
The install script downloads surreal and the database for your platform and CPU type, checks each download against its published SHA-256, and installs surreal into /usr/local/bin. If that folder is not writable, it installs into ~/.surrealdb and prints the PATH line to add.
curl -sSf https://install.surrealdb.com | shPass options to the script after sh -s --. The database is installed by default; --no-db installs surreal alone, and the database installs on first use instead.
curl -sSf https://install.surrealdb.com | sh -s -- --no-dbSee Install the SurrealDB CLI for every option, including the SURREAL_CLI_INSTALL_DB environment variable and installing the Cloud component alongside.
Installing a specific version of the database
Use -v or --version to install and pin a database release.
curl -sSf https://install.surrealdb.com | sh -s -- --version <version>Updating
Once installed, surreal upgrades itself and every installed component. The database stays on its current major line.
surreal upgradeTo move the database to another release, name it: surreal upgrade db@<version>. See Managing components.
Confirming the installation
Run the following command to check that the database component runs.
surreal db version3.3.4 for linux on x86_64To list surreal and every component with the version that runs, use surreal version.
Troubleshooting
A different surreal runs
An older standalone database earlier on your PATH shadows the new surreal, and the install script warns when it finds one. Remove the older executable, or put the install folder first on PATH.