# How to get a free basic license.key for building?

**URL:** https://discuss.elastic.co/t/how-to-get-a-free-basic-license-key-for-building/157693
**Category:** Elasticsearch
**Created:** [November 21, 2018, 11:26am UTC](https://discuss.elastic.co/t/how-to-get-a-free-basic-license-key-for-building/157693 "2018-11-21T11:26:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![zyx\_0312](https://avatars.discourse-cdn.com/v4/letter/z/d9b06d/32.png) [@zyx\_0312](https://discuss.elastic.co/u/zyx_0312)
#### Post date: [November 21, 2018, 11:26am UTC](https://discuss.elastic.co/t/how-to-get-a-free-basic-license-key-for-building/157693/1 "2018-11-21T11:26:55Z")

</div>

Hi all:  
I want to create a elasticsearch release build by command:

> gradle assemble -Dbuild.snapshot=false

But I get an error message like this:

> Property license.key must be set for release build

I didn't find how to get the free basic license.key from:

> **[Subscriptions | Elastic Stack Products & Support | Elastic](https://www.elastic.co/subscriptions)**
>
> See subscription levels, pricing, and tiered features for on-prem deployments of the Elastic Stack (Elasticsearch Kibana, Beats, and Logstash), Elastic Cloud, and Elastic Cloud Enterprise.

And I want build the package instead of downloading package directly.

If I just want create a release build based on a free basic license.key, how to get the free basic license.key? And how to use it for building?  
It's acceptable for me with some missing features based on a free basic license.key, like x-pack and so on.

Thanks!

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [November 21, 2018, 2:04pm UTC](https://discuss.elastic.co/t/how-to-get-a-free-basic-license-key-for-building/157693/2 "2018-11-21T14:04:53Z")

</div>

The licence key it needs here is not the same thing as the licence that the subscriptions talk about, it's a signing key:

> [@Building OSS release version of Elastic Search 6.3.1](https://discuss.elastic.co/t/building-oss-release-version-of-elastic-search-6-3-1/142041/9):
>
> For the record (and future readers), you need a signing key to build a non-snapshot version.

I think this is only required to build X-pack, but I am not sure how to go about building _just_ the non-X-pack components any more.

Why do you want to produce your own release build? The only real difference is the `-SNAPSHOT` in the version number, and I think it's important to use this to see the difference between official versions (built in a very carefully controlled environment) and versions built elsewhere.

---

<div class="post-metadata">

### Author: ![zyx\_0312](https://avatars.discourse-cdn.com/v4/letter/z/d9b06d/32.png) [@zyx\_0312](https://discuss.elastic.co/u/zyx_0312)
#### Post date: [November 23, 2018, 4:02am UTC](https://discuss.elastic.co/t/how-to-get-a-free-basic-license-key-for-building/157693/3 "2018-11-23T04:02:56Z")

</div>

I noticed that there is an elasticsearch-oss-\*.tar.gz in the path of

> distribution/archives/oss-tar/build/distributions

I think it's a built without x-pack, maybe the license.key is not required if I just need oss built.  
Like the way to build logstash:

> ./gradlew assembleTarDistribution  
> ./gradlew assembleOssTarDistribution

But I don't know the oss built command either.  
I will consider your suggestion. Thanks for your reply!

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [November 23, 2018, 9:49am UTC](https://discuss.elastic.co/t/how-to-get-a-free-basic-license-key-for-building/157693/4 "2018-11-23T09:49:47Z")

</div>

You can build just `elasticsearch-oss-*.tar.gz` with `./gradlew buildOssTar` but this also doesn't work with `-Dbuild.snapshot=false`.

---

<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: [December 21, 2018, 9:58am UTC](https://discuss.elastic.co/t/how-to-get-a-free-basic-license-key-for-building/157693/5 "2018-12-21T09:58:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
