---
title: Deploy Elasticsearch with AI on Blossom
url: "/deploy/elasticsearch/"
canonical_url: https://blossom88.com/deploy/elasticsearch/
markdown_url: https://blossom88.com/deploy/elasticsearch.md
summary: Deploy a private Elasticsearch node on Blossom and give an app access to
  one search index.
categories:
- deployment
- search
stack:
- Java
- Apache Lucene
---

# Deploy Elasticsearch with AI on Blossom

[Elasticsearch](https://www.elastic.co/elasticsearch) indexes structured
documents and makes their fields searchable. Start with one catalog
record and an application credential that can only use its index.

![Read the first catalog record in the verified API response.](/deploy/assets/images/elasticsearch/first-catalog-document.webp)

## Ask Your Agent

> **Ask your AI agent:** Deploy Elasticsearch on Blossom and help me index a few records my app can search.
>
> Follow this guide: https://blossom88.com/deploy/elasticsearch/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Have Ready

Nothing is required beyond your Blossom account.

- **Sample records to search** (Later): Start with a synthetic catalog entry before indexing real data.

## How It Runs

| Part | Role | Where |
|---|---|---|
| Elasticsearch | Indexes records and serves search queries | Private Persistent Service |

## Deploy Elasticsearch

This recipe uses the official distribution under the
[Elastic License 2.0](https://www.elastic.co/licensing/elastic-license)
for your own use on [Blossom](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).
The license restricts offering Elasticsearch as a managed service.

Run Elasticsearch on a private [Persistent Service](https://docs.blossom88.com/docs/apps/persistent-services/).
Configure TLS for the API and node transport and provide your client
with the certificate authority that issued the node certificate.

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Use the official multi-architecture image. Keep the data directory on
the Volume and reserve memory for the JVM and file cache. The sample
uses single-node discovery with mmap disabled so it can run with the
default host settings. Review Elastic's
[virtual memory guidance](https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s/virtual-memory)
when sizing a production workload.

</details>

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom app_plan:preview --data elasticsearch-plan.yml
    blossom service:create --data elasticsearch-service.yml
    blossom environment:deploy --id environment-100 --follow

</details>

## Index and Search a Record

Create a catalog index. Give a separate application credential
permission to create and read documents in that index. Use it to add
a sample record and run a search against the title.

> **Ask your AI agent:** Give my app access to one catalog index and show me the result of its first search.

> Follow this guide: https://blossom88.com/deploy/elasticsearch/



## Keep Your Search Data

Reuse the data Volume when replacing the Container. Search using the
same application credential, then index and find a second record.

![Read both records after replacing the Elasticsearch Container.](/deploy/assets/images/elasticsearch/catalog-after-replacement.webp)

## What You Get

- A private Elasticsearch API with HTTPS and authentication
- A catalog index with its own application credential
- Indexed records that survive a Container update

Tested on Blossom: The same index-scoped credential found the earlier record and a new one after Container replacement on the same Volume.
