Skip to main content

Restate Server Configuration

The Restate Server has a wide range of configuration options to tune it according to your needs.

Configuration Reference

Configuration file

The Restate Server accepts a TOML configuration file that can be specified either providing the command-line option --config-file=<PATH> or setting the environment variable RESTATE_CONFIG=<PATH>. If not set, the default configuration will be applied.

Overrides

Restate server accepts a sub-set of the configuration through command-line arguments, you can see all available options by adding --help to restate-server.

The order of applying configuration layers follows the following order:

  1. Built-in defaults
  2. Configuration file (--config-file or via RESTATE_CONFIG)
  3. Environment variables
  4. Command line arguments (--cluster-name=<VALUE>)
Note

Every layer overrides the previous. For instance, command-line arguments will override a configuration key supplied through environment variable (if set).

Environment variables

You can override any configuration entry with an environment variable, this overrides values loaded from the configuration file. To do that, the following rule applies:

  • Prefix the configuration entry key with RESTATE_
  • Separate every nested struct with __ (double underscore) and all hyphens - with a _ (single underscore).

For example, to override the admin.bind-address, the corresponding environment variable is RESTATE_ADMIN__BIND_ADDRESS.

Configuration introspection

If you want to generate a configuration file that includes values loaded from your environment variables or overrides applied to restate-server command-line, you can add --dump-config to dump the default TOML config with overrides applied:

restate-server --cluster-name=mycluster --dump-config

Example output:

roles = [
"worker",
"admin",
"metadata-store",
]
cluster-name = "mycluster"
...

At any time, you ask restate daemon to print the loaded configuration to the log by sending a SIGUSR1 to the server process. This prints a dump of the live configuration to standard error.

For instance on Mac/Linux, you can find the PID of restate-server by running:

pgrep restate-server
994921

Then send the signal to the process ID returned from pgrep's output:

kill -USR1 994921

Observe the output of the server for a dump of the configuration file contents.