I want to use OpenSearch instead of ElasticSearch in Magento 2

I didn't find anything to configure the OS configuration.

3 Answers 3


Install opensearch 2.5.0 on Ubuntu 22.04

curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | sudo apt-key add -

echo "deb https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable main" | sudo tee /etc/apt/sources.list.d/opensearch-2.x.list

sudo apt update

sudo apt list -a opensearch

sudo apt -y install opensearch=2.5.0

sudo systemctl enable opensearch

sudo systemctl start opensearch

Check opensearch port.

curl -X GET https://localhost:9200 -u 'admin:admin' --insecure

curl -X GET https://localhost:9200/_cat/plugins?v -u 'admin:admin' --insecure


Steps to Migrate from Elasticsearch to OpenSearch 2.4.5 or below

Go to Magento Admin then,

Stores > Configurations > Catalog > Catalog > Catalog Search

You can add your configurations as below:

Search Engine : ElasticSearch 7

Elasticsearch Server Hostname : OpenSearch Server Hostname

Elasticsearch Server Port : OpenSearch Server Port

Elasticsearch Index Prefix : OpenSearch Index Prefix

Enable Elasticsearch HTTP Auth : OpenSearch Auth if enabled

For your reference:

enter image description here

You can check the compatibility of OS and Magento versions by CLICK HERE

As per Adobe Commerce attached below:

enter image description here

NOTE: Test Connection and run php bin/magento indexer:reindex && php bin/magento cache:flush


for Opensearch 2.5 its OK yes, what about opensearch version 1 for magento 2.4.4 and 2.4.5?

I could not find proper installtion method for Ubuntu 20.04. Anyone has a step by step instruction even for Docker?

  • If you have a follow on question, please ask a new question. Sep 11, 2023 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.