Why move Moodle file storage to S3 or Azure Blob with objectfs
If your Moodle file store keeps growing, your environment refreshes take longer each term, or several Moodle instances need the same files, moving file storage out of the local Moodle data directory to object storage is worth evaluating. The Object storage file system plugin (tool_objectfs), maintained by Catalyst IT, moves Moodle file storage to Amazon S3 or Azure Blob Storage. Sites use it to offload large files, deduplicate content across Moodle instances and speed up environment refreshes, because a copy of a site no longer has to duplicate every stored file on disk. The plugin's directory listing shows support for Moodle 2.7 to 4.5, which is well behind the current releases, so the version check comes first. Confirm which Moodle version you run and whether the plugin has a release for it before you plan anything else. Then confirm the version of the plugin you would install against your target Moodle version, since the directory listing may not reflect the newest releases.
Start by inventorying what the site stores and how it is used. Measure the size of the Moodle data directory, the share of it made up of large files such as video and backups, and how many files are duplicated across courses or instances. Record how long a copy of production takes to refresh into a test environment today, since that is the baseline the plugin should improve. Ask your Moodle administrator or hosting provider for the current file storage layout, the backup approach and the number of Moodle instances that would share the same bucket or container.
Object storage changes how files are served, backed up and recovered, so the decision also needs your security and operations teams. Confirm the bucket or container access model, encryption settings, retention and lifecycle rules, and how restores are tested. Check which cloud account and region the data will sit in against your residency requirements. Ask the plugin's maintainers and your Moodle partner for their current guidance on migrating existing files, rollback and monitoring, and confirm those steps in a test environment before any production change.
What you need before you install tool_objectfs
Object storage changes where Moodle keeps its files, so the checks that matter sit on both sides: the Moodle release and plugin support, and the storage and network the site will depend on. Work through these cards before any configuration, and record the answers in the change request.
Confirm plugin support for your Moodle version
The directory listing for tool_objectfs shows support for Moodle 2.7 to 4.5, which may not cover the release you run or plan to run. Check the listing against your current version and the version you will upgrade to, then read the plugin's own documentation and release notes for anything newer. If support is unclear, treat it as a blocker and ask the plugin maintainers or your partner to confirm before you plan the storage cutover.
Plugin directory listingMatch PHP and database versions
Each Moodle major release sets its own minimum PHP and database versions, and an upgrade can fail on the server side before the plugin is ever involved. Moodle 5.1 requires 64-bit PHP 8.2 or later, while Moodle 5.3 requires 64-bit PHP 8.3 or later and PostgreSQL 17. Compare your current stack with the release notes for the target version and align the PHP extensions the plugin needs in the same change.
Moodle 5.3 release notesProvision a bucket or container
Create a dedicated S3 bucket or Azure Blob Storage container for Moodle file content, separate from backups, logs and other applications. Decide the region or storage account location, versioning and encryption settings up front, since changing them later affects existing objects. Confirm with your storage team how lifecycle rules and retention interact with Moodle's own file deletion.
Use a least-privilege storage identity
Give Moodle a storage identity that can read, write and delete objects only in the Moodle bucket or container, and nothing else. Avoid reusing administrator keys or broad service principals from other systems. Store the credentials in a secrets manager or protected configuration, and plan how they will be rotated without taking the site offline.
Open network paths from every Moodle node
Both web nodes and the cron or task runners need outbound access to the storage endpoint, so test each tier separately. A missing route on a cron host often shows up only when scheduled file deletion or sync runs. Confirm DNS resolution, TLS certificate trust, proxy rules and any egress firewall policy for the endpoint your region or account uses.
Test a full backup before changing storage
Take and restore a backup of the Moodle database and the existing filedir directory before the plugin touches any file. Restore it to a separate environment and confirm that course files, file picker content and assignment submissions open correctly. Keep this backup until the migration has run cleanly through at least one full cycle of cron tasks and user activity.
How objectfs sits between Moodle and the storage service
The diagram starts with a learner's upload through Moodle web and follows the file through the objectfs plugin, which decides where the file bytes are kept while Moodle's database keeps the file record. Downloads take the reverse path, with objectfs fetching content from the bucket or container when it is not held locally. The trust boundary around the storage account is the line to check: the bucket or container, its access policy and its network path should sit inside the controls your security team reviews. Confirm with your own configuration which copies, if any, remain in the local filedir cache.
Upload and download paths between Moodle, objectfs and the object store.
Which reasons justify the move for your site
Moodle stores every uploaded file in its file system, and over years that data often grows faster than course content. Large media, backups kept on the same server, and old submissions can fill local disks and force costly volume expansions. The objectfs plugin (tool_objectfs) moves file content to Amazon S3 or Azure Blob Storage, where capacity is billed by usage and can be sized independently of the Moodle web and database servers.
- Local disk pressure: Moving file content out of the Moodle data directory can postpone disk expansion on application servers.
- Large file handling: Big video and archive uploads are the most common reason for growth, so confirm which file types and sizes dominate your site before you migrate.
- Storage class choice: Decide which object tiers hold recent files and which hold older content, and whether to use lifecycle rules to move cold objects.
- Retention and deletion: Define how long deleted and superseded files remain in the bucket, since object storage does not clean up by itself.
- Bucket ownership: Name the team that owns the bucket, its access keys, encryption settings and billing alerts.
The move does not shrink the Moodle database, so large quiz attempts, logs and course backup sizes will not change. Ask your provider and your team to confirm the storage cost model in writing before you assume savings.
Organizations that run several Moodle sites, such as a test site and a production site or separate departmental sites, often store the same course files more than once. objectfs can deduplicate content across instances that point at the same bucket, so a file uploaded once is stored once even when several sites hold a reference to it. This reduces duplicate storage and keeps shared resources consistent across sites.
- Shared bucket design: Decide whether all instances use one bucket with separate prefixes or separate buckets with explicit sharing, because the access model follows from that choice.
- Isolation between sites: Confirm that one site cannot read or delete another site's content, since shared storage widens the blast radius of a credential leak.
- Access keys per site: Issue separate credentials per instance so you can revoke one site without affecting the others.
- Deletion across sites: Agree how a file removed on one site is handled when another site still references the same object.
- Version alignment: Check that every instance sharing a bucket runs a supported Moodle and plugin version, because upgrades on one site can change how content is written.
Deduplication does not merge courses, users or permissions between sites, and it does not fix slow course backups or a large database. Confirm the plugin's supported Moodle versions in the plugins directory before you commit to a shared design.
Staging and test copies of Moodle usually need a recent copy of production data. When file content lives on the local server, copying a site means copying a large data directory alongside the database, which slows refreshes and consumes disk on every test host. With objectfs, a refreshed test site can point at the same bucket or a copy of it, so the file layer does not need to be duplicated on each environment. Teams often report this as a practical gain, but the time saved depends on your bucket layout and network path, so measure it on your own site.
- Database-only refresh: A test copy can restore the database and reuse the bucket, which removes most of the file transfer from the refresh.
- Write isolation: Decide whether test sites read production objects only or write to a separate bucket, so test activity does not alter production files.
- Data protection: Test copies of personal data need the same controls as production unless you mask or limit that data.
- Refresh procedure: Document the steps for pointing a copy at the right bucket and for rotating its credentials.
- Cleanup: Schedule removal of test buckets or prefixes so that old copies do not keep accruing storage charges.
This approach does not reduce the database restore time, and it does not speed up course backups, which still read every file they include. Ask your team to test one full refresh end to end before relying on it in a release process.
How to configure objectfs step by step
This sequence moves Moodle file storage to S3 or Azure Blob Storage in stages, so each layer is proven in a non-production site before any production file leaves the local file system.
Confirm the Moodle version and plugin listing
The platform team checks the Moodle version in the site administration notifications and compares it with the tool_objectfs listing in the Moodle plugins directory, which shows support for Moodle 2.7 to 4.5. If the site runs Moodle 5.1 or later, the team confirms that the plugin version it plans to install is listed for that release before going further. Where the listing does not cover the running version, the team asks the plugin maintainer or DeployOpen to confirm compatibility in writing. Done when the version and the plugin's supported range have been recorded in the change ticket.
Provision storage and identity in a non-production site
The cloud team creates a test bucket or Azure Blob container, a dedicated identity with access limited to that one storage location, and encryption and logging settings that match the production policy. The Moodle team clones the production database and file store into a non-production environment so tests run against realistic content without touching live files. Done when the non-production site can reach the storage endpoint from its network and the identity can list and write objects in the test location only.
Install the plugin and check the document root
An administrator installs tool_objectfs in the non-production site through the Moodle plugin installation process, then runs the upgrade so the database tables are created. On Moodle 5.1 and later, the web server document root must point to the /public directory, not the main Moodle folder, so the team confirms that the site loads normally and that the plugin's settings page is reachable at the expected path. Done when the plugin appears under installed plugins with no errors in the upgrade log.
Set the storage backend and connection details
The administrator selects Amazon S3 or Azure Blob Storage in the plugin settings and enters the bucket or container name, region or endpoint, and the credentials for the identity created earlier. Credentials are stored through the secrets approach the organization already uses, and the Moodle server configuration is kept out of shared version control. Done when the plugin's connection test reports a successful connection and the Moodle log shows no authentication failures.
Run a test upload and download round trip
The tester uploads a small set of known files through a course resource, an assignment submission and a profile image, then opens each one from a student and a teacher account. The team then checks the bucket or container directly to confirm that the objects exist under the expected prefix and that local copies behave as the plugin's settings describe. Done when every test file downloads with the same checksum as the original and the storage listing matches the Moodle file records.
Enable offloading in stages
The team enables object storage for a small pilot group, such as one course category or a test cohort, and monitors scheduled task logs, web server errors and storage request metrics for a period the organization sets. Once the pilot shows clean downloads and no missing-file reports, the team widens the scope in steps until all content is offloaded. Done when the pilot has run through its review window without missing files and each widening step has a recorded sign-off.
Plan the migration of existing files
The team agrees with the business owners how existing files will move, whether all at once in a planned window or in batches tied to the staged rollout, and sets a rollback point with a verified backup of the file store and database. The plan names who runs the transfer, how file counts and sizes are reconciled afterward, and how the legacy local copies are retired. Done when the migration runbook has been rehearsed in the non-production site and the reconciliation report matches the source file inventory.
What maps between Moodle files and the storage service
This table shows where each part of a Moodle file goes after objectfs moves content to S3 or Azure Blob Storage, and what your team must decide for each. Read the plugin behavior rows as points to confirm in the tool_objectfs documentation for your version, and the site decision rows as choices your team owns before cutover.
| Moodle item | Where it lives after the move | What the team must decide |
|---|---|---|
| File content | Object in the bucket or container, keyed by content hash, with a local copy only where the plugin keeps one | Whether to offload all files or only large ones, and how long local copies are kept (confirm the plugin's behavior) |
| File metadata in the Moodle database | Stays in the Moodle database; file records still point to the content | Confirm that database backups now cover metadata but not the object content, and plan for both |
| Local file directory (moodledata) | Still required for temporary files, caches and any content not yet offloaded | Size the local volume for these items and decide whether it is shared across web nodes |
| Bucket or container | One bucket or Azure container holds the offloaded content for this site | Naming, versioning, lifecycle rules, encryption and whether instances share a bucket |
| Content hash used for deduplication | Object key derived from the file content, so identical files map to one object | Confirm how deduplication works across instances before sharing a bucket between sites |
| Credentials | Access keys or identity used by Moodle to reach the bucket or container | Least-privilege policy, rotation process and where secrets are stored |
| Region or endpoint settings | Configured in the plugin; must match where the bucket or container exists | Data residency requirements and whether a private endpoint or custom endpoint is used |
Securing the storage identity and file access
Moodle file storage on S3 or Azure Blob Storage gives a single set of credentials access to every file a site holds, so the identity, its secrets and the paths to the storage endpoint deserve as much design as the plugin configuration. The six controls below cover who can reach the bucket or container, where credentials live, how data is protected and logged, and who can change the settings that point Moodle at it.
Dedicated least-privilege identity
Create a separate identity for objectfs that can only read and write objects in the one bucket or container Moodle uses. Do not reuse an administrator key, a key shared with other applications, or a role that can list every bucket in the account. Confirm the exact actions the plugin needs in the plugin's documentation and in your provider's console, then test that the identity is refused on other buckets, containers and account-level operations.
Secrets stored outside Moodle code
Keep the storage access key or client secret in your secrets manager or the host's secret store, not in config.php, a Git repository or a shared runbook. Confirm how your deployment tooling injects the value at runtime, who can read it, and how it is rotated without editing files on every web node. Check that the value does not appear in Moodle's logs or in exported configuration backups.
Encryption at rest and in transit
Confirm that the bucket or container encrypts stored objects, and whether you manage the keys or the provider does. Require HTTPS between Moodle and the storage endpoint, and check that the plugin's endpoint setting does not allow plain HTTP. Ask the provider which encryption options exist for your region and account type, and record the choice so auditors can trace it.
Access logging and alerting
Turn on request logging for the bucket or storage account and send the logs to a location your security team monitors. Alert on unusual activity such as bulk downloads, access from unexpected addresses or repeated denied requests from the Moodle identity. Logs from the storage side help answer which files were read during an incident, which Moodle's own logs cannot always show.
Restricted network paths
Where the provider supports it, limit the storage endpoint to traffic from your web and cron servers, for example through a private endpoint, a VPC endpoint or an IP allow list. Test that Moodle still serves files after the restriction and that objects cannot be reached from a workstation with the same key. Confirm the options in the provider's documentation, since private connectivity often changes cost and DNS setup.
Review of plugin settings access
The objectfs settings control where every file is read and written, so limit who holds the Moodle site administrator role and review changes to the plugin configuration. Changing the bucket, endpoint or identity can route file traffic to another account. Record who can edit these settings, and check the site's configuration change log after each upgrade or plugin update.
How to test a file storage move before users see it
Test the move against a copy of production files in a staging environment before any user-facing traffic reaches the new storage. The staging copy must include the full file store and database, because objectfs stores file content in the object store while Moodle keeps file metadata in its database, and a mismatch between the two is the most common cause of missing files after a move. Run the migration task on the copy, then record file counts and total size on both sides so the numbers can be compared before anyone signs off. Confirm that the staging site runs the same Moodle version and PHP and database versions as production, since the release notes for the version you run set those requirements and a version mismatch will invalidate the test.
Work through a fixed checklist on the staging site. Upload files as a teacher and as a student, download them, and open file previews for common types such as PDF, images and office documents. Check that files attached to course resources, assignments and forum posts all resolve. Run a backup and restore of a course that contains files, then confirm the restored course still points at the object store. Exercise the scheduled tasks that read or delete files, including the file cleanup and any task that rebuilds the file index, and review the task logs for errors. Finally, refresh a clean test environment from the new storage and confirm it loads files without copying them from the old location, which is the speed benefit that objectfs is usually chosen for.
Write the rollback plan before the cutover date, not during it. Keep the local file store intact until the new storage has passed the full checklist and has run through at least one normal cycle of backups and task runs, and record the configuration state needed to switch back. Name one owner who can approve the cutover and one who can order a rollback, and give the security or compliance contact a sign-off step if files contain regulated student or staff data. Confirm with your storage team how bucket or container access, encryption and retention are set up before sign-off, because those settings sit outside Moodle and are often the reason a test passes in staging and fails in production.
Common failures when moving Moodle files to S3 or Azure
This table pairs common symptoms seen after moving Moodle file storage to S3 or Azure Blob Storage with their likely causes and the fix to try first. Read it during cutover planning and again when a file-related ticket appears, starting from the symptom that matches what users report. Most failures trace back to plugin version mismatch, document root settings, credentials, network paths or an incomplete copy of existing files.
| Symptom | Likely cause | Fix |
|---|---|---|
| Plugin will not install or fails on upgrade | The installed version of the Object storage file system plugin (tool_objectfs) does not match the Moodle version in use, since its directory listing shows support for Moodle 2.7 to 4.5 | Confirm the plugin version supports your exact Moodle release before upgrading core. Check the plugin's issue tracker for version-specific problems and test on a staging copy first |
| Directory listings or errors after upgrading to Moodle 5.1 | The web server document root still points to the main Moodle folder instead of the new /public directory | Change the document root to /public in the web server configuration, reload the server and confirm the site loads without listings |
| Uploads succeed but files show as missing or fail to download | Access keys or role policies are scoped too narrowly, or the credentials have expired or been rotated | Grant the bucket or container read, write, list and delete rights the plugin needs, rotate credentials in the plugin settings and test an upload and download |
| Connection timeouts to the storage endpoint | Firewall, proxy or security group rules block outbound traffic from web and cron servers to the S3 or Azure endpoint | Allow HTTPS egress from every Moodle node that serves requests or runs cron, including through any corporate proxy, and test from each host |
| Some course files return not found after migration | The copy to object storage stopped partway, or the file system tasks did not finish before cutover | Check the plugin's task and status reports, rerun the copy for remaining content hashes and compare counts against the old file directory before retiring local copies |
| Restores bring back the database but not the files | Backups cover the database and the local file directory but not the bucket or container, or the object storage versioning and retention settings were not included | Document the object store in the backup plan, include it in restore tests and confirm that a restore to a clean environment returns both the database and the stored files |
| Pages and downloads are slow for users far from the storage region | The bucket or container sits in a distant region from the Moodle servers, so each file read crosses a long network path | Choose a storage region close to the application servers, consider local caching settings in the plugin and measure read times from the user regions you serve |
Questions buyers ask about objectfs on S3 or Azure
How much does it cost to move Moodle file storage to S3 or Azure?
The cost is driven by scope, not by a list price. Your bill has two parts: the engagement fee, which covers planning, installing and configuring the Object storage file system plugin (tool_objectfs), testing and cutover, and the cloud spend that follows. The engagement fee rises with the number of Moodle instances, the volume of files to migrate, how deep the testing must go and how much of your cloud setup (buckets, identity, network paths, backups) has to be designed from scratch. Ask for a written quote that lists each instance, the storage account or bucket layout, the test plan and who performs the cutover. DeployOpen does not publish prices, so a quote follows from that written scope.
How long does an objectfs migration take?
Duration depends on how many instances share the work, how many files and how much data must be copied, how many test cycles your business owners want before cutover, and how quickly your cloud accounts and access approvals are ready. Large file volumes extend the copy and verification steps, while a single small site with an existing cloud account moves faster. Your change approval process and maintenance windows also set the pace. Ask for a timeline in the written scope that separates planning, a test environment run, the production cutover and a post-cutover review, and check which of those steps depend on your team's responses.
What does our team need to provide before the work starts?
You need to provide cloud accounts with rights to create storage (an Amazon S3 bucket or an Azure Blob Storage container), identity and access settings for the Moodle servers, and network access between Moodle and the storage endpoint. A test environment that mirrors production closely enough to prove file reads, writes and restores is essential. Name one owner who can make decisions on scope and acceptance, and agree maintenance windows for the cutover and any rollback. Confirm your data retention and backup rules for the object store before the plan is set, because they change how the bucket and replication are configured.
Can our internal team do this without a partner?
Yes, a team with Linux, PHP and Moodle administration experience and working knowledge of S3 or Azure Blob Storage can do it, and the plugin is installed and configured through Moodle's administration pages. The points that usually need experienced hands are the permissions model in the cloud account, the storage configuration for each instance, testing restores and the cutover sequence, plus the upgrade path after go-live. Assess your team's experience with each cloud and with Moodle upgrades honestly. If the work depends on one person, plan for cover before you start.
Does objectfs support the Moodle version we run?
Check this before you commit. The plugin directory listing for Object storage file system (tool_objectfs) shows support for Moodle 2.7 to 4.5, so a site on a later release must confirm the current plugin version and its compatibility statement before planning the move. Moodle 5.1 and later also change the web server document root to the /public directory, so the storage plan has to be checked against your upgrade plan at the same time. Ask the implementation team to confirm the plugin version that matches your Moodle release in a test environment, and record that result in the scope.
What recurring costs remain after go-live?
Recurring costs have three sources. The first is cloud storage charges for the files held in the bucket or container, which grow with file volume and retention. The second is request and transfer charges, which depend on how often Moodle reads and writes files and how users download them. The third is support: plugin updates, Moodle upgrades that need the plugin re-tested, monitoring, restore drills and any changes to the cloud account. Ask for the storage tier, the expected file growth you are planning for, and whether the retainer covers upgrades and continuous testing. DeployOpen offers ongoing support and upgrades as retainers.
How is data kept safe when files move to the cloud?
Files move from the local file system into object storage, so access rules, encryption settings and backups must be designed for the new location. Use a dedicated cloud identity for Moodle with the narrowest permissions that allow the plugin to read and write, keep the bucket or container private, and make sure your backup process covers both the database and the object store. Test a full restore before cutover, because a file that exists in the cloud but cannot be recovered does not protect you. Confirm your encryption and key management requirements with your security team before the design is fixed.
How DeployOpen scopes and delivers a Moodle storage move
DeployOpen plans the move of Moodle file storage to S3 or Azure Blob Storage as a fixed-scope piece of work in infrastructure you control. The written scope covers the storage target, the objectfs configuration, testing against a copy of your data, and the runbook your team keeps after handover.
How we scope
- Confirm your Moodle version against the objectfs directory listing before any other planning starts.
- Record the target storage service, bucket or container layout, and whether files stay on local disk as a fallback.
- Agree in writing which file areas move, how existing files are migrated, and what counts as done.
How we build
- Configure objectfs in a staging copy of your site with the same Moodle version and plugins as production.
- Set network paths, credentials and encryption settings for the storage account in your own cloud or data center.
- Test uploads, downloads, backups, restores and environment refreshes against the staging copy before any cutover.
How we hand over
- Deliver a runbook covering configuration keys, credential rotation, bucket policies and the cutover record.
- Document how to roll back to local file storage if a fault appears after the move.
- Walk your administrators through daily checks, including storage errors in logs and scheduled task results.
How we support
- Offer ongoing support, upgrades and testing as a retainer once the move is complete.
- Plan the objectfs check again before each Moodle major upgrade, since plugin support changes by release.
- Keep the runbook current when storage accounts, credentials or Moodle versions change.

