Configuration Settings

In order to configure CrateDB, please take note of the configuration file locations and the available environment variables.

Configuration Files

When using the package-based setup flavor for CrateDB on Debian, Ubuntu, and Derivates or CrateDB on Red Hat, SUSE, and Derivates, the main CrateDB configuration files are located within the /etc/crate directory.

When using the Ad Hoc setup, or the Microsoft Windows setup, the configuration files are located within the config/ directory relative to the working directory.

Environment Variables

For the vanilla package-based setup flavor, the CrateDB startup script reads Environment variables from the /etc/default/crate file as environment variables.

Note

RPM packages of CrateDB versions up to 5.2.11, 5.3.8, 5.4.7 and 5.5.2 are using the /etc/sysconfig/crate file instead.

When using the Ad Hoc setup, or the Microsoft Windows setup, the environment variables will be defined by bin/crate{.sh,.bat} relative to the working directory.

Here is an example:

# Configure heap size (defaults to 256m min, 1g max).
CRATE_HEAP_SIZE=2g

# Maximum number of open files, defaults to 65535.
# MAX_OPEN_FILES=65535

# Maximum locked memory size. Set to "unlimited" if you use the
# bootstrap.mlockall option in crate.yml. You must also set
# CRATE_HEAP_SIZE.
MAX_LOCKED_MEMORY=unlimited

# Provide additional Java OPTS.
# CRATE_JAVA_OPTS=

# Force the JVM to use IPv4 only.
CRATE_USE_IPV4=true