Deploy & Host Restate | Railway

Deploy and Host Restate on Railway

Restate is a durable execution engine for building resilient services, workflows and agents. Your code, written with the Restate SDKs for TypeScript, Java, Kotlin, Go, Python or Rust, runs as normal HTTP services, and Restate journals every step so that handlers survive crashes, retries and restarts with exactly-once semantics.

About Hosting Restate

This template deploys Restate Server v1.7.12 as a single node with its log and state on a Railway volume, plus a Caddy gateway with two public domains. The ingress domain requires a bearer token and is where clients invoke your services. The admin domain serves the Restate UI and admin API behind basic auth. Restate itself stays private and uses a fixed node name, so its data survives redeploys. Deploy your service code as another Railway service and register it with the admin API. The Hobby plan fits development and small production loads.

Common Use Cases

Dependencies for Restate Hosting

Deployment Dependencies

Implementation Details

Service Image Networking Storage
restate restatedev/restate:1.7.12 private: ingress 8080, admin 9070 volume at /restate-data
gateway caddy:2.11.4-alpine public ingress domain (8080) and admin domain (9071) none

Register a service deployed on Railway and call it:

curl -u "admin:$RESTATE_ADMIN_PASSWORD" https:///deployments \
  -H "Content-Type: application/json" -d '{"uri": "http://my-service.railway.internal:9080"}'
curl https:///Greeter/greet -H "Authorization: Bearer $RESTATE_INGRESS_TOKEN" \
  -H "Content-Type: application/json" -d '"Railway"'

Services inside the project can call ${{restate.RESTATE_PRIVATE_INGRESS_URL}} directly.

Variable Service Default Purpose
RESTATE_NODE_NAME restate restate-1 Stable node identity across redeploys
RESTATE_INGRESS_TOKEN gateway generated Bearer token for the public ingress
RESTATE_ADMIN_USERNAME / _PASSWORD gateway admin / generated UI and admin API login

Notes:

Why Deploy Restate on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Restate on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.