Thanks to visit codestin.com
Credit goes to docs.restate.dev

Skip to main content
Set up Restate locally in minutes.

Install Restate Server & CLI

Restate is a single self-contained binary. No external dependencies needed.
brew install restatedev/tap/restate-server restatedev/tap/restate
Start the server:
restate-server
Find the CLI at:
restate --help
You can find the Restate UI running on port 9070 (http://localhost:9070) after starting the Restate Server.
You can use restate up to start a lightweight, local dev server.
You can start restate-server binding to random ports via:
restate-server --use-random-ports=true --no-logo
The chosen ports will be displayed in the first three standard output lines.
Also check out the CLI or Server configuration options.
Restate Server collects anonymized telemetry about versions and uptime via Scarf.
We don’t have access to your IP or any information about your cluster. To disable, set DO_NOT_TRACK=1.

Restate UI

The UI is bundled with the Restate Server and available at http://localhost:9070 when running locally. Use the UI to manage, debug, and configure your applications.
Restart from prefix
The UI gives you the best experience when working with Restate.

Useful CLI Commands

With the CLI installed, try these commands:
restate whoami
(If using Docker, use http://host.docker.internal:9080)
restate deployments register localhost:9080
restate deployments list
restate invocation list
# a single invocation
restate invocation cancel my_invocation_id
# cancel all invocations of a service, object, or handler
restate invocation cancel MyService
restate invocation cancel MyService/myHandler
restate invocation cancel MyObject/myObjectKey
restate invocation cancel MyObject/myObjectKey/myHandler
Use restate invocation kill to force kill.
restate kv clear MyObject
restate kv clear MyObject/myObjectKey
Remove the restate-data directory to wipe all invocations, state, registered services, etc.
rm -rf restate-data
See SQL introspection docs for examples. Use --json for JSON output.
restate sql "query"
restate service config view
See also the introspection page for more CLI debugging commands.

Advanced: Installing restatectl

restatectl is a command-line tool for managing Restate clusters. It provides commands for cluster management, introspection, and debugging. This tool is specifically designed for system operators to manage Restate servers and is particularly useful in a cluster environment.
Install with:
brew install restatedev/tap/restatectl
Then run:
restatectl --help
restatectl requires direct access to nodes via their advertised addresses (default port: 5122). Ensure that restatectl commands can reach these addresses.