DEV Community

Discussion on: Running Elasticsearch and Kibana v7+ (macOS/Linux and Windows)

Collapse
 
lisahjung profile image
Lisa Jung • Edited

Hey @shopiley!

The blog that you were using was created for version 7 of Elasticsearch.

With version 8 which I assume you are working with now, security is on by default.

Therefore, the procedure for connecting to Elasticsearch has changed! (Time to update my blog!! )

If you are using Windows, please post this question on the discuss.elastic.co/

If you are a mac user, follow the instructions below. I wish I could add the screenshots in the comments but it's not working. The description should suffice though!

When you run Elasticsearch by running elasticsearch.bat, you will find the elasticsearch log populating in your terminal.

When you scroll down or use ctrl+F to find the term password, you will see the part of the log that shows the password for the elastic user. Copy the generated password and enrollment token and save them in a secure location. These values are shown only when you start Elasticsearch for the first time.

In a separate tab of your terminal, run curl -k -u elastic localhost:9200

It will prompt you to enter the host password.

Paste the password and press enter.
When you see the cluster information, it means that you are securely connected to Elasticsearch!

Then you will enroll Kibana with security enabled with the enrollment token you have saved from the previous step.

The steps on how to do that are shown here.
elastic.co/guide/en/elasticsearch/...

Scroll down to the "Start Elasticsearch and enroll Kibana with security enabled" section.

Hope this helps!!