liveBook · Manning

Elasticsearch.yml

As explained in Elasticsearch in Action, Second Edition

Elasticsearch's YAML configuration file for cluster, node, path, network, and security settings.

A production Elasticsearch node rarely relies entirely on defaults. Use elasticsearch.yml to define cluster and node information, data and log paths, network details, and security settings before deployment. section 14.5 section 14.5.1

The file belongs to Elasticsearch’s configuration layout:

  • Elasticsearch reads it from the config directory under the installation directory. section 14.5
  • Binary installations default to $ES_HOME/config; Debian and RPM installations default to /etc/elasticsearch/config. section 14.5
  • Set and export ES_PATH_CONF when configuration files must reside elsewhere. section 14.5

Change the HTTP and internal transport ports

http.port: 9900 transport.port: <internal-node-port> The first setting changes the Elasticsearch client-facing port from the default 9200 to 9900. The second changes the port used for internal node communication. section 14.5.1

Treat elasticsearch.yml as one part of the configuration surface: log levels belong in log4j2.properties, while heap memory belongs in jvm.options. Consult detailed property documentation when tuning less common settings. section 14.5

How Elasticsearch in Action, Second Edition covers it

How deep it goes
Explains file purpose, locations, environment selection, and two port settings, while deferring detailed property coverage.
Examples
Demonstrates changing the HTTP port to 9900 and changing the internal transport port.
What it assumes
Assumes an Elasticsearch installation and distinguishes its configuration directory from logging and JVM settings.
What you can do after
Operate Elasticsearch by locating its configuration, selecting an alternate configuration directory, and changing network ports.
How it connects
Connects configuration with cluster communication, logging, heap memory, security, paths, and production administration.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elasticsearch in Action, Second Edition. The section links point to the parts of the book it draws on.