SURREAL_ASYNC_EVENT_PROCESSING_INTERVALAvailable since: v3.0.0 | async-event-processing-interval | start | 5s | A duration | The interval at which to process async events. |
SURREAL_AUTH_LEVEL | auth-level | export, import, sql | root | root, namespace, ns, database, db | Authentication level to use when connecting. |
SURREAL_BIND | bind | start | 127.0.0.1:8000 | String to an address | The hostname or IP address(es) to listen for connections on. |
SURREAL_CAPS_ALLOW_ALL | allow-all | start | false | true, false | Allow all capabilities. |
SURREAL_CAPS_ALLOW_ARBITRARY_QUERY | allow-arbitrary-query | start | none | guest, record, system (comma-separated) | Allows arbitrary queries to be used by user groups except when specifically denied. Alternatively, you can provide a comma-separated list of user groups to allow specifically denied user groups to prevail over any other allowed user group. |
SURREAL_CAPS_ALLOW_EXPERIMENTAL | allow-experimental | start | none | files, surrealism (comma-separated) | Allow execution of experimental features. |
SURREAL_CAPS_ALLOW_FUNC | allow-funcs | start | false | true, false, comma-separated strings to function paths | Allow execution of all functions except for functions that are specifically denied. |
SURREAL_CAPS_ALLOW_GUESTS | allow-guests | start | true | true, false | Allow guest users to execute queries. |
SURREAL_CAPS_ALLOW_NET | allow-net | start | none | Comma-separated list of paths | Allow all or certain outbound network access. |
SURREAL_CAPS_ALLOW_SCRIPT | allow-scripting | start | true | true, false | Allow execution of embedded scripting functions. |
SURREAL_CAPS_ALLOW_INSECURE_STORABLE_CLOSURESAvailable since: v2.5.0 | allow-insecure-storable-closures | start | false | true, false | Takes a boolean. Prevents closures from being stored, which eliminates a potential attack surface. For version 2.5.0, this can still be allowed by using this capability. |
SURREAL_CAPS_DENY_ALL | deny-all | start | false | true, false | Deny all capabilities. |
SURREAL_CAPS_DENY_FUNC | deny-funcs | start | false | true, false, comma-separated list | Deny execution of all or certain functions. |
SURREAL_CAPS_DENY_GUESTS | deny-guests | start | true | true, false | Deny guest users from executing queries. |
SURREAL_CAPS_DENY_NET | deny-net | start | true | true, false, comma-separated list | Deny all or certain outbound access paths. |
SURREAL_CAPS_DENY_SCRIPT | deny-scripting | start | true | true, false | Deny execution of embedded scripting functions. |
SURREAL_CHANGEFEED_GC_INTERVAL | changefeed-gc-interval | start | 30s | A duration | The interval at which to perform changefeed garbage collection. |
SURREAL_CLIENT_IP | client-ip | start | none | none, socket, CF-Connecting-IP, Fly-Client-IP, True-Client-IP, X-Real-IP, X-Forwarded-For | The method of detecting the client’s IP address. |
SURREAL_DATABASE | database | sql | main | A string | The database selected when starting the REPL. |
SURREAL_DATABASE | database | export, import | none | A string | The database selected for the import or export. |
SURREAL_DEFAULT_DATABASEAvailable since: v3.0.0 | default-database | start | main | A string | The default database to use when starting a SurrealDB instance. |
SURREAL_DEFAULT_NAMESPACEAvailable since: v3.0.0 | default-namespace | start | main | A string | The default namespace to use when starting a SurrealDB instance. |
SURREAL_HIDE_WELCOME | hide-welcome | sql | false | true, false | Whether to show the welcome message when starting the REPL. |
SURREAL_IMPORT_FILE | import-file | start | none | A file path | Path to a SurrealQL file that will be imported when starting the server. |
SURREAL_INDEX_COMPACTION_INTERVALAvailable since: v3.0.0 | index-compaction-interval | start | 5s | A duration | The interval at which to perform changefeed garbage collection. |
SURREAL_KEY | key | start | none | A string 16, 24, or 32 bytes long | Encryption key to use for on-disk encryption. Not currently in use. |
SURREAL_KVS_CA | kvs-ca | start | none | String to a path | Path to the CA file used when connecting to the remote KV store. |
SURREAL_KVS_CRT | kvs-crt | start | none | String to a path | Path to the certificate file used when connecting to the remote KV store. |
SURREAL_KVS_KEY | kvs-key | start | none | String to a path | Path to the private key file used when connecting to the remote KV store. |
SURREAL_LOG | log | start, fix | info | none, full, error, warn, info, debug, trace | The logging level for the database server. |
SURREAL_LOG_FILE_ENABLEDAvailable since: v2.4.0 | log-file-enabled | start | false | true, false | Toggles file output. |
SURREAL_LOG_FILE_FORMATAvailable since: v2.4.0 | log-file-format | start | none | text, json | The format for log file output. |
SURREAL_LOG_FILE_LEVELAvailable since: v2.4.0 | log-file-level | start | none | none, full, error, warn, info, debug, trace | Override the logging level for file output |
SURREAL_LOG_FILE_NAMEAvailable since: v2.4.0 | log-file-name | start | surrealdb.log | String to a file | Filename for logs (default: surrealdb.log) |
SURREAL_LOG_FILE_PATHAvailable since: v2.4.0 | log-file-path | start | logs | String to a path | Sets the directory for logs |
SURREAL_LOG_FILE_ROTATIONAvailable since: v2.4.0 | log-file-rotation | start | daily | daily, hourly, never | Sets the rotation duration for logs. |
SURREAL_LOG_FORMATAvailable since: v2.4.0 | log-format | start | text | text, json | Sets the format for logs. |
SURREAL_LOG_OTEL_LEVEL
Available since: v2.4.0 | log-otel-level | start | SURREAL_LOG logging level | none, full, error, warn, info, debug, trace | Override the logging level for OpenTelemetry |
SURREAL_LOG_SOCKETAvailable since: v3.0.0 | log-socket | start | none | String to a host:port | Send logs to the specified host:port |
SURREAL_LOG_SOCKET_FORMATAvailable since: v3.0.0 | log-socket-format | start | text | text, json | Set the format of the logs to the socket. |
SURREAL_LOG_SOCKET_LEVELAvailable since: v3.0.0 | log-socket-level | start | SURREAL_LOG logging level | none, full, error, warn, info, debug, trace | Override the logging level for socket logs. Possible values: none, full, error, warn, info, debug, trace |
SURREAL_NAME | name | ml export | none | A string | The name of the model. |
SURREAL_NAMESPACE | namespace | sql | main | A string | The namespace to connect to via the REPL. |
SURREAL_NAMESPACE | namespace | export, import | none | A string | The namespace selected for the import/export operation. |
SURREAL_NO_BANNER | no-banner | start | false | true, false | Whether to hide the startup banner. |
SURREAL_NO_DEFAULTSAvailable since: v3.0.0 | no-defaults | start | false | true, false | Whether to disable default namespace and database creation. Conflicts with SURREAL_DEFAULT_DATABASE and SURREAL_DEFAULT_NAMESPACE, which set a default value for namespace and database for a new instance. |
SURREAL_NO_IDENTIFICATION_HEADERS | no-identification-headers | start | false | true, false | Whether to suppress the server name and version headers. |
SURREAL_NODE_MEMBERSHIP_CHECK_INTERVAL | node-membership-check-interval | start | 15s | A duration | The interval at which to process and archive inactive nodes. |
SURREAL_NODE_MEMBERSHIP_CLEANUP_INTERVAL | node-membership-cleanup-interval | start | 300s | A duration | The interval at which to process and cleanup archived nodes. |
SURREAL_NODE_MEMBERSHIP_REFRESH_INTERVAL | node-membership-refresh-interval | start | 3s | A duration | The interval at which to refresh node registration information. |
SURREAL_PASS | pass | export, import, sql, start | none | A string | Database authentication password to use when connecting. |
| SURREAL_PATH | path | fix, start | memory | A string | Database path used for storing data. As a required argument (albeit with a default), it is not passed in via --path. |
SURREAL_PLANNER_STRATEGYAvailable since: v3.0.0 | planner-strategy | start | best-effort | best-effort|compute-only|all-read-only | Which strategy to use with the new query planner introduced in SurrealDB 3.0. The default setting uses the new planner for read-only statements, falling back to the previous compute planner on unimplemented paths. The new planner can be skipped entirely by using compute-only. |
SURREAL_QUERY_TIMEOUT | query-timeout | start | none | A duration | The maximum duration that a set of statements can run for. |
SURREAL_SLOW_QUERY_LOG_THRESHOLD
Available since: v2.3.8 | slow-log-threshold | start | none | A duration | A duration specifying the minimum execution time after which a log is made to indicate a slow query |
SURREAL_SLOW_QUERY_LOG_PARAM_ALLOW
slow-log-param-allowAvailable since: v2.3.9 | slow-log-param-allow | start | none | Comma-separated strings | A comma-separated list of parameter names to include in slow query logs. |
SURREAL_SLOW_QUERY_LOG_PARAM_DENYAvailable since: v2.3.9 | slow-log-param-deny | start | none | Comma-separated strings | A comma-separated list of parameter names to omit from slow query logs. |
SURREAL_STRICT | strict | start | false | true, false | Whether strict mode is enabled on this database instance. |
SURREAL_TEMPORARY_DIRECTORY | temporary-directory | start | none | String to a directory | Sets the directory for storing temporary database files |
SURREAL_TOKEN | token | export, import, sql | none | A string | Authentication token in JWT format to use when connecting. |
SURREAL_TRANSACTION_TIMEOUT | transaction-timeout | start | none | A duration | The maximum duration that any single transaction can run for. |
SURREAL_UNAUTHENTICATED | unauthenticated | start | false | true, false | Whether to allow unauthenticated access. |
SURREAL_USER | user | export, import, sql, start | none | A string | Database authentication username to use when connecting. |
SURREAL_VERSION | version | ml export | none | A string | The version of the ML model. |
SURREAL_WEB_CRT | web-crt | start | none | String to a path | Path to the certificate file for encrypted client connections. |
SURREAL_WEB_KEY | web-key | start | none | String to a path | Path to the private key file for encrypted client connections. |