: Fix File References After Server Migration (Ruby on Rails / PostgreSQL / S3)

Job ID: 40231181

Budget: $10 – $30 CAD

We recently migrated a self-hosted Chatwoot instance from one server to another using Docker Compose. The migration included:

PostgreSQL database (dump & restore)
File storage migration from MinIO (old server) to DigitalOcean Spaces (S3-compatible)

The problem: After migration, all new messages and file uploads work perfectly. However, files from conversations before the migration are broken — images, PDFs, and documents sent/received prior to migration no longer open.
The old Chatwoot stored files in a MinIO bucket named chatwoot. The new setup uses DigitalOcean Spaces with a bucket named chatwoot-plantaocontabil. The files have been copied over, but the internal references (ActiveStorage blob keys/paths) no longer match the new storage structure.
Example of a working URL (new file):
https://chat.domain.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMi.../file.jpg
Example of a broken URL (old file):
https://chatwoot-plantaocontabil.nyc3.digitaloceanspaces.com/chatwoot-plantaocontabil/ld0rmmy2pqw5yxeh.../file.pdf
It appears the old files expect to be found under a path like chatwoot-plantaocontabil/ inside the bucket, but the actual files may be at the root level — or the STORAGE_BUCKET_NAME configuration changed from chatwoot to chatwoot-plantaocontabil, causing a path mismatch.
What We Need

Diagnose the exact path mismatch between what ActiveStorage/Rails expects and where the files actually are in DigitalOcean Spaces.
Fix the file references so all old conversation attachments (images, PDFs, audio) work again. This could involve:

Adjusting the S3/Spaces folder structure to match what the database expects
Updating ActiveStorage blob records in PostgreSQL if needed
Correcting environment variables (STORAGE_BUCKET_NAME, STORAGE_ENDPOINT, etc.)


Verify that both old and new files work correctly after the fix.

Technical Environment

Chatwoot (latest version) running via Docker Compose on Ubuntu 22.04 (DigitalOcean Droplet)
PostgreSQL 15 (Docker container)
Redis (Docker container)
DigitalOcean Spaces (S3-compatible object storage with CDN enabled)
Previous storage: MinIO on Hostinger VPS

Required Skills

Ruby on Rails (ActiveStorage knowledge is essential)
PostgreSQL
S3-compatible object storage (MinIO, DigitalOcean Spaces, AWS S3)
Docker / Docker Compose
Chatwoot self-hosted experience is a plus

Access
We can provide SSH access to the server and DigitalOcean Spaces credentials. The work can be done via screen sharing or direct access.
Budget
Fixed price. Please quote based on the scope described above. We expect this to be a relatively quick fix for someone experienced with Rails ActiveStorage and S3 migrations.