We recommend using Docker primarily for local development and testing. While you can deploy Restate with Docker in production, ensure that the data directory is stored on durable storage. In Kubernetes, this is typically handled by deploying Restate as a StatefulSet with persistent volumes (for example, EBS volumes), allowing pods to restart with the same data. Kubernetes also makes it easier to run distributed Restate clusters. If your Docker setup can provide equivalent durability, such as guaranteeing the same volume is reused across restarts, then running Restate via Docker is perfectly fine.Documentation Index
Fetch the complete documentation index at: https://restate-6d46e1dc-mintlify-java-sdk-v2-7-0-1778569850.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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.