Quick links
Elasticsearch License Introduction
When using Elasticsearch, a popular search and analytics engine, one of the key issues to consider is its license. Elasticsearch is available under two types of license: an open-source Apache 2.0 license and a commercial license with additional features, known as X-Pack.
While the Apache 2.0 license is free and open-source, the commercial license comes with a cost, which allows users to access advanced features such as alerting, machine learning, security, and much more.
After version 7.10.2, Elasticsearch moved from Apache 2.0 license to Elastic license 2.0.
How to handle expired licenses
But what happens when your Elasticsearch license expires? The answer to this question depends on the type of license you are using.
If you are using the open-source Apache 2.0 license (i.e., you are using version 7.10.2 or earlier), then you don’t have to worry about expiration. This license does not expire and can be used indefinitely. However, if you are using the Elasticsearch commercial license, then there are some things that you need to be aware of.
Firstly, it is important to note that Elasticsearch can stop working if your license expires. All data operations such as read and write can stop. However, the paid feature operations will be blocked, which means you won’t be able to access the advanced features that come with the commercial license.
You can use the following API to see the information about your license:
GET /_license
The output will be like the following:
{ "license" : { "status" : "active", "uid" : "cbff45e7-c553-41f7-ae4f-9205eabd80xx", "type" : "trial", "issue_date" : "2025-10-20T22:05:12.332Z", "issue_date_in_millis" : 1540073112332, "expiry_date" : "2025-11-19T22:05:12.332Z", "expiry_date_in_millis" : 1542665112332, "max_nodes" : 1000, "max_resource_units" : null, "issued_to" : "test", "issuer" : "elasticsearch", "Start_date_in_millis" : -1 } }
You can check the license type at the following link: https://www.elastic.co/subscriptions
If your license expired and you don’t plan to continue using the paid features, you can remove/update the old license using the following API calls:
curl -u elastic -XPOST "http://localhost:9200/_xpack/license/start_basic" curl -u elastic -XDELETE "http://localhost:9200/_license"
Also you can update the license via Kibana => License Management UI.
If you don’t renew the commercial Elasticsearch license, here are some of the features that you will lose:
- Watcher: PUT/GET watch APIs will be disabled but the DELETE watch API will continue to work. Watcher will continue to execute and write the history, but the actions of the watches will not execute.
- Graph: Graph explore APIs will be disabled.
- Searchable snapshots will be disabled.
- Machine learning features will be disabled.
You can check and compare the differences between the basic and the paid features.
If you attempt to access a feature that is blocked because your license expired, you will receive an error message that looks like this:
{ "error": { "root_cause": [ { "type": "security_exception", "reason": "current license is non-compliant for [security]", "license.expired.feature": "security" } ], "type": "security_exception", "reason": "current license is non-compliant for [security]", "license.expired.feature": "security" }, "status": 403 }
Conclusion
In conclusion, Elasticsearch can’t continue to work untill you switch the license to the basic.
If you want to continue using the paid features, you can buy a new license and update it using PUT _license API calls:
PUT _license
Or you can use Stack Management > License Management in Kibana UI.
If you don’t want to continue using the paid featuresyou can move to the basic license by switching the basic license. That will also help you to get rid of alerts about license expiration.