---
layout: docs
page_title: plugin register - Command
description: |-
  The "plugin register" command registers a new plugin in Vault's plugin
  catalog.
---

# plugin register

The `plugin register` command registers a new plugin in Vault's plugin catalog.
The plugin's type of "auth", "database", or "secret" must be included.

## Examples

Register a Community or custom plugin:

```shell-session
$ vault plugin register \
    -sha256=d3f0a8be02f6c074cf38c9c99d4d04c9c6466249 \
    auth my-custom-plugin
Success! Registered plugin: my-custom-plugin
```

Register an Enterprise plugin:

-> **Note:** See [Plugin managment for Enterprise plugins](/vault/docs/plugins/plugin-management#enterprise-plugins)
for details on Vault Enterprise compatible versions.

Before registering Key Management secrets engine v0.16.0+ent for the linux/amd64 system that runs Vault Enterprise,
`vault-plugin-secrets-keymgmt_v0.16.0+ent_linux_amd64.zip` needs to be downloaded from
https://releases.hashicorp.com/vault-plugin-secrets-keymgmt and placed in the plugin directory.

```shell-session
$ vault plugin register 
    -version=0.16.0+ent \                      # version must match the plugin version on the releases page
    secret \        
    vault-plugin-secrets-keymgmt               # name must match the plugin name on the releases page
Success! Registered plugin: vault-plugin-secrets-keymgmt
```

Register a Community or custom plugin with custom args:

```shell-session
$ vault plugin register \
    -sha256=d3f0a8be02f6c074cf38c9c99d4d04c9c6466249 \
    -args=--with-glibc,--with-curl-bindings \
    auth my-custom-plugin
```

Register an Enterprise plugin with custom args:

```shell-session
$ vault plugin register
    -version=0.16.0+ent \                      # version must match the plugin version on the releases page
    -args=--with-glibc,--with-curl-bindings \
    secret \
    vault-plugin-secrets-keymgmt               # name must match the plugin name on the releases page
```

## Usage

The following flags are available in addition to the [standard set of
flags](/vault/docs/commands) included on all commands.

### Output options

- `-format` `(string: "table")` - Print the output in the given format. Valid
  formats are "table", "json", or "yaml". This can also be specified via the
  `VAULT_FORMAT` environment variable.

### Command options

- `-sha256` `(string: <required>)` - SHA256 of the plugin binary or the OCI image
  provided. This is required for all Community plugins.
  If the plugin is Enterprise, the value is not required.

- `-args` `([]string: [])` - Argument to pass to the plugin when starting. This
  flag can be specified multiple times to specify multiple args.

- `-command` `(string: "")` - Command to spawn the plugin. This defaults to the
  name of the plugin if both `-oci_image` and `-command` are unspecified.

- `-env` `([]string: [])` - Environment variables to set for the plugin when
  starting. This flag can be specified multiple times to specify multiple
  environment variables.

- `-oci_image` `(string: "")` - OCI image to run. If specified, setting `-command`,
  `-args`, and `-env` will update the container's entrypoint, args, and environment
  variables (append-only) respectively.

- `-runtime` `(string: "")` - Vault plugin runtime to use if `-oci_image` is
  specified.

- `-version` `(string: "")` - Semantic version of the plugin. Used as the tag
  when specifying `-oci_image`, but any leading 'v' will automatically be trimmed.

