Overview
This documentation needs work. See "Help improve this page" in the sidebar.
This page explains the ideas you'll see used throughout the rest of this
guide. It doesn't walk through any configuration — that starts on the next
page, Requirements & Installation.
What problem does this solve?
By default, Drupal stores uploaded files on the same server that runs the
website. That's simple, but it creates real limits as a site grows:
- Every server running the site needs access to the same files, which
usually means extra infrastructure just to keep them in sync. - The disk fills up, and growing it means touching the server itself.
- Backups, migrations, and scaling all get harder when files and
application code are tangled together on one machine.
Flysystem solves this by putting a translation layer between Drupal and
wherever your files actually live. Drupal keeps asking for files the same
way it always has; Flysystem is what actually reads and writes them,
wherever "there" is.
What's a "scheme"?
You've already used this idea, even if you've never heard the word.
Drupal's own uploaded files live at addresses starting with
public:// or private:// — those prefixes are
called schemes, and they're what tells Drupal which
storage location a given file belongs to.
Flysystem lets you define your own schemes. If you set one up named
media, every file stored through it gets an address like
media://2026/06/photo.jpg — and from that point on, Drupal
treats it exactly like it treats public:// or
private:// files, because as far as Drupal's file system is
concerned, that's exactly what it is.
You can also point Drupal's own public:// or
private:// scheme at Flysystem instead of creating a new one —
see Replacing Public or Private File Storage for when
that's the better choice.
The four storage types
Each scheme you create is backed by one storage type, called a
driver. Flysystem 3.x includes four:
| Driver | Use it for |
|---|---|
| Local filesystem | A directory on the same server — managed through the same admin screens and the same URI-scheme model as the other three, a legitimate choice on its own, not just a stepping stone toward remote storage. |
| S3-compatible | Amazon S3, MinIO, DigitalOcean Spaces, Cloudflare R2, or any other service that speaks the S3 API. The most common choice for remote storage. |
| AWS S3 (advanced) | Amazon S3 specifically, with two extra capabilities: private files served through short-lived signed links instead of proxied through Drupal, and support for serving public files through a CloudFront distribution. |
| SFTP | A remote server reachable over SFTP, authenticating with a password or an SSH key. |
Choosing an Adapter goes into each of these in more detail,
including exactly which fields you'll need to fill in for each one.

Where you'll do most of your setup
Everything in this guide happens through an admin screen at
Administration > Configuration > Media > Flysystem,
no code required. There's also a way to configure schemes directly in your
site's settings.php file instead, which some teams prefer for
production environments — that's covered separately in
Advanced: Configuring via settings.php, once you're
comfortable with the basics.
What's next
Continue to Requirements & Installation to install the
module and its one dependency, then
Setting Up Your First Filesystem to create your first
scheme end to end.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion