Crate CLI

After downloading and extracting the tarball (see Install via tar.gz) you will be able to invoke the Crate executable in the bin directory. The excutable is named crate.

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

sh$ ./bin/crate

You can also start Crate in the background using the -d option. When starting Crate 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

-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 Crate process can handle the following signals.

Signal Description

Stops a running Crate process

kill -TERM `cat /path/to/`


Stops a running Crate process

Same behaviour as TERM.


Stops a running Crate process gracefully. See Zero Downtime Upgrade for more information

kill -USR2 `cat /path/to/`

USR2 is not supported on Windows.