Command Line Interface

Table of Contents

The Basics

After downloading and extracting the tarball (see Download) you will be able to invoke the CrateDB command in the bin directory. The excutable is named crate.

The simplest way to start a CrateDB instance is to invoke crate without parameters. This will start the process in the foreground.

sh$ ./bin/crate

You can also start CrateDB in the background using the -d option. When starting CrateDB in the background it is helpful to write the process ID into a pid file so you can find out the process id easlily:

sh$ ./bin/crate -d -p ./

To stop the process that is running in the background send the TERM or INT signal to it.

sh$ kill -TERM `cat ./`

The crate executable supports the following command line options:

Command Line Options

Option Description
-d Start the daemon in the background
-h Print usage information
-p <pidfile> Log the pid to a file
-v Print version information
-D Set a java system property value
-X Set a nonstandard java option


sh$ ./bin/crate -d -p ./

Signal Handling

The CrateDB process can handle the following signals.

Signal Description

Stops a running CrateDB process

kill -TERM `cat /path/to/`


Stops a running CrateDB process

Same behaviour as TERM.


Stops a running CrateDB process gracefully. See Rolling Upgrade for more information

kill -USR2 `cat /path/to/`

USR2 is not supported on Windows.