Node settings

CrateDB nodes are configured using:

  • The crate.yml configuration file (main method)

  • Environment variables (override settings)

  • Command-line options (rarely used)

All examples below use YAML syntax.


Configuration File

The main configuration file is:

CRATE_HOME/config/crate.yml

CrateDB reads this file at startup. Settings must be in valid YAML format.


Table of Contents


Node Settings

Setting
Description

cluster.name

Unique name of the cluster. All nodes in the same cluster must use the same name.

node.name

Optional. Unique identifier for a node. If not set, CrateDB auto-generates one.


Path Settings

Setting
Description

path.data

Path to store data (e.g., table storage). Default: data/

path.logs

Path for log files. Default: logs/

path.conf

Path to configuration files. Default: config/


Network Settings

Setting
Description

network.host

The IP or hostname the node binds to. Common values: 0.0.0.0 (all interfaces), 127.0.0.1 (local only)

http.port

Port for HTTP connections (e.g., Admin UI). Default: 4200

transport.tcp.port

Port for internal node-to-node communication. Default: 4300


Discovery Settings

Used to bootstrap and form a cluster.

Setting
Description

discovery.seed_hosts

List of IPs or hostnames used to discover other nodes. Required for clusters with more than one node.

cluster.initial_master_nodes

List of node names that can act as initial master nodes when bootstrapping a new cluster.

Example:

discovery.seed_hosts:
  - 192.168.1.1
  - 192.168.1.2

cluster.initial_master_nodes:
  - node1
  - node2

Thread Pools

Used to tune performance by adjusting how CrateDB handles internal threads.

Example:

thread_pool.write:
  size: 4
  queue_size: 200

Available pools include search, write, bulk, generic, and more.


Logging

Logging is configured via the log4j2.properties file in the config/ directory.

To change log levels or appenders (file/console output), edit log4j2.properties directly.


Example Configuration

cluster.name: my-cluster
node.name: crate-node-1

path:
  data: /var/lib/crate/data
  logs: /var/log/crate
  conf: /etc/crate/config

network.host: 0.0.0.0
http.port: 4200
transport.tcp.port: 4300

discovery.seed_hosts:
  - 192.168.1.10
  - 192.168.1.11

cluster.initial_master_nodes:
  - crate-node-1
  - crate-node-2

Notes

  • Settings are case-sensitive.

  • Use spaces, not tabs, in YAML files.

  • Some settings require a full node restart to take effect.

  • You can check current settings in SQL using:

    sqlCopierModifierSELECT * FROM sys.nodes;

Last updated