clawops

Configuration

The two config files, clawops' own, and OpenClaw's.

There are two separate things called config, and keeping them apart saves confusion.

LivesHoldsChanged with
clawops config~/.clawops/config.json on your machinestacks, regions, state URLs, SSH paths, spending limitsclawops init, clawops setup, edit directly
OpenClaw configon the deployed hostgateway, models, channels, agentsclawops config set, plan overlay

clawops config

Written by clawops init, and it holds no secrets, only connection metadata: which provider a stack uses, its region, where its Pulumi state lives, and the paths to your SSH key and known_hosts.

{
  "version": 1,
  "defaults": { "stack": "prod", "provider": "aws" },
  "stacks": {
    "prod": {
      "provider": "aws",
      "region": "us-east-1",
      "stateUrl": "s3://clawops-state-614126170912-us-east-1/clawops",
      "credentialsRef": { "source": "env", "envVars": ["AWS_PROFILE"] }
    }
  },
  "ssh": { "keyPath": "~/.clawops/id_ed25519", "knownHostsPath": "~/.clawops/known_hosts" }
}

credentialsRef is a reference, not a credential. It records which environment variable or profile to read at run time.

stateUrl is the only pointer to your state

Changing a registered stack's stateUrl orphans everything Pulumi knows about that deployment. clawops init refuses to overwrite a registered stack without --force for this reason.

Spending limits

An optional policy block limits what clawops will deploy from this machine:

"policy": {
  "allowedInstanceTypes": { "aws": ["micro", "small"], "gcp": ["e2-small"] },
  "maxStacks": 3
}
  • allowedInstanceTypes: per provider, the server sizes clawops may deploy. Use a clawops size (micro, small, medium, large) or the provider's own type; small and t3.small are the same entry on AWS. A provider with no entry is unrestricted.
  • maxStacks: how many deployments this config may hold. Absent means no cap.

clawops plan, clawops apply and clawops up refuse a size outside the list, and clawops init refuses a new stack beyond the cap. The same checks apply to every MCP tool that deploys, with the same words. The easiest way to set them is clawops setup, which asks before the server-size question and then offers only the sizes you allowed.

Why it lives here and not in the plan

A plan is what you, or an agent, generate. A limit written into the plan would be set by whoever it is meant to limit. No MCP tool can change this block.

OpenClaw config

Read and written through clawops, so it is validated before it lands:

clawops config get models
clawops config set gateway.port 18789 --dry-run   # show the diff, change nothing
clawops config set gateway.port 18789

Validation runs against OpenClaw's own schema. A key the runtime would reject is refused here rather than restarting the gateway into a broken state.

A plan can also carry a config overlay, which is applied at deploy time. That is how you get a reproducible deployment rather than a series of manual config set calls.

Secret references

Config never contains secret values. It contains references, resolved at apply time:

{ "models": { "providers": { "anthropic": { "apiKey": "$secret:ANTHROPIC_API_KEY" } } } }

See Secrets for where those values live and how to rotate them.

Full configuration reference →

On this page