Core identity settings
Configure these inelasticsearch.yml on every node.
cluster.name
cluster.name
Nodes join a cluster by sharing the same Defaults to
cluster.name. A node can only join one cluster.elasticsearch. Use a unique name per cluster to prevent nodes from accidentally joining the wrong cluster.node.name
node.name
A human-readable identifier for the node. Included in API responses and log output. Defaults to the machine hostname at startup.
path.data
path.data
The directory where shard data, index metadata, and cluster state are stored. Defaults to Or on the command line:The contents of
$ES_HOME/data.path.data must persist across restarts. Each Elasticsearch node must have its own data path — do not share a data directory between nodes.path.logs
path.logs
The directory where Elasticsearch writes log files. Defaults to When using
$ES_HOME/logs..zip or .tar.gz distributions, configure both path.data and path.logs outside $ES_HOME so the home directory can be upgraded without losing data or logs.Network settings
network.host
network.host
The address the node binds to and publishes for both HTTP and transport traffic. Accepts an IP address, hostname, or a special value.Special values:
| Value | Resolves to |
|---|---|
_local_ | Loopback addresses (e.g. 127.0.0.1) |
_site_ | Site-local addresses |
_global_ | Globally-routable addresses |
http.port
http.port
The port for HTTP client traffic. Accepts a single port or a range; Elasticsearch uses the first available port in the range.Defaults to
9200-9300.transport.port
transport.port
The port for inter-node transport communication. Accepts a single port or a range.Defaults to
9300-9400.Node roles
Setnode.roles in elasticsearch.yml to assign specific responsibilities to a node. If node.roles is not set, the node is assigned all roles automatically.
If you set
node.roles explicitly, you must include every role your cluster requires. Every cluster needs at least one master-eligible node and either a data node or both data_content and data_hot nodes.Available roles
master
Eligible to be elected as the cluster master. The master node manages cluster-wide state and coordinates shard allocation.
data
Holds shards and handles data-related operations (CRUD, search, aggregations). Encompasses all data tiers.
data_content
Holds content data that does not belong to a time-series lifecycle. Required alongside
data_hot when not using the generic data role.data_hot
Holds the most recent time-series data, typically on the fastest hardware.
data_warm
Holds older time-series data that is queried less frequently.
data_cold
Holds infrequently accessed time-series data. Optimized for low cost over query speed.
ingest
Executes ingest pipelines to transform documents before indexing. Required for Fleet, Stack Monitoring, and ingest pipeline use.
ml
Runs machine learning jobs such as anomaly detection. Required for all ML features.
remote_cluster_client
Can connect to remote clusters. Required for cross-cluster search (CCS) and cross-cluster replication (CCR).
transform
Runs transform jobs. Required by Fleet, the Security app, and Kibana transforms.
Coordinating-only nodes
Settingnode.roles to an empty array makes the node a coordinating-only node. It routes requests and aggregates results but holds no data and is not master-eligible.
Discovery and cluster formation
These settings are required when forming a new cluster or when nodes need to find each other.- discovery.seed_hosts
- cluster.initial_master_nodes
A list of hosts that a new node should contact to discover the cluster. Accepts hostnames or IP addresses, optionally with a port.If no port is specified, the value of
transport.profiles.default.port is used, falling back to transport.port.JVM heap sizing
Elasticsearch automatically sets the JVM heap size based on node roles and available memory. Override only when the automatic sizing does not fit your workload.Create a JVM options file
Add a file with an
.options extension to the jvm.options.d/ directory. Do not edit the root jvm.options file.| Distribution | Options directory |
|---|---|
| tar.gz / .zip | config/jvm.options.d/ |
| Debian / RPM | /etc/elasticsearch/jvm.options.d/ |
| Docker | /usr/share/elasticsearch/config/jvm.options.d/ |
Set Xms and Xmx to the same value
Always set minimum (
Xms) and maximum (Xmx) heap to the same value to prevent heap resizing at runtime.Observe the 50% RAM limit
Do not allocate more than 50% of the total available RAM to the JVM heap. Elasticsearch needs the remaining memory for off-heap network buffers and the OS filesystem cache.
