Skip to main content
You can deploy a Restate service in a container or on any virtual machine. The service runs as a separate process using the appropriate language runtime or as a compiled binary. By convention, it accepts HTTP connections on port 9080.

Docker

You can run your Restate service in a Docker container. Most of the Restate service templates come with a Dockerfile that you can use to build a Docker image for your service.

Connecting services with public endpoints

If your service has a public HTTPS endpoint, secure it with request identity validation so that it only accepts requests from the Restate environment you trust. First, obtain the environment’s request identity public key:
Restate Cloud and BYOC environments create and manage the request identity key for you.Copy the environment’s public key from Developers > Security > HTTP endpoints in the Restate Cloud UI.
Then configure the public key in your SDK endpoint:
The public key is not secret, so it is safe to include it directly in your service source code or configuration files. Then register the public URL:

Connecting private services to Restate Cloud or BYOC

Restate Cloud must be able to send discovery and invocation requests to your service. For a service in a private network, a tunnel establishes an outbound connection to Restate Cloud, so you do not need to expose an inbound endpoint. Choose your language and follow the steps to connect your service. TypeScript and Go use a tunnel client in the service process. Java, Kotlin, Python, and Rust use a standalone tunnel client container.
Use the in-process tunnel client to connect your TypeScript service directly to Restate Cloud.
1

Develop your service

Develop your service with the TypeScript SDK. If you are starting a new service, follow the quickstart.
2

Create the tunnel credentials

In the Restate Cloud UI:
  1. Open Developers > API Keys and create an API key with the Full role.
  2. Open Developers > Security > HTTP endpoints and copy the signing public key.
  3. Copy the environment ID and region identifier shown in the UI.
Set the values as environment variables where you will run the service:
Give each distinct deployment its own DNS friendly tunnel name. Replicas of the same deployment should share the same name. For a Restate managed region, use a value such as eu or us. For BYOC, use the region identifier shown in the UI.
3

Run the tunnel client

Install the tunnel package for your SDK:
TypeScript
Replace the normal SDK listener with the tunnel client:
TypeScript
The TypeScript client exposes the deployment URL through connection.deploymentUrl.Request identity validation ensures that your service only accepts requests signed by the Restate Cloud or BYOC environment you trust. The tunnel SDK validates request identity with the signing public key. The public key is not secret, so it is safe to include it directly in your service source code or configuration files.
4

Register the service

Copy the deployment URL printed when the tunnel connects and register it:

Running services behind a load balancer

To spread load across multiple instances of services and higher availability, we recommend using a load balancer. The Restate server does not currently support multiple endpoints for a single deployment. When running an L7 load balancer such AWS Application Load Balancer, be sure to configure it to support HTTP/2 as this enables Restate to use the more efficient bi-directional service invocation protocol.
When using nginx as the load balancer, you must use the grpc_pass directive instead of proxy_pass to forward requests to your services. The proxy_pass directive only speaks HTTP/1.1 to the upstream, which downgrades the connection and prevents Restate from using the bidirectional protocol. The grpc_pass directive keeps HTTP/2 end-to-end. You also need http2 on; on the listener so that nginx accepts HTTP/2 from Restate.
Expandable nginx.conf