Remote storage (Enterprise)
The Lab utilizes remote storage to securely store the shared data, ensuring sensitive information is protected. Without remote storage, Lab stores data in the browser where it becomes hard to share your progress with your team members or in cases when you use the Lab from different location or different browser.
Environment: Remote storage is available exclusively when the Lab is started in a Docker environment.
How to set it up
Remote storage requires a valid Memgraph Enterprise license configured on the Lab side. Ensure that you configure the following environment variables when running Lab with Docker:
Variable | Description | Type |
---|---|---|
ENTERPRISE_LICENSE_ORG_NAME | Enterprise license organization name | string |
ENTERPRISE_LICENSE_KEY | Enterprise license key | string |
For example:
docker run \
-p 3000:3000 \
-e ENTERPRISE_LICENSE_ORG_NAME="My company" \
-e ENTERPRISE_LICENSE_KEY="key..." \
memgraph/lab
The enterprise license will be checked once you set up the remote storage. Remote storage should be a new Memgraph instance or a new Memgraph database in a multi-tenant environment.
Using a standalone Memgraph instance as remote storage
In this scenario, Memgraph should be used only for Lab purposes to store query-sharing information. Memgraph can be a community or enterprise version. Make sure your Memgraph is running and then set the following environment variables so Lab can connect to it for remote storage capability.
These two environment variables are required:
Variable | Description | Type |
---|---|---|
STORAGE_MG_HOST | Memgraph host for the Lab remote storage | string |
STORAGE_MG_PORT | Memgraph port for the Lab remote storage | number |
These variables are optional and depend on the configuration of the Memgraph instance:
Variable | Description | Type |
---|---|---|
STORAGE_MG_IS_ENCRYPTED | Memgraph SSL on/off for the Lab remote storage | boolean |
STORAGE_MG_USERNAME | Memgraph username for the Lab remote storage | string |
STORAGE_MG_PASSWORD | Memgraph password for the Lab remote storage | string |
If your Memgraph instance has SSL defined and there is a username lab
and password lab
, the complete Docker command should look like this:
docker run \
-p 3000:3000 \
-e ENTERPRISE_LICENSE_ORG_NAME="My company" \
-e ENTERPRISE_LICENSE_KEY="key..." \
-e STORAGE_MG_HOST=127.0.0.1 \
-e STORAGE_MG_PORT=7867 \
-e STORAGE_MG_IS_ENCRYPTED=true \
-e STORAGE_MG_USERNAME=lab \
-e STORAGE_MG_PASSWORD=lab \
memgraph/lab
If there is no username or password and Memgraph is accepting non-SSL connections, omit the optional environment variables:
docker run \
-p 3000:3000 \
-e ENTERPRISE_LICENSE_ORG_NAME="My company" \
-e ENTERPRISE_LICENSE_KEY="key..." \
-e STORAGE_MG_HOST=127.0.0.1 \
-e STORAGE_MG_PORT=7867 \
memgraph/lab
Upon successful configuration, you should see the following log output when starting the Lab:
INFO: [lab] Checking connectivity to remote storage *** with a timeout of *** ms...
INFO: [lab] Enterprise license applied successfully. Enjoy the premium features.
...
INFO: [lab] Remote storage *** successfully connected.
Using a Memgraph multi-tenant environment as remote storage
This scenario works only with Memgraph Enterprise because multi-tenancy is an enterprise feature. In a multi-tenant environment, you can use your existing Memgraph instance with a new database that Lab will use for remote storage to store information.
These three environment variables are required:
Variable | Description | Type |
---|---|---|
STORAGE_MG_HOST | Memgraph host for the Lab remote storage | string |
STORAGE_MG_PORT | Memgraph port for the Lab remote storage | number |
STORAGE_MG_DATABASE_NAME | Memgraph database name for the Lab remote storage | string |
These variables are optional and depend on the configuration of the Memgraph instance:
Variable | Description | Type |
---|---|---|
STORAGE_MG_IS_ENCRYPTED | Memgraph SSL on/off for the Lab remote storage | boolean |
STORAGE_MG_USERNAME | Memgraph username for the Lab remote storage | string |
STORAGE_MG_PASSWORD | Memgraph password for the Lab remote storage | string |
Let’s say that you already created a new database called lab
in your enterprise Memgraph instance for remote storage. For better
security, it is recommended to always define usernames and passwords.
However, if it accepts non-SSL connections with no username or
password, the following command should make Lab successfully connect
to the remote storage:
docker run \
-p 3000:3000 \
-e ENTERPRISE_LICENSE_ORG_NAME="My company" \
-e ENTERPRISE_LICENSE_KEY="key..." \
-e STORAGE_MG_HOST=127.0.0.1 \
-e STORAGE_MG_PORT=7867 \
-e STORAGE_MG_DATABASE_NAME=lab \
memgraph/lab
If your Memgraph instance has SSL defined and there is a username lab
and password lab
, the complete Docker command should look like this:
docker run \
-p 3000:3000 \
-e ENTERPRISE_LICENSE_ORG_NAME="My company" \
-e ENTERPRISE_LICENSE_KEY="key..." \
-e STORAGE_MG_HOST=127.0.0.1 \
-e STORAGE_MG_PORT=7867 \
-e STORAGE_MG_IS_ENCRYPTED=true \
-e STORAGE_MG_USERNAME=lab \
-e STORAGE_MG_PASSWORD=lab \
memgraph/lab
Upon successful configuration, you should see the following log output when starting the Lab:
INFO: [lab] Checking connectivity to remote storage *** with a timeout of *** ms...
INFO: [lab] Enterprise license applied successfully. Enjoy the premium features.
...
INFO: [lab] Remote storage *** successfully connected.