Why teams move SuiteCRM file storage to Amazon S3
A self-hosted SuiteCRM 8.9 or later instance often keeps documents and images on the local disk of the web server. That works for a single host, but it ties every file to one machine, complicates backups and makes scaling out the web tier harder. Moving media storage to Amazon S3 means SuiteCRM writes private and public files to an S3 bucket instead of the local file system, so the application servers hold no file state of their own. The exact behavior is set by environment variables and the MEDIA_FLY_SYSTEM_STORAGES mapping, which assigns each storage type to a bucket and adapter. Because those keys change between releases, the configuration in this page is a planning guide, and the SuiteDocs reference for the release you run is the authority. Confirm the key names against that reference before you edit anything.
S3 storage fits teams that already run AWS or an S3-compatible service, want bucket-level encryption and lifecycle policies managed by their cloud team, or need file storage that survives the loss of an application host. It is a poor fit if your data must stay on premises and you have no object store, in which case an S3-compatible service you operate is the question to answer first. Before committing, confirm which storage types your instance uses, how large the existing document store is, who owns the bucket and IAM policy, and whether your security team accepts the access model. Those answers decide the design more than the SuiteCRM settings do. The SuiteCRM home page lists the current release lines, so check which one your environment targets.
Which storage mapping fits each file type
Private documents are files users attach to records such as accounts, cases and opportunities. SuiteCRM controls who can see them through its own access checks, so the storage layer should add a second barrier: a bucket or prefix that no public access policy touches. Plan this storage type first, because it holds the most sensitive content and is the hardest to move later.
- Dedicated bucket or prefix: Keep private documents in their own bucket or a prefix whose name makes its purpose clear to the cloud team.
- Public access blocked: Confirm that public access block settings are on for the private bucket and that no bucket policy grants anonymous reads.
- Least-privilege identity: Grant the SuiteCRM identity only the object actions it needs on that bucket, and keep backup identities separate.
- Encryption and recovery: Decide with your security team who manages encryption keys and whether object versioning is needed for recovery.
- Access logging: Enable access logs or data event logging on the private bucket where your retention policy requires them.
Before go-live, request a private object URL anonymously and confirm the request is denied.
Public images such as logos, profile pictures and email assets are loaded by browsers and sometimes by people outside your organization. They need a read path that the private documents do not have. Keep them in a separate bucket or prefix so that a public read policy never applies to a file that might later hold a customer contract.
- Separate location: Store public media apart from private documents so that the public read policy covers only the media location.
- Narrow read policy: Scope any anonymous read permission to the media prefix, and confirm that it does not extend to listing the bucket.
- Write access restricted: Limit upload permissions for public media to the SuiteCRM identity, and to no one else.
- Caching: Decide whether a content delivery network sits in front of the bucket and which cache lifetimes apply to images that change.
- No documents in public storage: Add a rule to your change process that prevents uploads of attachments into the public location.
Test by listing the public location anonymously and confirming that only the intended image paths are readable.
The MEDIA_FLY_SYSTEM_STORAGES mapping ties each storage type in SuiteCRM to a backend, bucket and optional prefix. The exact key names, adapter options and accepted values depend on the SuiteCRM 8 release you run, so confirm them in the release notes for your version before you write the mapping. Do not copy a mapping from an older environment or from a blog post without checking it against the release.
- Storage type names: Confirm the storage type identifiers the release expects, so that every file category maps to one entry.
- Adapter and region options: Confirm the S3 adapter option names and the region setting that the release supports.
- Environment references: Confirm how the mapping reads credentials from
.env.local, and keep literal secrets out of the mapping file. - Upgrade impact: Check whether later minor releases change the mapping format, and record the review in your upgrade runbook.
- Version control: Keep the mapping under version control with the release it was tested against.
The SuiteCRM releases page on GitHub is the starting point for this check. Test one upload per storage type in staging before you change production.
Some organizations run an S3-compatible service on their own servers instead of AWS. The same mapping pattern applies, but compatibility and maintenance status differ by product, so verify the backend before you build on it. MinIO is one example that needs careful review: its community repositories are archived, and its README says the project is no longer maintained, pointing to commercial editions for ongoing support. The last tagged community release listed on GitHub is RELEASE.2025-10-15T17-29-55Z, published on October 16, 2025.
- Maintenance status: Check whether the community project still receives fixes before you select it for production storage.
- License obligations: Review the AGPLv3 terms with your legal team, because the README says commercial use must be validated against them.
- Distribution model: Confirm how you will build and patch the server, since the README says the community edition is distributed as source only.
- Support model: Confirm who answers a production incident, because community support is described as best effort.
- Compatibility testing: Ask the backend vendor for a supported endpoint statement and test the full upload and download path with your SuiteCRM release.
If the backend fails these checks, evaluate a maintained S3-compatible platform such as Ceph before you migrate any files.
Configuration options and when each fits
This table compares the S3 configuration points for SuiteCRM 8.9+ file storage, from credentials to the per-storage-type mapping. Read each row as a decision: when the choice fits your setup and what breaks if it is set wrong. Confirm exact key names in the SuiteDocs configuration reference before you write any values.
| Configuration point | When the choice fits | What changes if it is wrong |
|---|---|---|
| Credentials in .env.local | Access keys issued to a dedicated SuiteCRM IAM user with access limited to the SuiteCRM buckets | Overly broad keys expand the blast radius if the host is compromised; keys in version control expose the account |
| Bucket names per storage type | Separate buckets for private documents and public images when access policies differ | Mixing private and public content in one bucket makes public exposure rules harder to audit |
| Region | The region where the buckets were created, close to the application servers | A mismatched region produces failed requests or errors that look like permission problems |
| Endpoint for S3-compatible services | Only when using an on-premises or self-hosted object store that speaks the S3 API | An unset or wrong endpoint sends requests to AWS instead of your store, so uploads fail or land in the wrong place |
| MEDIA_FLY_SYSTEM_STORAGES mapping | One mapping entry per storage type, so each file category resolves to the bucket intended for it | A missing or misnamed entry causes files of that type to fall back, fail to load or write to an unexpected location |
| Public versus private access | Public for images that users see in browsers; private for documents that need access checks | Making documents public exposes customer records through direct URLs |
| Object store version and vendor | Confirm the vendor is still maintained before selecting it for a new deployment | The MinIO community repositories are archived, so choosing that server for new production storage carries maintenance risk |
How to configure S3 storage for SuiteCRM
This sequence moves SuiteCRM 8.9 or later document and image storage onto Amazon S3 in a fixed order, verifying each change before the next one starts. It ends with a staging instance that reads and writes files in your buckets and a production cutover that keeps the existing files available until they are confirmed.
Confirm the release is 8.9 or later
The platform admin records the SuiteCRM version on both staging and production before changing any configuration, because S3 file storage depends on the 8.9 storage mapping. Confirm the version from the release tag you deployed or from the version your installation reports, and check it against the SuiteCRM 8 compatibility matrix for the PHP, web server and database versions in use. If either environment is older than 8.9, complete the upgrade first and treat it as a separate change. The step is done when the version is written in the change ticket for both environments.
Create buckets and a least-privilege IAM identity
The cloud administrator creates one bucket or clearly separated prefix for each storage type that SuiteCRM will use, typically private documents and public images, and keeps public access blocked on the private bucket. Create a dedicated IAM user or role for SuiteCRM with only the object actions it needs (read, write, delete and list) on those buckets, with no console or bucket administration rights. Check the identity with the AWS CLI: a test object should write, read and delete in the intended bucket, and an attempt to reach a bucket outside the policy should be denied.
Place credentials in .env.local
The platform engineer adds the access key, secret key, region and bucket names to the .env.local file on the application server, using the S3 variable names documented for your 8.9 or later release. Set the file owner to the deploy user and the permissions so only that user and the web server user can read it, and make sure it is excluded from version control. If your policy requires a secret manager, inject the values at deploy time and keep them out of shell history, logs and build artifacts. The step is done when a file listing shows restricted permissions and the repository status does not show the file.
Set the storage mapping for each storage type
The platform engineer sets MEDIA_FLY_SYSTEM_STORAGES so that each storage type points to its own bucket or prefix and uses the S3 adapter, confirming the exact keys and structure in the configuration reference for your release. Keep the private and public storage types separate so public images do not expose private documents. Clear the application caches using the procedure for your installation, then reload the application. The check is that the configuration reports every storage type against S3, with none still pointing at local disk.
Test uploads and downloads on staging
A tester with a non-production user uploads one document and one image through the SuiteCRM interface, opens and downloads both, and deletes the test records afterward. Confirm in the S3 console or with the AWS CLI that each file appears under the bucket or prefix mapped to its storage type, and that the private document cannot be fetched by a direct unauthenticated URL. Confirm that the local media directory is not gaining new files. If staging uses an S3-compatible store instead of AWS, check its license and maintenance status first, because the minio/minio repository is archived and no longer maintained. The step is done when every test file lands in the expected location and every download succeeds.
Migrate existing files and cut over production
Before production changes, take a verified backup of the database and the local file store, then copy existing files into the matching buckets while keeping their paths and storage types. Compare object counts and total sizes against the local inventory, and sample checksums for a selection of documents and images. Schedule the production mapping change for a window agreed with the business, enable the mapping, and open a sample of older records to confirm they display and download. Keep the local copies until the sample checks and a full day of normal use are complete, and record who approved the cutover.
How to migrate existing SuiteCRM files without losing documents
Existing local documents and images do not move to S3 when you change the storage configuration. SuiteCRM will look for new uploads in the bucket, so files already on disk need an explicit copy to S3 under the same paths the application expects, and then a reconciliation step that compares file counts and paths between the local tree and the bucket before you cut over. Plan that comparison as a written check with an owner, not as a visual spot check of a few records in the interface.
Before you copy anything, back up both the files and the database, and confirm the backup restores. Run the migration first on a staging instance built from a recent production copy, and time the copy so you know how long the production window needs to be. Keep the local file store intact after cutover, and do not delete it until the reconciliation passes and a sample of documents opens correctly for users in each storage type. Ask your team who approves that deletion and when it can happen.
Review customizations before you start. The SuiteCRM migration documentation warns that the process may remove non-core files under the public/legacy folder, so any custom code, theme or extension file stored there must be identified and backed up separately. The same review applies to any script you write to sync files, because a sync that treats an unexpected folder as stale can delete data. Confirm with your developers which custom paths exist in your instance before the staging run.
Secrets handling and access controls for S3 credentials
The S3 integration gives SuiteCRM a standing credential with read and write access to every stored document and image, so its protection matters as much as the storage itself. The cards below cover where the credential lives, who can read it, how it changes over time and how the buckets are locked down. The operating model should be confirmed with your security team before go-live.
Keep keys out of version control
Access keys belong in the server's .env.local file, never in the Git repository that holds your SuiteCRM customizations or deployment scripts. Check the repository history as well as the current tree, because a key committed once and later removed is still recoverable. Add .env.local to ignore rules, scan commits with a secret detection tool, and confirm that build pipelines inject values at deploy time rather than copying them from a developer's machine.
Restrict the env file to the web user
Set .env.local so that only the web server user and the administrator who manages the host can read it, typically owner-only permissions owned by the account that runs PHP-FPM or Apache. Any process that can read this file can use the S3 credential, including unrelated services on the same host. Verify the permissions after each deployment, because some deploy tools reset file modes.
Rotate keys on a fixed schedule
Plan rotation before the first production write. Create a new access key, update .env.local, clear the SuiteCRM caches, confirm that uploads and downloads work, then deactivate and delete the old key. Ask your security team for the rotation interval and the emergency procedure for a suspected leak, and record who performs each step so the rotation does not depend on one person.
Scope IAM policies to named buckets
Write the IAM policy for the SuiteCRM user against the specific private and public buckets it uses, with only the object actions it needs to store, read and delete files. Avoid wildcard resources and account-wide administrative permissions. Separate the identity used by SuiteCRM from any identity used by people or other applications, so that a compromised web server cannot list or change unrelated buckets.
Enable encryption and access logging
Turn on default server-side encryption for each bucket and enable server access logging or AWS CloudTrail data events, sending logs to a separate, restricted bucket. Logs show which objects were read and by which identity, which supports incident response and audit evidence. Confirm with your compliance team how long logs are retained and who may review them.
Block public access on private buckets
Enable the account and bucket block public access settings for buckets that hold private documents, so a misconfigured object or policy cannot expose customer files. Serve private files through SuiteCRM's authenticated access rather than public URLs. Review bucket policies after changes, and treat any public bucket as a separate, deliberately approved design.
Questions teams ask before moving SuiteCRM files to S3
What does moving SuiteCRM files to S3 cost, and who pays for what?
Most of the cost is labor, and it is split between your internal team, your AWS account and any partner scope. Internal time goes to reviewing the bucket design, approving IAM policy, and testing document and image access. Cloud charges come from the bucket itself: stored volume, requests, data transfer and any versioning or lifecycle features you enable. A partner quote should list the configuration work, the file migration, staging tests and the handover as separate lines. Ask whether the quote includes an ongoing support retainer, since bucket policy and credential rotation recur. No fixed figure applies here, so compare quotes against the written scope.
How long does the S3 move take?
Duration depends mainly on how many files exist, how large they are, and whether you need a staging run first. A small instance with few attachments moves quickly, while a large document store takes longer to copy, verify and reconcile against database records. Staging adds time because you must confirm that private and public documents, images and previews load correctly before production cutover. Plan a window for a final sync if users keep uploading during the move. Ask any partner to state the file count and total size they assumed, and the staging scope they included.
What do we need to provide before the work starts?
The work needs access and approvals more than code. You will typically provide an AWS account or a sandbox account, an approved IAM role or user for the application, sign-off on the bucket policy and encryption settings, and a copy of your current file storage layout. Test data matters too, so provide representative documents and images from a non-production copy rather than live customer records. Confirm early who owns the AWS account, who can approve policy changes, and how secrets will be shared with the team.
Can our internal team move SuiteCRM files to S3 without a partner?
Yes, a team with Linux, PHP and AWS experience can do it, provided it reads the SuiteCRM 8 storage documentation for your release and tests on staging first. The work involves setting credentials in .env.local, mapping each storage type in MEDIA_FLY_SYSTEM_STORAGES, copying existing files, and verifying every storage type. The main risks are misconfigured permissions, credentials left in version control and files that appear in the database but not the bucket. Consider a partner when no one on the team has done a storage migration, when compliance reviewers need documented evidence, or when the platform must be upgraded at the same time.
Which secrets and access settings create the most risk?
The highest risk is long-lived AWS access keys placed in .env.local and copied into backups, logs or repositories. Use an IAM identity limited to the buckets SuiteCRM needs, restrict actions to the operations the application performs, and block public access unless a public storage type requires it. Keep the .env.local file readable only by the web server user, and rotate keys through a documented process. Confirm with your security team how secrets are injected in production, since a secrets manager or instance role may replace static keys.
How does S3 storage interact with Azure Blob Storage and backups?
A SuiteCRM instance stores files in one configured backend per storage type, so S3 and Azure Blob are alternatives for a given deployment, not layers that run together. Choose the backend before you migrate, because moving files later repeats the copy and verification work. Backups must cover both the database and the file store, and the bucket needs its own retention, versioning and restore test. Confirm with your backup tooling that it can capture S3 objects consistently with the database snapshot, and record the restore procedure in the runbook.
What should we confirm with SuiteCRM and our AWS team before starting?
Confirm the SuiteCRM 8 release you run, since storage support depends on the 8.9 line or later, and check the compatibility matrix for your PHP and database versions. Ask AWS owners which region, encryption option and logging you must use, and whether a bucket policy review is required. Verify the exact environment variable names and storage mapping in the SuiteCRM documentation for your version before editing production configuration.
How SuiteCRM reads and writes files through S3
The diagram starts at the SuiteCRM web application on the application host, which reads storage settings from .env.local and sends each file operation through the storage mapping for its type. Private documents and public images are routed to separate buckets, so the mapping decides where every read and write lands. The trust boundary sits between the host and AWS: credentials cross it, and files leave it. Check that each storage type points at the intended bucket and that the IAM identity can reach only those buckets.
File paths from the SuiteCRM application to private and public S3 buckets across the host boundary.
How DeployOpen works on this
DeployOpen approaches Storing SuiteCRM files in Amazon S3 as a fixed-scope piece of platform work inside your own AWS account and SuiteCRM environment. We agree the storage design, credentials model and migration plan in writing before any change is made, then test and document the result so your team can run it.
How we scope
- We confirm your SuiteCRM 8 version and which storage types need to move to S3.
- We agree how buckets, IAM access and credential handling will be set up in your account.
- The written scope states how existing files will be migrated and how the work will be verified.
How we build
- We configure the .env.local settings and the MEDIA_FLY_SYSTEM_STORAGES mapping on a staging instance first.
- We keep access keys out of version control and apply them through your approved secrets process.
- We test uploads, downloads and permissions for each storage type before any production change.
How we hand over
- You receive the configuration record, bucket policy summary and a runbook for the storage setup.
- We document the file migration steps, the backups taken and the rollback path we tested.
- Your team walks through the handover so they can review and maintain the configuration.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- We can review the storage setup again when you move to a later SuiteCRM 8 minor release.
- Support scope and response arrangements are confirmed in writing before any retainer begins.

