# ES 2.2.0 - Customizing the plugin location (path.plugins) on Windows Server 2012 R2

**URL:** https://discuss.elastic.co/t/es-2-2-0-customizing-the-plugin-location-path-plugins-on-windows-server-2012-r2/44821
**Category:** Elasticsearch
**Created:** [March 18, 2016, 9:29am UTC](https://discuss.elastic.co/t/es-2-2-0-customizing-the-plugin-location-path-plugins-on-windows-server-2012-r2/44821 "2016-03-18T09:29:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![heeln](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@heeln](https://discuss.elastic.co/u/heeln)
#### Post date: [March 18, 2016, 9:29am UTC](https://discuss.elastic.co/t/es-2-2-0-customizing-the-plugin-location-path-plugins-on-windows-server-2012-r2/44821/1 "2016-03-18T09:29:13Z")

</div>

I've struggled with trying to configure a customized path for the plugins in Elasticsearch 2.2.0, on a fresh Windows Server 2012 R2 host.

## Summary

Although I specify `path.plugins`, and Elasticsearch confirms this configuration, the `plugin` installer still tries to install the plugins in the default location. My conclusion is that the `plugin` installer ignores the `path.plugins` setting.

To work around this I had to specify the `-Des.path.plugins="<my plugin path>"` to all `plugin` commands.

When testing, I executed the commands from a non-Administrator command window, as a Windows user without permission to write into the default plugin location. This to ensure nothing was installed in another location than the one I wanted.

If I granted the `plugin` installer access to the default plugins location, the installation worked. However, Elasticsearch could not access the plugin, as it was looking in the location specified by `path.plugins`.

## Configuring a custom path for plugins

In `elasticsearch.yml`, I've configured `path.plugins: c:\ES_1\plugins` and restarted my Elasticsearch instance. When querying with `/_nodes/?pretty` I get:

> "settings" : {  
> "path" : {  
> "plugins" : "c:\ES\_1\plugins",  
> "home" : "C:\Program Files\Elastic\elasticsearch-2.2.0"  
> },  
> }

So, Elasticsearch confirms the new location for the plugins. And the folder exists (created by Elasticsearch). So far, so good.

## Example 1: Trying to install a plugin (without specifying the path)

> C:\Program Files\Elastic\elasticsearch-2.2.0\bin\> **plugin install mobz/elasticsearch-head**  
> -\> Installing mobz/elasticsearch-head...  
> Plugins directory [C:\Program Files\Elastic\elasticsearch-2.2.0\plugins] does not exist. Creating...  
> **ERROR: C:\Program Files\Elastic\elasticsearch-2.2.0\plugins**

Obviously, it tries to install in the default location.

## Example 2: Installing head by specifying the path

> C:\Program Files\Elastic\elasticsearch-2.2.0\bin\> **plugin -Des.path.plugins="C:\ES\_1\plugins" install mobz/elasticsearch-head**  
> -\> Installing mobz/elasticsearch-head...  
> Trying [https://github.com/mobz/elasticsearch-head/archive/master.zip](https://github.com/mobz/elasticsearch-head/archive/master.zip) ...  
> Downloading ............................................................................................................  
> .........................................................................DONE  
> Verifying [https://github.com/mobz/elasticsearch-head/archive/master.zip](https://github.com/mobz/elasticsearch-head/archive/master.zip) checksums if available ...  
> NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)  
> **Installed head into C:\ES\_1\plugins\head**

So, if I specify the path, the installation works fine. I also confirmed that Elasticsearch could access it by launching "head" in a browser.

## Example 3: List installed plugins, without specifying the path

An execution without specifying the path returns no plugins, although head is installed:

> C:\Program Files\Elastic\elasticsearch-2.2.0\bin\> **plugin list**  
> Installed plugins in C:\Program Files\Elastic\elasticsearch-2.2.0\plugins:  
> **No plugin detected**

## Example 4: List all installed plugins, by specifying the path

But when I provide the path to where I installed the head plugin, it is listed:

> C:\Program Files\Elastic\elasticsearch-2.2.0\bin\> **plugin -Des.path.plugins="C:\ES\_1\plugins" list**  
> Installed plugins in C:\ES\_1\plugins:  
> **- head**

## Example 5: Remove the head plugin

To uninstall the head plugin, I must also provide the path:

> C:\Program Files\Elastic\elasticsearch-2.2.0\bin\> **plugin -Des.path.plugins="C:\ES\_1\plugins" remove head**  
> -\> Removing head...  
> **Removed head**

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 18, 2016, 11:24am UTC](https://discuss.elastic.co/t/es-2-2-0-customizing-the-plugin-location-path-plugins-on-windows-server-2012-r2/44821/2 "2016-03-18T11:24:28Z")

</div>

I read some of the issues we fixed in the past regarding this and it might be a bug. Do you mind opening an issue with all the great details you provided here?  
And link to this discussion?

^^^ Really appreciated

Some related issues:

- [https://github.com/elastic/elasticsearch/pull/12438#issuecomment-125527621](https://github.com/elastic/elasticsearch/pull/12438#issuecomment-125527621)
- [https://github.com/elastic/elasticsearch/issues/10673](https://github.com/elastic/elasticsearch/issues/10673)
- [https://github.com/elastic/elasticsearch/issues/7946](https://github.com/elastic/elasticsearch/issues/7946)

It might be a problem on windows only?

@tanguy Any idea?

---

<div class="post-metadata">

### Author: ![heeln](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@heeln](https://discuss.elastic.co/u/heeln)
#### Post date: [March 18, 2016, 4:28pm UTC](https://discuss.elastic.co/t/es-2-2-0-customizing-the-plugin-location-path-plugins-on-windows-server-2012-r2/44821/3 "2016-03-18T16:28:07Z")

</div>

Thanks for the confirmation! When reading up on this I also concluded that this had been an issue before, and that it had been corrected. However without Windows being explicitly listed.

I'm quite new at this, and I do not know how to "open an issue". Sorry for that. I just wanted to share my experiences, as I had a hard time finding the solution/work around, and it seemed like others had faced similar problems.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 18, 2016, 4:46pm UTC](https://discuss.elastic.co/t/es-2-2-0-customizing-the-plugin-location-path-plugins-on-windows-server-2012-r2/44821/4 "2016-03-18T16:46:25Z")

</div>

Just click on [https://github.com/elastic/elasticsearch/issues/new](https://github.com/elastic/elasticsearch/issues/new) and it will open an issue. You have then to copy and paste details in it.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 11:07pm UTC](https://discuss.elastic.co/t/es-2-2-0-customizing-the-plugin-location-path-plugins-on-windows-server-2012-r2/44821/5 "2017-07-05T23:07:05Z")

</div>


