---
title: Deploy Typesense with AI on Blossom
url: "/deploy/typesense/"
canonical_url: https://blossom88.com/deploy/typesense/
markdown_url: https://blossom88.com/deploy/typesense.md
summary: Deploy Typesense with AI on Blossom. Index documents and search a private
  collection with a search-only key.
categories:
- deployment
- search
stack:
- C++
- REST API
---

# Deploy Typesense with AI on Blossom

[Typesense](https://typesense.org/) indexes documents and returns ranked
search results with filters. You can use it to add search to a catalog,
help center, or internal tool.

![Typesense returns two billing documents after applying a topic filter.](/deploy/assets/images/typesense/query.webp)

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

Use the official [Typesense image](https://typesense.org/docs/guide/install-typesense.html)
on one Persistent Service. Mount its Volume at `/data`. Set
`TYPESENSE_DATA_DIR=/data` and store `TYPESENSE_API_KEY` as a private
runtime variable. Route HTTPS to port `8108` and probe `/health`.

Set the image's executable and its data directory in service.yml:

```yaml
service:
  entrypoint: /opt/typesense-server
  command: --data-dir /data
```

Keep Blossom Account access enabled. Use an Environment Access Token for
an authorized API client outside the Account.

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

</details>

## Ask Your Agent

> **Ask your AI agent:** Deploy Typesense on Blossom and help me search some sample documents with a search-only key.
>
> Follow this guide: https://blossom88.com/deploy/typesense/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and choose a Blossom Cloud Location when you log in. You can also use [Blossom BYOC (bring your own cloud)](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Index and Search

Create a collection with a searchable title and a filterable category.
Index a few documents and give the search client a
[search-only key](https://typesense.org/docs/latest/api/api-keys.html)
restricted to that collection. This setup runs one Container with its
index and Typesense keys on the Volume.

## What You Get

- A private HTTPS API for indexing and search
- An index stored on a Persistent Volume
- A search-only key for a single collection
