Skip to content

Storage Services (Cloudflare R2)

To maintain stateless VPS environments and enable easy horizontal scaling, all persistent files and backups are offloaded to Cloudflare R2 (an S3-compatible Object Storage service).

1. Tenant Media Bucket

  • Purpose: Stores user uploads, profile photos, and dynamically generated assets.
  • Access: Served publicly via a custom CDN domain (cdn.guildusa.com or similar) to reduce load on the main Nginx web server.

2. Automated Backups Bucket

  • Purpose: A heavily restricted, private bucket specifically for database and infrastructure redundancy.
  • Pipeline: A cron job on the VPS executes nightly at 2:00 AM, dumps the MySQL databases, compresses them, and pushes them to this bucket via the AWS CLI interface.
  • Lifecycle: Configured to automatically delete archives older than 30 days to optimize storage costs.