# Plugins

Many aspects of VerneMQ can be extended using plugins. The standard VerneMQ package comes with several official plugins. You can show the enabled & running plugins via:

```
vmq-admin plugin show
```

The command above displays all the enabled plugins together with the hooks they implement:

```
+-----------+-----------+-----------------+-----------------------------+
|  Plugin   |   Type    |     Hook(s)     |            M:F/A            |
+-----------+-----------+-----------------+-----------------------------+
|vmq_passwd |application|auth_on_register |vmq_passwd:auth_on_register/5|
|  vmq_acl  |application| auth_on_publish |  vmq_acl:auth_on_publish/6  |
|           |           |auth_on_subscribe| vmq_acl:auth_on_subscribe/3 |
+-----------+-----------+-----------------+-----------------------------+
```

## Enable a plugin

```
vmq-admin plugin enable --name=vmq_acl
```

This enables the ACL plugin. Because the `vmq_acl` plugin is already started the above command won't succeed. In case the plugin sits in an external directory you must also to provide the `--path=PathToPlugin`.

## Disable a plugin

```
vmq-admin plugin disable --name=vmq_acl
```

## Persisting plugins

To make a plugin start when VerneMQ starts they need to be configured in the main `vernemq.conf` file.

The general syntax to enable a plugin is to add a line like `plugins.pluginname = on`, using the `vmq_passwd` plugin as an example:

```
plugins.vmq_passwd = on
```

And if the plugin is external the path can be specified like this:

```
plugins.myplugin = on
plugins.myplugin.path = /path/to/plugin
```

Plugin specific settings can be configured via `myplugin.somesetting = value`, like:

```
vmq_passwd.password_file = ./etc/vmq.passwd
```

See the `vernemq.conf` file for details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vernemq.com/1.10.3/configuration/plugins.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
