Remediation Hub (9)
Offload Chatwoot ActiveStorage Attachments to S3 Object Storage
Switching ActiveStorage from local disk to S3-compatible object storage stops attachment disk-full crashes and makes VPS migrations effortless.
Env: ACTIVE_STORAGE_SERVICE=s3_compatible | Disk Saved: 80%+
Required S3_COMPATIBLE Environment Keys
Set ACTIVE_STORAGE_SERVICE=s3_compatible, S3_BUCKET_NAME, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, and S3_ENDPOINT (for R2, MinIO, or S3-compatible buckets). Restart both rails and sidekiq so background thumbnail jobs use the same bucket.
Syncing Existing Local Attachments Before Switching
Before flipping ACTIVE_STORAGE_SERVICE on a live server, sync /app/storage keys into your bucket preserving the two-level ActiveStorage directory prefix, or serve historical blobs until verified.
Measured Thresholds & Configuration
| Storage Mode | VPS NVMe Consumption | Snapshot / Migration Speed |
|---|---|---|
| local (/app/storage) | Grows indefinitely (100% disk risk) | Slow (tens of GB volume tar) |
| s3_compatible (Object Store) | Near-zero attachment disk growth | Fast (Postgres dump only) |