docs/reference/elasticsearch-plugins/plugin-management.md
Plugins extend {{es}}'s core functionality and can serve various purposes, including:
How you add and manage plugins depends on where {{es}} runs:
elasticsearch-plugin CLI for package and archive installs.::::{note} {{serverless-full}} projects {{serverless-full}} projects do not support installing plugins or uploading custom plugins and bundles. {{serverless-short}} includes core analysis plugins by default. To manage synonyms, use the synonyms API. For other differences between {{ech}} and {{serverless-short}} on plugins, bundles, and custom dictionaries, see Compare {{ech}} and Serverless. ::::
ess: ga
{{ech}} simplifies plugin management by offering compatible plugins for your {{es}} version. These plugins are automatically upgraded with your deployment, except when there are breaking changes.
To add plugins to a hosted deployment, refer to:
ece: ga
{{ece}} provides built-in plugins that work with your version of {{es}} and are upgraded along with your deployment, unless there are breaking changes.
To add plugins to an {{ece}} deployment, refer to:
self: ga
How you manage plugins depends on how you install {{es}}:
elasticsearch-plugin command-line tool to install, list, and remove plugins.List the plugins you want in elasticsearch-plugins.yml in your config directory. Each time the container starts, {{es}} syncs installed plugins to match that list: installing missing plugins, removing ones you deleted from the file, and upgrading official plugins when you upgrade {{es}}.
To add or remove a plugin, edit the file and restart the container. Do not use elasticsearch-plugin install or remove as those commands are disabled when elasticsearch-plugins.yml is present.
Refer to the following pages:
Use the elasticsearch-plugin command-line tool. It is located in the $ES_HOME/bin directory by default, but it might be in a different location depending on which {{es}} package you installed. For more information, see Plugins directory.
Run the following command to get usage instructions:
sudo bin/elasticsearch-plugin -h
:::{important} - Running as root
If {{es}} was installed using the deb or rpm package, then run /usr/share/elasticsearch/bin/elasticsearch-plugin as root so it can write to the appropriate files on disk. Otherwise, run bin/elasticsearch-plugin as the user that owns all of the {{es}} files.
:::
Refer to the following pages:
eck: ga
On {{eck}}, {{es}} runs in Kubernetes pods. Plugins must be on disk before the main {{es}} container starts. The two supported approaches are:
elasticsearch-plugin install before the main {{es}} container starts. This option is easier to get started with, but requires pod internet access and repeats the download on each new node.:::{note}
You can inject configuration files, such as synonym dictionaries, SAML metadata, or TLS certificates by mounting them with ConfigMaps or Secrets. However, mounting plugin files into a pod does not run elasticsearch-plugin install, so {{es}} will not load them at startup. Instead, to install plugins, use a custom container image or init container.
:::