Hello Folks,

Hope you are keeping safe!

This article is very short and simple. I was struggling to have multiple versions of Elasticsearch on my local Mac machine. With `homebrew` service, I wasn’t able to install multiple versions of Elasticsearch and I don’t want to move away from brew. So, I have decided to work on the alternate.

Here’s are the steps:

* If you have elasticsearch installed with brew command. Keep it as-is
* Stop elasticsearch service.

$ brew tap homebrew/services
$ brew services list
$ brew services stop elasticsearch-full # that's my case. Yours will be different
==> Successfully stopped `elasticsearch-full` (label: homebrew.mxcl.elasticsearch-full)
# now if you try to curl localhost:9200
$ curl http://localhost:9200
curl: (7) Failed to connect to localhost port 9200: Connection refused
  • Install evm (ElasticSearch Version Manager) from: https://github.com/duydo/evm
  • Install elasticsearch@7.4 with evm install 7.4.0
  • Start elasticsearch: evm start
  • Try hitting the curl request and you should see version 7.4.0
  • If you want to run previous version (that you’ve installed with Homebrew), simply run: evm stop  and then run brew services start elasticsearch-full

Thankful to: https://github.com/duydo/evm

Hope that helps!

One response to “How to keep multiple versions of Elasticsearch on MacOS”

  1. Snehanshu Phukon Avatar

    I want to keep multiple instances of elastic search at the same time, each with different set of indexes. Is that possible?

Leave a comment

I’m Puneet

Namaste! I’m Puneet, and this is my digital space for all things tech. I dive deep into topics like backend engineering, software architecture, and how we build robust systems. I believe in writing simple, practical articles that you can learn from and apply. Let’s build something great together!