Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.
Version: Developer

Set up a custom storage provider

Custom storage providers let administrators create free-form configurations that create Docker volumes and map them into containers. Configuration is driven through the Volume Config and Mount Config options, in accordance with the Docker volume plugin and driver options you want.

Unlike the other providers, storage mappings for custom storage providers can be configured only by administrators. No settings are exposed on the storage mappings for custom storage providers, so they serve only as an association by the administrator to a Workspace, group, or user.

S3 example

This example uses variable substitution so each user gets their own storage location.

NameCustom Provider
Storage Provider TypeCustom
Enabledchecked
Default Target/custom-{username}
Volume Config (S3 Example)
{
"driver": "rclone",
"driver_opts": {
"type": "s3",
"path": "bucket-name/folder/{user_id}",
"vfs-cache-mode": "off",
"dir-cache-time": "10s",
"s3-provider": "AWS",
"s3-env-auth": "false",
"s3-access-key-id": "--redacted--",
"s3-secret-access-key": "--redacted--",
"s3-region": "us-east-1",
"uid": "1000",
"gid": "1000",
"allow_other": "true"
}
}
Mount Config{}

S3 with file-based encryption example

This example uses the Rclone storage driver's crypt remote as a wrapper around the previous S3 example. It adds file-based encryption to each user's files. Files are encrypted and decrypted transparently in the Kasm session, and they are obfuscated and encrypted when viewed from the S3 console.

Encrypted File

Encrypted File

Obfuscated Filename of Encrypted File

Obfuscated Filename of Encrypted File
NameCustom Provider
Storage Provider TypeCustom
Enabledchecked
Default Target/custom-{username}
Volume Config (S3 Example)
{
"driver": "rclone",
"driver_opts": {
"type": "crypt",
"vfs-cache-mode": "off",
"dir-cache-time": "10s",
"crypt-filename-encryption": "standard",
"crypt-password": "{user_crypt_password}",
"crypt-password2": "{user_crypt_salt}",
"crypt-remote": ":s3,provider=AWS,env_auth=false,access_key_id=--redacted--,secret_access_key=--redacted--,region=us-east-1:bucket-name/folder/{user_id}",
"uid": "1000",
"gid": "1000",
"allow_other": "true"
}
}
Mount Config{}

Azure Blob example

The Azure Blob storage account name and key are in the Security + networking, then Access keys section. For more information on the Azure Blob parameters, see the Rclone Azure Blob documentation.

NameCustom Provider
Storage Provider TypeCustom
Enabledchecked
Default Target/custom
Volume Config (Azure Blob Example)
{
"driver": "rclone",
"driver_opts": {
"type": "azureblob",
"path": "container-name",
"azureblob-account": "storage-account-name",
"azureblob-key": "storage-key",
"uid": "1000",
"gid": "1000",
"allow_other": "true"
}
}
Mount Config{}

Add Storage Mapping

Add Storage Mapping

SMB/CIFS example

For more information on the SMB parameters, see the Rclone SMB documentation. The smb-pass option must be an obscured value produced by the Rclone obscure utility. Install the latest version of Rclone on a separate system and use the rclone obscure utility to generate the obscured password for the configuration.

NameCustom Provider
Storage Provider TypeCustom
Enabledchecked
Default Target/custom
Volume Config (SMB Example)
{
"driver": "rclone",
"driver_opts": {
"type": "smb",
"path": "optional/share/path",
"smb-host": "192.168.1.2",
"smb-user": "username",
"smb-pass": "--obscured-pass-with-rclone-obscure--",
"smb-domain": "WORKGROUP",
"uid": "1000",
"gid": "1000",
"allow_other": "true"
}
}
Mount Config{}
note

Many of the storage provider examples include default storage driver options used by Rclone. These options work well with Kasm in its default configuration, and administrators can adjust them as needed. The available options often vary by provider plugin, for example Google Drive compared with OneDrive.

The Rclone Docker plugin is installed by default as part of the standard Workspace install. For more information about Rclone driver options, see the Rclone Docker documentation.

Digital Ocean Spaces example

NameCustom Provider
Storage Provider TypeCustom
Enabledchecked
Default Target/custom
Volume Config (S3 Example)
{
"driver": "rclone",
"driver_opts": {
"type": "s3",
"path": "bucket-name/folder/",
"vfs-cache-mode": "off",
"dir-cache-time": "10s",
"s3-provider": "DigitalOcean",
"s3-env-auth": "false",
"s3-access-key-id": "--redacted--",
"s3-secret-access-key": "--redacted--",
"s3-endpoint": "fra1.digitaloceanspaces.com",
"uid": "1000",
"gid": "1000",
"allow_other": "true"
}
}
Mount Config{}

Google Cloud Storage example

NameCustom Provider
Storage Provider TypeCustom
Enabledchecked
Default Target/custom
Volume Config (S3 Example)
{
"driver": "rclone",
"driver_opts": {
"type": "s3",
"path": "bucket-name/folder/",
"vfs-cache-mode": "off",
"dir-cache-time": "10s",
"s3-provider": "GCS",
"s3-env-auth": "false",
"s3-access-key-id": "--redacted--",
"s3-secret-access-key": "--redacted--",
"s3-endpoint": "https://storage.googleapis.com",
"uid": "1000",
"gid": "1000",
"allow_other": "true"
}
}
Mount Config{}

Create the storage mapping

Storage mappings for custom storage providers can be configured only by administrators.

  1. From the Workspaces app, select the Workspace, user, or group to associate with the storage mapping.
  2. Select the Storage Mapping tab, then Add Storage Mapping.

Add a custom storage mapping

Add Storage Mapping
  1. Select the custom storage provider from the Type drop-down, then select Next.

Configure the custom storage mapping

Configure Storage
  1. Launch a new container-based session. Confirm that the custom storage is mapped inside the session at the /custom location.

Custom Mount

Custom Mount