﻿---
title: Manage plugins using a configuration file
description: Declare Elasticsearch plugins in elasticsearch-plugins.yml so Docker containers install and sync them on every start.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7959/deploy-manage/plugins-and-bundles/self-managed/manage-plugins-using-configuration-file
products:
  - Elasticsearch
applies_to:
  - Self-managed Elastic deployments: Generally available
---

# Manage plugins using a configuration file
<admonition title="Docker only">
  This feature is only available for [official Elasticsearch Docker images](https://www.docker.elastic.co/). Other Elasticsearch distributions will not start with a plugin configuration file.
</admonition>

If you run a self-managed Elasticsearch cluster with the [official Docker image](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7959/deploy-manage/deploy/self-managed/install-elasticsearch-with-docker), manage plugins with a declarative configuration file instead of the `elasticsearch-plugin` CLI. For package and archive installs, use [Install plugins](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7959/deploy-manage/plugins-and-bundles/self-managed/install-plugins).
When Elasticsearch starts, it compares the plugins listed in the file with those currently installed, and adds or removes plugins as required. Elasticsearch also upgrades official plugins when you upgrade Elasticsearch itself. To change the set of plugins, edit the file and restart the container. Do not run `elasticsearch-plugin install` or `remove` when the configuration file is present; those commands are disabled.
The file is called `elasticsearch-plugins.yml` and must be placed in the Elasticsearch configuration directory, alongside `elasticsearch.yml`. Example:
```yaml
plugins:
  - id: analysis-icu
  - id: repository-azure
  - id: custom-mapper
    location: <EXAMPLE_URL>/archive/custom-mapper-1.0.0.zip
```

This example installs the official `analysis-icu` and `repository-azure` plugins, and one unofficial plugin. Every plugin must provide an `id`. Unofficial plugins must also provide a `location`. This is typically a URL, but Maven coordinates are also supported. The downloaded plugin’s name must match the ID in the configuration file.
While Elasticsearch respects the [standard Java proxy system properties](https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.md) when downloading plugins, you can also configure an HTTP proxy explicitly in the configuration file:
```yaml
plugins:
  - id: custom-mapper
    location: <EXAMPLE_URL>/archive/custom-mapper-1.0.0.zip
proxy: proxy.example.com:8443
```

You can also use [mandatory plugins](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7959/deploy-manage/plugins-and-bundles/self-managed/mandatory-plugins) so a node fails to start if a required plugin is missing.
For more Docker configuration guidance, refer to [Configure Elasticsearch with Docker](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7959/deploy-manage/deploy/self-managed/install-elasticsearch-docker-configure). Refer to [Plugins and bundles](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7959/deploy-manage/plugins-and-bundles) for options that apply to other deployment types.