> For the complete documentation index, see [llms.txt](https://docs.create-magento-app.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.create-magento-app.com/usage-guide/opensearch.md).

# Using OpenSearch

{% hint style="info" %}
Available since `magento-scripts` 2.3.1
{% endhint %}

{% hint style="info" %}
From Magento 2.4.8 CMA will use OpenSearch as the default search engine.
{% endhint %}

## 1. Create new CMA app

```bash
npx create-magento-app@latest magento-with-opensearch
```

## 2. Set searchengine to "opensearch" in the configuration section of the config file

{% code title="cma.js" %}

```javascript
module.exports = {
    // ...other configurations
    configuration: {
        searchengine: 'opensearch' // <- set this
    }
};
```

{% endcode %}

### 2.1 Configure OpenSearch (optional)

```javascript
module.exports = {
    // ...other configurations
    configuration: {
        searchengine: 'opensearch',
        opensearch: {
            // change opensearch image here
            image: 'opensearchproject/opensearch:2.13.0',
            env: {
                // additional environment variables for container
                OPENSEARCH_JAVA_OPTS: '-Xms2048m -Xmx4096m'
            }
        }
    }
};
```

## 3. Run the application

You need to apply changes by running the [start](/getting-started/available-commands/start.md) command **without** [**-s option**](/getting-started/available-commands/start.md#s-skip-setup).
