> For the complete documentation index, see [llms.txt](https://docs.enclaive.cloud/virtual-hsm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enclaive.cloud/virtual-hsm/cli/configuration-and-management/vhsm-plugin/vhsm-plugin-register.md).

# vhsm plugin register

The `plugin register` command adds a new plugin to vHSM's plugin catalog. Registration is a prerequisite before the plugin can be used in mounts for auth methods, secrets engines, or database plugins.

You must specify the plugin type  such as`auth`, `database`, or `secret`and provide a SHA256 checksum of the plugin binary to ensure integrity.

**Usage**

```bash
vhsm plugin register [options] <plugin-type> <plugin-name>
```

* `<plugin-type>`: The type of plugin (e.g., `auth`, `database`, or `secret`).
* `<plugin-name>`: The name to register the plugin under in the catalog.

&#x20;**Available Flags**

| Flag                  | Description                                                   |
| --------------------- | ------------------------------------------------------------- |
| `-sha256=<string>`    | **(Required)** SHA256 checksum of the plugin binary.          |
| `-command=<string>`   | Optional custom command for executing the plugin binary.      |
| `-args=<string>`      | Optional arguments to pass to the plugin binary on execution. |
| `-version=<string>`   | Optional semantic version to associate with the plugin.       |
| `-builtin`            | Register the plugin as a built-in plugin.                     |
| `-runtime=<string>`   | Optional runtime to use (e.g., OCI image runtime).            |
| `-oci-image=<string>` | OCI image reference for plugins that use container runtimes.  |

{% hint style="info" %}
**Note**: `-sha256` is always required, even if other flags are not used.
{% endhint %}

**Examples**

Register a new secret plugin

```bash
vhsm plugin register \
  -sha256=d3f0a8be02f6c074cf38c9c99d4d04c9c6466249 \
  secret my-custom-plugin
```

**Output**

```
Success! Registered plugin: my-custom-plugin
```
