MirrorNest
← Tutte le guide

Elasticsearch

A distributed search and analytics engine — the backbone of full-text search features and, paired with Kibana and Logstash/Beats, one of the most common self-hosted log-aggregation stacks (the 'ELK stack').

Sistema: Any Docker hostsearch-enginelog-aggregationDockerSito ufficiale ↗Documentazione ufficiale ↗
Questa guida è redatta a partire dalla documentazione ufficiale di Elasticsearch, linkata sopra — verifica sempre lì i nomi esatti di pacchetti/versioni prima di eseguire questi comandi su un server di produzione, poiché le versioni della distribuzione e del progetto cambiano nel tempo.
  1. 1Run a single-node instance

    Security is enabled by default from Elasticsearch 8 onward -- this generates a real password you'll need to save.

    docker run -d \ --name elasticsearch \ -p 9200:9200 \ -e discovery.type=single-node \ -v ./elasticsearch/data:/usr/share/elasticsearch/data \ --restart unless-stopped \ docker.elastic.co/elasticsearch/elasticsearch:8.15.0
  2. 2Retrieve the auto-generated elastic user password

    docker exec -it elasticsearch /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
  3. 3Verify it's running

    curl -k -u elastic:your-password https://localhost:9200
  4. 4Add Kibana for visualization (optional)

    Kibana provides the web dashboard most people associate with 'the ELK stack' -- browsing, searching, and graphing whatever data is indexed into Elasticsearch.