Skip to content

feat: GCP Compute Engine + Cloudflare R2 persistence, unified config#22

Merged
PCBZ merged 1 commit into
mainfrom
GCP_CE_R2_rebuild
May 6, 2026
Merged

feat: GCP Compute Engine + Cloudflare R2 persistence, unified config#22
PCBZ merged 1 commit into
mainfrom
GCP_CE_R2_rebuild

Conversation

@PCBZ
Copy link
Copy Markdown
Owner

@PCBZ PCBZ commented May 6, 2026

Summary

  • Add Cloudflare R2 persistence to GCP Compute Engine: rclone restore on boot, 60s periodic sync, shutdown final sync
  • --exclude openclaw.json on all rclone ops so Cloud Run and Compute Engine can share the same R2 bucket for failover
  • Move openclaw.json template to terraform/shared/openclaw.json.tpl (unified for Cloud Run + Compute Engine) with bonjour_enabled, use_plugin_load_paths, slack_enabled, telegram_owner_id toggles
  • Move Cloudflare R2 bucket resource to terraform/shared/cloudflare/ so terraform destroy on Cloud Run does not delete the bucket
  • Restrict Telegram DMs to owner only (dmPolicy: allowlist + allowFrom) when telegram_owner_id is set
  • chmod 600 /root/.openclaw/.env on GCP VM bootstrap

Test plan

  • terraform apply on gcp_vm with R2 vars → verify rclone restores state on boot
  • Verify R2 periodic sync writes to bucket every 60s
  • Destroy Cloud Run, deploy VM → confirm soul/memory accessible from R2
  • Set telegram_owner_id → confirm only owner can DM the bot
  • Verify terraform destroy on Cloud Run does not remove R2 bucket

🤖 Generated with Claude Code

- Add R2 persistence to GCP Compute Engine (rclone restore on boot, 60s
  periodic sync, shutdown final sync); --exclude openclaw.json so Cloud
  Run and Compute Engine can share the same bucket for failover
- Move openclaw.json template to terraform/shared/openclaw.json.tpl
  (unified for Cloud Run and Compute Engine); add bonjour_enabled,
  use_plugin_load_paths, slack_enabled, telegram_owner_id toggles
- Move Cloudflare R2 bucket to terraform/shared/cloudflare/ so
  platform destroy does not delete the bucket
- Restrict Telegram DMs to owner only (dmPolicy: allowlist + allowFrom)
  when telegram_owner_id is set
- chmod 600 /root/.openclaw/.env on GCP VM bootstrap

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@PCBZ PCBZ self-assigned this May 6, 2026
@PCBZ PCBZ added the enhancement New feature or request label May 6, 2026
@PCBZ PCBZ merged commit fe9630c into main May 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant