Install a module on a cluster
Redis Enterprise Software comes packaged with several modules that provide additional Redis capabilities such as search and query, JSON, time series, and probabilistic data structures. As of version 8.0, Redis Enterprise Software includes multiple feature sets, compatible with different Redis database versions. You can view the installed modules, their versions, and their minimum compatible Redis database versions from Cluster > Modules in the Cluster Manager UI.
To use other modules or upgrade an existing module to a more recent version, you need to install the new module package on your cluster.
Module package requirements
The module must be packaged as a .zip file containing:
-
module.json: A metadata file with module information including:
module_name: The actual module nameversion: Numeric versionsemantic_version: Semantic version string (for example, "1.0.0")min_redis_version: Minimum compatible Redis versioncommands: List of commands the module providescapabilities: List of module capabilities
-
Module binary: The compiled
.sofile for the target platform
Get packaged modules
To install or upgrade a module on a Redis Enterprise Software cluster, you need a module package.
-
For versions of official Redis modules that are not available from the Redis download center, contact support.
-
For custom-packaged modules, download a custom-packaged module from the developer.
-
User-defined modules are downloaded automatically if you add them during bootstrapping.
Add user-defined modules during bootstrapping (Redis Software v8.0.6 and later)
As of Redis Enterprise Software version 8.0.6, you can include user_defined_modules in REST API requests to initiate boostrap operations such as create_cluster, join_cluster, or recover_cluster. Each node in the cluster independently downloads and installs the specified modules during its bootstrap process.
user_defined_modules has the following JSON schema:
{
"user_defined_modules": [
{
"name": "string (required)",
"location": {
"location_type": "http | https (required)",
"url": "string (required)",
"credentials": {
"username": "string (optional)",
"password": "string (optional)"
}
}
}
]
}
Best practices
-
Use
httpsinstead ofhttpfor secure module downloads. -
Include version numbers in module URLs.
-
Use the same
user_defined_modulesconfiguration for all nodes in a cluster. -
If using authenticated downloads, ensure credentials are properly secured.
-
Ensure modules are compatible with the Redis database version running on your cluster.
-
Verify modules work correctly before deploying to production environments.
Example requests
The following example creates a cluster with multiple modules:
POST /v1/bootstrap/create_cluster
{
"action": "create_cluster",
"credentials": {
"username": "[email protected]",
"password": "your-secure-password"
},
"cluster": {
"name": "my-cluster.example.com"
},
"user_defined_modules": [
{
"name": "ModuleA",
"location": {
"location_type": "https",
"url": "https://private-repo.example.com/enterprise-module-2.0.0.zip",
"credentials": {
"username": "download-user",
"password": "download-password"
}
}
},
{
"name": "ModuleB",
"location": {
"location_type": "https",
"url": "https://modules.example.com/module-b-2.5.0.zip"
}
},
{
"name": "ModuleC",
"location": {
"location_type": "http",
"url": "http://internal-server.local/module-c-1.2.0.zip"
}
}
]
}
Troubleshooting
Error handling
Download failures do not fail the bootstrap process. If a module fails to download or install, a warning is logged and the bootstrap process continues with the remaining modules.
Warnings are recorded in the bootstrap status with:
warning_type:"module_download_failed"message: Error descriptiondetails:{"module_name": "<name>"}
Module download failed
Check the bootstrap logs for detailed error messages:
Failed to download and install custom module '<name>': <error details>
Common causes:
- Invalid URL
- Network connectivity issues
- Authentication failures
- Module package format issues
Module compatibility errors
After processing user-defined modules, the system validates that all custom modules are compatible with existing databases in the cluster. This validation:
-
Checks which custom modules are used by existing databases.
-
Verifies that compatible module versions are available on the node.
-
Fails the bootstrap process if incompatible modules are detected.
If the bootstrap process fails with an incompatible_modules error:
-
Verify the module version is compatible with existing databases.
-
Ensure the module binary exists and is accessible.
Missing module.json
If you see "module.json missing" errors:
-
Verify the zip file contains a valid
module.jsonat the root level. -
Verify the JSON is properly formatted.
Add a user-defined module to a cluster (Redis Software v8.0.x and later)
To add a custom module to a cluster running Redis Enterprise Software version 8.0.x or later, use the following REST API requests:
-
Upload the custom module configuration. Replace the values in the following example with your own.
POST https://<host>:<port>/v2/modules/user-defined { "module_name": "TestModule", "version": 1, "semantic_version": "0.0.1", "display_name": "test module", "commands": [ { "command_arity": -1, "command_name": "module.command", "first_key": 1, "flags": ["write"], "last_key": 1, "step": 1 } ], "command_line_args": "", "capabilities": ["list", "of", "capabilities"], "min_redis_version": "2.1" } -
For each node in the cluster, upload the custom module artifact:
POST https://<host>:<port>/v2/local/modules/user-defined/artifacts "module=@/tmp/custom-module.zip"The module parameter specifies the full path of the module artifact and must be submitted as form-data. In addition, the module artifact must be available and accessible to the server processing the request.
Add a module to a cluster (Redis Software v7.22.x and earlier)
Use one of the following methods to add a module to a cluster running Redis Enterprise Software version 7.22.x or earlier:
To add a module to the cluster using the Cluster Manager UI:
-
Go to Cluster > Modules.
-
Select Upload module.
-
Use the file browser to add the packaged module.
For RedisGears, follow these installation instructions instead.
Next steps
- Create a database and enable the new module.
- Upgrade a module to the new version.