Single-node Restate Server
To run a single-node Restate server using Docker, you can use the following command.restate in detached mode.
It maps the necessary ports for ingress, admin, and node-to-node communication.
It also mounts a host volume to persist Restate data across restarts.
To run Restate durably, use a persistent volume for the restate-data directory as described in the server overview.
The --node-name flag ensures that the server uses a consistent node name, which is essential for data restoration.
When Restate starts, it looks in the restate-data directory for a folder matching its node name and uses that data.
If a node starts with a different name (for example, node-a finds data for node-b), this mismatch leads to data loss.
Multi-node Restate Cluster with Docker Compose
You can run a Restate Cluster using Docker and Docker Compose. To deploy a 3-node distributed Restate cluster, create a filedocker-compose.yml and run docker compose up.
docker-compose.yml
replicated Bifrost provider and replicates log writes to a minimum of two nodes.
Since we are running with 3 nodes, the cluster can tolerate one node failure without becoming unavailable.
By default, partition state is replicated to all workers (though each partition has only one acting leader at a time).
The replicated metadata cluster consists of all nodes since they all run the metadata-server role.
Since the replicated metadata cluster requires a majority quorum to operate, the cluster can tolerate one node failure without becoming unavailable.
Take a look at the cluster deployment documentation for more information on how to configure and deploy a distributed Restate cluster.
In this example we also deployed a Minio server to host the cluster snapshots bucket. Visit Snapshots to learn more about whis is strongly recommended for all clusters.
See the guide on running Restate with Docker Compose for a step-by-step tutorial.