Store WHMCS attachments in S3
Move ticket attachments off your hosting account to object storage, before they exhaust your inode allowance.
Move WHMCS attachments to S3-compatible object storage. Applies to reseller accounts running WHMCS.
Why bother
Ticket attachments accumulate indefinitely, and they are usually many small files. Two problems follow:
Inodes. Your plan limits the number of files as well as their size. A busy helpdesk can exhaust the inode allowance while using very little disk space, and the symptoms — uploads failing, mail not delivering — look nothing like a file-count problem. See Check your disk usage.
Backups. Every attachment is copied on every backup run, making them slower and larger for data that never changes.
Object storage removes both, and is cheaper per gigabyte than hosting.
Choose a provider
WHMCS works with any S3-compatible service:
| Provider | Notes |
|---|---|
| Amazon S3 | The reference implementation |
| Wasabi | Flat pricing, no egress fees |
| iDrive E2 | Low cost, S3-compatible |
| Cloudflare R2 | No egress fees |
For attachments — written once, read rarely — egress pricing matters more than storage price. A provider without egress fees is usually cheaper in practice.
Configure it
- In your provider's console, create a bucket and generate an access key pair.
- In WHMCS, go to Configuration → System Settings → Storage Settings.
- Add a new storage configuration, choose the S3 type, and enter the endpoint, region, bucket and credentials.
- Validate the configuration before continuing.
- Against Attachments, select your new storage and migrate the existing files.
WHMCS moves them and updates its references.
Migration moves the files. Take a backup of the attachments directory first, so a failed migration does not leave you without them — see Download a backup of your account.
Keep the bucket private
The bucket must not be publicly readable. Ticket attachments routinely contain customer data, server details and occasionally credentials. WHMCS signs its own requests, so public access is never required — and a public bucket is discoverable.
Use a key scoped to that bucket alone, not a root account key.
Check it worked
Open a ticket with an attachment, then confirm it appears in the bucket and still downloads correctly through WHMCS. Then check an older attachment, to confirm the migration carried them across.