Skip to main content

Registration

After deploying a service deployment, in order to use it, it must be registered with Restate as follows:

restate deployments register <SERVICE_ENDPOINT_URI>

Or you can use the shorthand:

restate dp add <SERVICE_ENDPOINT_URI>

For example when running Restate locally as a binary, via npx, or via Homebrew:

restate dp add localhost:9080

When running Restate in a Docker container with the --add-host=host.docker.internal:host-gateway option, use:

restate dp add http://host.docker.internal:9080

When registering a service deployment, Restate uses a mechanism similar to "reflections" to discover the available services and their schemas and properties. A service can be registered only once, and subsequent registration requests to the same deployment will fail. For more details on how to update services, check the versioning documentation.

The deployment creation can be forced to overwrite an existing deployment:

restate dp add --force <SERVICE_ENDPOINT_URI>

This will forcefully overwrite the existing service deployment with the same uri, forcing the discovery process again. It will also remove services that were served by that deployment and are not available anymore.

warning

Forcing a deployment registration is a feature designed to simplify local Restate service development, and should never be used in a production Restate deployment, as it potentially breaks all the in-flight invocations to that deployment.

For more details on the API, refer to the admin API docs.