﻿---
title: Plugin management
description: Plugins extend Elasticsearch's core functionality and can serve various purposes, including: National language support, phonetic analysis, and extended...
url: https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/plugin-management
products:
  - Elasticsearch
applies_to:
  - Elastic Cloud Serverless: Unavailable
  - Elastic Stack: Generally available
---

# Plugin management
Plugins extend Elasticsearch's core functionality and can serve various purposes, including:
- National language support, phonetic analysis, and extended unicode support
- Ingesting attachments in common formats and ingesting information about the geographic location of IP addresses
- Adding new field datatypes to Elasticsearch
- Discovery plugins, such as the cloud AWS plugin that allows discovering nodes on EC2 instances
- Analysis plugins, to provide analyzers targeted at languages other than English
- Scripting plugins, to provide additional scripting languages

How you add and manage plugins depends on where Elasticsearch runs:
- Hosted Cloud deployments such as [Elastic Cloud Hosted](#managing-plugins-for-ech) and [Elastic Cloud Enterprise](#managing-plugins-for-ece) expose plugin and extension management in the Cloud console and API.
- [Self-managed deployments](#managing-plugins-for-self-managed) — use a [configuration file](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/manage-plugins-using-configuration-file) with the official Docker image, or the `elasticsearch-plugin` CLI for package and archive installs.
- On [Elastic Cloud on Kubernetes](#managing-plugins-for-eck) deployments you install plugins by building a custom container image or using init containers.

<note>
  Elastic Cloud Serverless projects do not support installing plugins or uploading custom plugins and bundles. Serverless includes [core analysis plugins](/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/analysis-plugins#_core_analysis_plugins) by default. To manage synonyms, use the [synonyms API](https://www.elastic.co/docs/api/doc/elasticsearch-serverless/group/endpoint-synonyms). For other differences between Elastic Cloud Hosted and Serverless on plugins, bundles, and custom dictionaries, see [Compare Elastic Cloud Hosted and Serverless](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3624/deploy-manage/deploy/elastic-cloud/differences-from-other-elasticsearch-offerings#elasticsearch-differences-custom-plugins-and-bundles).
</note>


## Managing plugins for Elastic Cloud Hosted

<applies-to>
  - Elastic Cloud Hosted: Generally available
</applies-to>

Elastic Cloud Hosted simplifies plugin management by offering compatible plugins for your Elasticsearch version. These plugins are automatically upgraded with your deployment, except when there are breaking changes.
To add plugins to a hosted deployment, refer to:
- [Add plugins and extensions in Elastic Cloud Hosted](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3624/deploy-manage/deploy/elastic-cloud/add-plugins-extensions)

- [Upload custom plugins and bundles](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3624/deploy-manage/deploy/elastic-cloud/upload-custom-plugins-bundles)
- [Manage plugins and extensions through the API](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3624/deploy-manage/deploy/elastic-cloud/manage-plugins-extensions-through-api)


## Managing plugins for Elastic Cloud Enterprise

<applies-to>
  - Elastic Cloud Enterprise: Generally available
</applies-to>

Elastic Cloud Enterprise provides built-in plugins that work with your version of Elasticsearch and are upgraded along with your deployment, unless there are breaking changes.
To add plugins to an Elastic Cloud Enterprise deployment, refer to:
- [Add plugins and extensions in Elastic Cloud Enterprise](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3624/deploy-manage/deploy/cloud-enterprise/add-plugins)
- [Add custom bundles and plugins](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3624/deploy-manage/deploy/cloud-enterprise/add-custom-bundles-plugins)


## Managing plugins for self-managed deployments

<applies-to>
  - Self-managed Elastic deployments: Generally available
</applies-to>

How you manage plugins depends on how you install Elasticsearch:
- If you run Elasticsearch using the [official Elasticsearch Docker image](https://www.docker.elastic.co/), manage plugins with a declarative [configuration file](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/manage-plugins-using-configuration-file).
- For all [other installation methods](#manage-plugins-with-package-and-archive-installs), use the `elasticsearch-plugin` command-line tool to install, list, and remove plugins.


### Manage plugins with the Docker image

List the plugins you want in `elasticsearch-plugins.yml` in your config directory. Each time the container starts, Elasticsearch syncs installed plugins to match that list: installing missing plugins, removing ones you deleted from the file, and upgrading official plugins when you upgrade Elasticsearch.
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:
- [Manage plugins using a configuration file](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/manage-plugins-using-configuration-file)
- [Mandatory plugins](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/mandatory-plugins)


### Manage plugins with package and archive installs

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 Elasticsearch package you installed. For more information, see [Plugins directory](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/_plugins_directory).
Run the following command to get usage instructions:
```
sudo bin/elasticsearch-plugin -h
```

<important>
  If Elasticsearch 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 Elasticsearch files.
</important>

Refer to the following pages:
- [Installing plugins](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/installation)
- [Custom URL or file system](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/plugin-management-custom-url)
- [Installing multiple plugins](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/installing-multiple-plugins)
- [Mandatory plugins](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/mandatory-plugins)
- [Listing, removing and updating installed plugins](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/listing-removing-updating)
- [Other command line parameters](https://www.elastic.co/elastic/docs-builder/docs/3624/reference/elasticsearch/plugins/_other_command_line_parameters)


## Managing plugins for Elastic Cloud on Kubernetes

<applies-to>
  - Elastic Cloud on Kubernetes: Generally available
</applies-to>

On Elastic Cloud on Kubernetes, Elasticsearch runs in Kubernetes pods. Plugins must be on disk before the main Elasticsearch container starts. The two supported approaches are:
- [Using a custom container image](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3624/deploy-manage/deploy/cloud-on-k8s/custom-configuration-files-plugins): You build a custom image from the official Elastic image with the required plugins pre-installed. This option is reproducible, works without internet access at runtime, and starts quickly, but requires a container registry and a new image for each Elasticsearch version upgrade.
- [Using init containers](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3624/deploy-manage/deploy/cloud-on-k8s/init-containers-for-plugin-downloads): You use an init container to run `elasticsearch-plugin install` before the main Elasticsearch 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](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3624/deploy-manage/deploy/cloud-on-k8s/custom-configuration-files-plugins#use-a-volume-and-volume-mount-together-with-a-configmap-or-secret). However, mounting plugin files into a pod does not run `elasticsearch-plugin install`, so Elasticsearch will not load them at startup. Instead, to install plugins, use a custom container image or init container.
</note>