This repository contains the configuration and helper tasks to deploy OpenClaw on Google Cloud Run using Terraform. You will be using the mise task runner defined in mise.toml to simplify common operations.
- mise-en-place
- A Google Cloud project with billing enabled
Run the setup task to create required configuration files. Each sub‑task will only create the file if it does not already exist:
$ mise trust
$ mise install
$ mise setupThis will generate:
terraform.tfvars– fill inproject_id,region,billing_id, andmy_email.openclaw/openclaw.json– agent/gateway settings with a random token.openclaw/agents/main/agent/auth-profiles.json– stub auth profile
Edit those files with real values before proceeding.
Make sure the terraform.tfvars has valid variables.
Terraform is used to create a Cloud Run service called openclaw-service.
# initialize terraform
$ mise tf:init
# preview the changes
$ mise tf:plan
# apply the configuration
$ mise tf:apply(When not used IAP) Once deployed the service can be reached via a proxy which handles id‑token authentication:
$ mise run:proxyThis listens on http://localhost:8080 and forwards requests to the Cloud Run URL.
If you want to stop the service use:
$ mise run:stopOpenClaw uses a Cloud Storage bucket for persistent data. The following tasks help sync or clean that data:
mise storage:backup [--exec]– copy bucket contents to./.openclaw/mise storage:deploy [--exec]– push local./.openclawdata to the bucketmise storage:clean [--exec]– delete everything in the bucket
The --exec flag actually runs gcloud; without it you get a dry run.
- gcsfuse-mounted directories are used as-is, so there may be some latency
- If performance is a concern, consider copying the data locally first
- (When not used IAP) You can use
gcloud run services proxyin Pixel Terminal to access the service from a Google Pixel device