Installation
Running Restate Server & CLI locally
Restate is a single self-contained binary. No external dependencies needed.
- Homebrew
- Download binaries
- npm
- Docker
Install Restate Server and CLI via:
brew install restatedev/tap/restate-server &&brew install restatedev/tap/restate
Then run the Restate Server with:
restate-server
Install the Restate Server and CLI by downloading the binaries with curl
from the releases page, and make them executable:
- Linux-x64
- Linux-arm64
- MacOS-x64
- MacOS-arm64
BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \chmod +x restate restate-server && \# Move the binaries to a directory in your PATH, for example ~/.local/bin:mv restate $BIN && \mv restate-server $BIN
BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \chmod +x restate restate-server && \# Move the binaries to a directory in your PATH, for example ~/.local/bin:mv restate $BIN && \mv restate-server $BIN
BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \chmod +x restate restate-server && \# Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo):sudo mv restate $BIN && \sudo mv restate-server $BIN
BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \chmod +x restate restate-server && \# Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo):sudo mv restate $BIN && \sudo mv restate-server $BIN
Then run the Restate Server with:
restate-server
Install Restate Server and CLI via:
npm install --global @restatedev/restate-server@latest &&npm install --global @restatedev/restate@latest
Then run the Restate Server with:
restate-server
To run the Restate Server:
docker run --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 \--add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:1.1
To run commands with the Restate CLI, use the following command:
docker run -it --network=host docker.io/restatedev/restate-cli:1.1 invocations ls
Replace invocations ls
by the CLI command you want to run.
Have a look at the CLI configuration docs or Server configuration docs for more configuration options.
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=true
.
Wiping Restate
To start the Restate Server from a clean slate, stop the server and then delete the data directory:
rm -rf <BASE_DIR>/<NODE_NAME>
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:
restate whoami
Register a new service deployment.
When running Restate with Docker, use http://host.docker.internal:9080
.
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.
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.
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.
restate sql "query"
Have a look at the introspection page for a list of useful commands.