Using token to enrol kibana without a local browser


I have two virtual machines, one running Elasticsearch, one running kibana. I have generated a token to enrol kibana, but have been unable to apply it. I start kibana and can see the link generated to apply the token which is something like http://localhost:5601?code=dsgfgds .... but I don't have a local browser to load the link as I'm on a CLI-only VM.

Should kibana load when using the FQDN of the VM host? I think not as kibana isn't ready?

Is there another method of applying the token and enrolling kibana without the browser?

I have not used tokens to enrol kibana and nodes before, is it possible to configure Elasticsearch and Kibana without tokens as I did prior to 8.1?


Hi @gunlomboy

In Elastic Stack 8.x, security is enabled by default. If you want to configure your own security, it is possible, just do the manual process before installing it according to the guide:

best regards

Many thanks @grfneto

It's good to know that we can still manually configure security, and that's probably what I will end up doing.

I would still be interested to know if there is a method to enrol kibana without a browser on the host machine. Having looked further, I can see that without completing the enrolment process the device is only listening locally on port 5601, which is no good if I don't have a local browser.

Surely, there's a command line option to enrol kibana?

You can run

bin/kibana-setup --enrollment-token <your enrollment token here>

I don't think we do a good job documenting this, we will amend that.

1 Like

Thanks @ikakavas

It worked like a charm :slightly_smiling_face:

I agree regarding the documentation. Your advice is exactly what I was looking for but I couldn't find it anywhere.

No worries, thanks for bringing this up. We have added the docs already in [DOCS] Add detached mode for enrolling Kibana by lockewritesdocs · Pull Request #85933 · elastic/elasticsearch · GitHub and you can see the updated instructions live in Start the Elastic Stack with security enabled | Elasticsearch Guide [8.1] | Elastic

@ikakavas Perfect. Thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.