$ sudo vi /etc/kibana/kibana.yml
# Modify these lines
server.port: 5601
server.host: "0.0.0.0"
Secure Elasticsearch & Kibana
$ sudo /usr/share/elasticsearch/bin/elasticsearch-certutil cert -out /etc/elasticsearch/config/elastic-certificates.p12 -pass ""
# If you meed "failed to initialize SSL TrustManager - access to read truststore file"
$ chmod -R 770 /etc/elasticsearch/config
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /etc/elasticsearch/config/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: /etc/elasticsearch/config/elastic-certificates.p12
$ sudo service elasticsearch start
$ sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto # It generates password for kibana
elasticsearch.username: "kibana"
elasticsearch.password: "{elasticsearch-setup-passwords generated kibana password}"
$ sudo service kibana start
If you see Kibana login you have made it well. But when you don't clear your browser cache and try again.