---
title: Deploy Meilisearch with AI on Blossom
url: "/deploy/meilisearch/"
canonical_url: https://blossom88.com/deploy/meilisearch/
markdown_url: https://blossom88.com/deploy/meilisearch.md
summary: Deploy Meilisearch with AI on Blossom. Add typo-tolerant search to your app
  with persistent indexes and restricted API keys.
categories:
- deployment
- developer-tools
stack:
- Rust
- LMDB
---

# Deploy Meilisearch with AI on Blossom

[Meilisearch](https://www.meilisearch.com/) is a search engine for applications
and websites. Index your products, articles, or other records, then search them
with typo tolerance, filters, and ranking.

## Ask Your Agent

> **Ask your AI agent:** Deploy Meilisearch on Blossom and help me add search to my app.
>
> Follow this guide: https://blossom88.com/deploy/meilisearch/

[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).

## Your Search Setup

| Part | Purpose |
|---|---|
| Meilisearch Service | Indexing and search API |
| Persistent Volume | Index files, settings, and API-key records |

A [Persistent Service](/docs/apps/persistent-services/) keeps the
index and API keys. Run one active Container with a stable master key. Give
clients restricted search-only keys; keep indexing and administration private.

![A sample product-search client querying Meilisearch for “backpak” and returning two backpack matches.](/deploy/assets/images/meilisearch/product-search.png)

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

Upstream requirements: [self-hosting requirements](https://www.meilisearch.com/docs/resources/self_hosting/getting_started/docker).

Run in production mode with a strong, stable master key. Keep administration
behind **Blossom Account access**. Give your backend a restricted indexing key
and your search client a separate, index-scoped search-only key. Keep the
master key in a private file; it does not belong in browser code.

[Source code](https://github.com/meilisearch/meilisearch).

Create a prebuilt-image Environment and a Persistent Service:

    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom env_var:push --environment environment-100 --file .env.production
    blossom service:create --data meilisearch-service.yml
    blossom environment:deploy --id environment-100 --follow

Set `MEILI_ENV=production`, `MEILI_MASTER_KEY`, and
`MEILI_HTTP_ADDR=0.0.0.0:7700`. Mount a Volume at `/meili_data` and keep
`MEILI_DB_PATH` under that mount. Choose indexing memory and concurrency for
your workload. Use the image's supported entrypoint and an HTTP health check
against `/health`.

Create index-scoped API keys through Meilisearch's `/keys` API. Use the master
key only for key administration. Wait for each asynchronous index/settings
operation's task to succeed before testing its results.

For a public search client, configure the exact search-path exception:

access.yml:

```yaml
environment:
  access_mode: members
  access_public_paths:
    - /indexes/products/search
```

    blossom environment:update --id environment-100 --data access.yml

Send queries with a search-only key for `products`. Confirm that the same key
cannot add documents or search another index. A public-path exception opens
the route; it does not remove Meilisearch's own API-key requirement.

</details>

## Search Your First Records

Index sample products, wait for indexing to finish and try a misspelled search.
Configure filterable attributes before filtering. For a public client, open
only its search route and index information that client may retrieve.

<details class="optional-reading" markdown="1">
<summary>Updates and storage</summary>

Keep the Volume and master key. Run one active Container for this recipe;
stop it before starting its replacement. Follow the selected release's
[upgrade instructions](https://www.meilisearch.com/docs/resources/migration/updating)
when an update changes the database format.

Search existing records again, check the filters, and index a new record to
confirm that the replacement can keep working.

</details>

## What You Get

- Typo-tolerant search with filters for your application
- Separate indexing and search-only API keys
- Private administration with a public search route when needed
- Saved indexes and settings that survive Container replacement
