Configuration

CrateDB ships with sensible defaults, so configuration is typically not needed for basic, single node use.

CrateDB can be configured via configuration files. These files are located in the config directory inside the CRATE_HOME directory.

The configuration directory can changed via the path.conf setting, like so:

sh$ ./bin/crate -Cpath.conf=<CUSTOM_CONFIG_DIR>

Here, replace <CUSTOM_CONFIG_DIR> with the path to your custom configuration directory.

The primary configuration file is named crate.yml. The default version of this file has a commented out listing of every available setting. (Some features, such as logging, use feature-specific files.)

Settings can be configured via the config file or via the -C option at startup. So, for example, you can set the cluster name at startup, like so:

sh$ ./bin/crate -Ccluster.name=cluster

Settings passed at startup use the same name as the settings in the configuration file. So the equivalent setting in the configuration file would be:

cluster.name = cluster

Settings are applied in the following order:

  1. Default values
  2. Configuration file
  3. Command-line options

Each setting value overwrites any previous value. So, for example, command line settings will override configuration file settings.

Tip

Cluster settings can be changed at runtime.

Note

If you’re just getting started with a particular part of CrateDB, we recommend you consult the appropriate top-level section of the documentation. The rest of this configuration documentation assumes a basic familiarity with the relevant parts of CrateDB.

Table of Contents

  • Node Specific Settings
    • Basics
    • Node Types
    • Read-only node
    • Hosts
    • Ports
    • Paths
    • Plugins
    • CPU
    • Memory
    • Garbage Collection
    • Authentication
    • Secured Communications (SSL/TLS)
    • Elasticsearch HTTP REST API
    • Cross-Origin Resource Sharing (CORS)
    • Blobs
    • Repositories
    • Queries
    • Javascript Language
    • Custom Attributes
    • Ingestion Framework
    • Enterprise License
  • Cluster Wide Settings
    • Non-Runtime Cluster Wide Settings
    • Collecting Stats
    • Usage Data Collector
    • Graceful Stop
    • Bulk Operations
    • Discovery
    • Routing Allocation
    • Recovery
    • Query Circuit Breaker
    • Field Data Circuit Breaker
    • Request Circuit Breaker
    • Accounting Circuit Breaker
    • Stats Circuit Breakers
    • Thread Pools
    • Metadata
  • Session Settings
  • Logging
    • Application Logging
    • JVM Logging
  • Environment Variables
    • Application Variables
    • JVM Variables