# Where license data is stored?

**URL:** <https://discuss.elastic.co/t/where-license-data-is-stored/38736>\
**Category:** Elasticsearch\
**Created:** [January 8, 2016, 2:39pm UTC](https://discuss.elastic.co/t/where-license-data-is-stored/38736 "2016-01-08T14:39:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karzmu](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@Karzmu](https://discuss.elastic.co/u/Karzmu)\
**Post date:** [January 8, 2016, 2:39pm UTC](https://discuss.elastic.co/t/where-license-data-is-stored/38736/1 "2016-01-08T14:39:46Z")

</div>

Hi!

Where license data is stored in Elasticsearch 1.7.3? I am looking for the directory which keeps this information.

We are using Elasticsearch with Shield inside Docker container and we want to keep our license updated when we remove container and create it again. In order to do this we need to keep data about our license as separate volume which will be restored in the specified directory after Docker container recreation.

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [January 8, 2016, 3:18pm UTC](https://discuss.elastic.co/t/where-license-data-is-stored/38736/2 "2016-01-08T15:18:50Z")

</div>

Hi Karzmu,

The license itself is stored inside of the cluster, so you'll need your docker install to use the license API when you're instantiating a cluster. In 1.x, that can be done by

`curl -XPUT -u admin 'http://<host>:<port>/_licenses' -d @license.json`  
And you can store your license.json file wherever you like.

The full documentation can be found on the [1.3 shield license management docs](https://www.elastic.co/guide/en/shield/shield-1.3/license-management.html). Note that as of 2.0, there was a slight, slightly tricky, change to that endpoint: `_licenses` was renamed `_license`. So as you move forward into 2.x, bear this in mind. Documentation as of 2.1 (the most current at the time of this writing) can be found [here](https://www.elastic.co/guide/en/shield/2.1/license-management.html). And this is an important general note: the documentation is versioned, so make sure you read the right version of the documentation 🙂

---

<div class="post-metadata">

**Author:** ![Karzmu](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@Karzmu](https://discuss.elastic.co/u/Karzmu)\
**Post date:** [January 8, 2016, 3:44pm UTC](https://discuss.elastic.co/t/where-license-data-is-stored/38736/3 "2016-01-08T15:44:32Z")

</div>

Thanks for reply.

I am aware how to update my license through license API, thanks for advise about reading the right version of the documentation 🙂

I rather want to know where (in terms of directory on hard drive) the information about my license is stored after I use license API.

I need to know the directory which is used to store it. Which directory from link below is it?  
[https://www.elastic.co/guide/en/elasticsearch/reference/1.7/setup-dir-layout.html](https://www.elastic.co/guide/en/elasticsearch/reference/1.7/setup-dir-layout.html)

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 8, 2016, 3:54pm UTC](https://discuss.elastic.co/t/where-license-data-is-stored/38736/4 "2016-01-08T15:54:52Z")

</div>

> [@Karzmu](#):
>
> Where license data is stored in Elasticsearch 1.7.3? I am looking for the directory which keeps this information.

The license is stored in the cluster state which is persisted to disk under `path.data` (it's a few directories down).

> [@Karzmu](#):
>
> We are using Elasticsearch with Shield inside Docker container and we want to keep our license updated when we remove container and create it again. In order to do this we need to keep data about our license as separate volume which will be restored in the specified directory after Docker container recreation.

Given this, I imagine that you already have `path.data` on a separate volume?

---

<div class="post-metadata">

**Author:** ![Karzmu](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@Karzmu](https://discuss.elastic.co/u/Karzmu)\
**Post date:** [January 8, 2016, 4:20pm UTC](https://discuss.elastic.co/t/where-license-data-is-stored/38736/5 "2016-01-08T16:20:13Z")

</div>

Yes, we have our data on separate volume in order to keep our logs between docker container recreations. It's good to know that license information is kept in the same place 🙂

Thanks for help! 🙂

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 8, 2016, 4:27pm UTC](https://discuss.elastic.co/t/where-license-data-is-stored/38736/6 "2016-01-08T16:27:31Z")

</div>

> [@Karzmu](#):
>
> Thanks for help! 🙂

Cheers. 🙂

---

<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:25pm UTC](https://discuss.elastic.co/t/where-license-data-is-stored/38736/7 "2017-07-05T23:25:55Z")

</div>


