System: Linux (Ubuntu 22/24 recommended)
Tools: Docker installed (apt update && apt install docker.io -y)
docker network create elastic
mkdir -p ~/elasticsearch/data chmod 776 ~/elasticsearch/data -R
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.15.4
docker run -d --name es01 --net elastic -p 9200:9200 -m 2GB -v ~/elasticsearch/data:/usr/share/elasticsearch/data docker.elastic.co/elasticsearch/elasticsearch:8.15.4
docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
docker cp es01:/usr/share/elasticsearch/config/certs/http_ca.crt .
curl --cacert http_ca.crt -u elastic:YOUR_PASSWORD https://localhost:9200
docker pull docker.elastic.co/kibana/kibana:8.15.4 docker run -d --name kib01 --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:8.15.4
# docker exec -it kib01 /usr/share/kibana/bin/kibana-verification-code