Skip to content

Advanced operations

Railway automation

Drive Railway through OpenCircle's structured noninteractive host contract.

Automation follows the same Railway product journey as a human administrator would. It never receives a Railway access token, owner password, PIN, raw claim, image digest, or recovery code on the command line.

Plan

Terminal

opencircle host plan \
  --backend railway \
  --workspace "$RAILWAY_WORKSPACE_ID" \
  --project-name "$OPENCIRCLE_PROJECT_NAME" \
  --provider-config /absolute/protected/providers.toml \
  --all-providers --json

Require mutationAuthorized: false, the intended payer, and provider names without values in the output — with no blocking notice.

Deploy

Terminal

opencircle host deploy \
  --backend railway \
  --workspace "$RAILWAY_WORKSPACE_ID" \
  --project-name "$OPENCIRCLE_PROJECT_NAME" \
  --provider-config /absolute/protected/providers.toml \
  --all-providers --yes --json --no-open-browser \
  --progress jsonl --finish guide

Progress streams as redacted JSON lines on stderr; the final stdout is deterministic JSON. A deployed but unclaimed Server is action required, not complete.

Resume and inspect

Terminal

opencircle host resume --backend railway --launch "$OPENCIRCLE_LAUNCH_ID" --json --no-open-browser
opencircle host inspect --backend railway --launch "$OPENCIRCLE_LAUNCH_ID" --json

Resume reconciles the same project. Store the non-secret receipt only — never log the raw claim capability or provider values.

Upgrade and recover

Railway maintenance needs a separate protected recovery file — review its schema in Railway upgrade and recovery before automating it.

Terminal

opencircle host upgrade \
  --backend railway \
  --launch "$OPENCIRCLE_LAUNCH_ID" \
  --recovery-config "$OPENCIRCLE_RECOVERY_CONFIG" \
  --yes --json

If interrupted or left pending, continue the same operation rather than starting a second upgrade:

Terminal

opencircle host resume \
  --backend railway \
  --launch "$OPENCIRCLE_LAUNCH_ID" \
  --recovery-config "$OPENCIRCLE_RECOVERY_CONFIG" \
  --json --no-open-browser

Destroy

Terminal

opencircle host destroy \
  --backend railway \
  --launch "$OPENCIRCLE_LAUNCH_ID" \
  --confirm-project "$OPENCIRCLE_RAILWAY_PROJECT_ID" \
  --json

Completion requires a verified cleanup receipt and a fresh inventory showing no receipt-owned survivors.