Environment variables

    There are many different ways to set environment variables, depending on how CrateDB is being deployed.

    Here is a trivial example:

    Here, we set to /tmp/crate, export it so that sub-processes of the shell have access, and then start CrateDB.

    CrateDB supports two kinds of environment variables:

    • Application variables

    • Java Virtual Machine (JVM) variables

    We use “application” here to distinguish between CrateDB running as a Java application and the JVM itself, which runs CrateDB.

    CRATE_HOME: directory path

    The home directory of the CrateDB installation.

    This directory is used as the root for the configuration directory, data directory, log directory, and so on.

    If you are installing manually, in most cases, this should be set to the directory from which you would normally execute , i.e. the root directory of the .

    CRATE_JAVA_OPTS: Java options

    The Java options to use when running CrateDB.

    For example, you could change the stack size like this:

    See also

    For more information about Java options, consult the documentation for Microsoft Windows or .

    CRATE_HEAP_SIZE: size

    The Java heap size, i.e. the amount of memory that can be used.

    You can set the heap size to four gigabytes like this:

    Use for gigabytes or m for megabytes.

    Appropriate memory configuration is important for optimal performance.

    CRATE_HEAP_DUMP_PATH: file or directory path (default: varies)

    The directory to be used for heap dumps in the case of a crash.

    If a directory path is configured, new heap dumps will be written to that directory every time CrateDB crashes.

    If a file path is configured (i.e. the last node of the path is non-existent or exists and is a file) CrateDB will overwrite that file with a heap dump every time it crashes.

    Default values are as follows:

    Warning