Skip to content

Installation

Two installation methods are supported: an automated method, which fetches and installs the module from within SurrealDB itself, and a manual method, which installs a binary you have downloaded yourself.

Regardless of method, the SurrealDB process must be started with the following:

  • SURREAL_CAPS_ALLOW_EXPERIMENTAL=files,surrealism set in its environment
  • --allow-net (see Configuration for details on network-access requirements)

Each method below adds further requirements of its own.

In addition to the prerequisites above, --allow-eval-query must be passed to SurrealDB.

  1. Define $s3_module_config as described in Configuration.

  2. Run the following query to fetch the installer and install the module:

    -- Import fn::install_s3
    eval::surql(<string>http::get("https://surreal-s3.yuuna.dev/setup.surql"));
    -- Arguments:
    -- version: Option<String> - Specify a version, or none for latest
    -- db_url: Option<String> - The URL the db can be reached at locally;
    -- defaults to http://127.0.0.1:8000
    fn::install_s3(none, none);