Skip to main content

Installation

Running Restate Server & CLI locally

Restate is a single self-contained binary. No external dependencies needed.

Install Restate Server and CLI via:

Language of the next code block: shellscript

brew install restatedev/tap/restate-server restatedev/tap/restate

Then run the Restate Server with:

Language of the next code block: shellscript

restate-server

Once Restate is running, you can find the UI at http://localhost:9070.

Server and CLI configuration

Have a look at the CLI configuration docs or Server configuration docs for more configuration options.

Telemetry

Restate Server collects anonymized telemetry about the Restate versions being used and their uptime via Scarf. We don't have access to your IP or any information about your cluster. To disable this, set the environment variable DO_NOT_TRACK=1.

Wiping Restate

To start the Restate Server from a clean slate, stop the server and then delete the data directory:

Language of the next code block: shellscript

rm -rf <BASE_DIR>/<NODE_NAME>

Restate UI

The UI is bundled together with the Restate Server and available at port 9070 (http://localhost:9070 when running locally). You can use the UI for managing, debugging and configuring your applications.

What can you do with the Restate UI?

Have a look at the UI announcement blog post to get some inspiration on how you can use the UI for your applications.

Useful dev CLI commands

With the CLI installed, have a look at some useful commands to interact with the Restate Server:

Check to which server you are connected:

Language of the next code block: shellscript

restate whoami

Register a new service deployment. When running Restate with Docker, use http://host.docker.internal:9080.

Language of the next code block: shellscript

restate deployments register localhost:9080

Cancel a single invocation or a batch of invocations. Use --kill to kill the invocation. To remove all invocations, stop the server then do rm -rf <BASE_DIR>/<NODE_NAME>, which will effectively delete all state/data of the Restate server.

Language of the next code block: shellscript

restate invocation cancel <INVOCATION_ID>
# also works with <SERVICE>/<SERVICE_KEY>/<HANDLER> or a subset of it

Clear the K/V state of a Virtual Object or Workflows. To clear all state, stop the server then do rm -rf <BASE_DIR>/<NODE_NAME>, which will effectively delete all state/data of the Restate server.

Language of the next code block: shellscript

restate kv clear <OBJECT_OR_WORKFLOW_NAME>
restate kv clear <OBJECT_OR_WORKFLOW_NAME>/<SERVICE_KEY>

Execute a SQL query on the invocation or application state. See SQL introspection docs for example queries. Use --json to get the output in json format.

Language of the next code block: shellscript

restate sql "query"
Debugging and troubleshooting with the CLI

Have a look at the introspection page for a list of useful commands.