Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Flysystem Cloudflare R2

15 sites Security covered Drupal 11 · not 10

Part of the Flysystem ecosystem · 10 projects

View on drupal.org

This module provides an adapter for Drupal's Flysystem to store files in Cloudflare R2 buckets. It utilizes Cloudflare R2's S3-compatible API and integrates with Drupal's file system settings.

Overview

Flysystem Cloudflare R2 provides a Cloudflare R2 storage adapter for the
Drupal Flysystem module. It builds on the Flysystem S3 adapter and registers
an r2 Flysystem driver for storing Drupal-managed files in a
Cloudflare R2 bucket.

Cloudflare R2 exposes an S3-compatible API, but it does not implement every
AWS S3 operation exactly the same way. This module adapts the existing
Flysystem S3 integration for R2 and handles R2's unsupported object ACL
visibility lookup by returning the configured default visibility.

Features

  • Provides a Flysystem adapter plugin with the driver ID r2.
  • Uses Cloudflare R2's S3-compatible API endpoint.
  • Supports public and private Flysystem stream wrappers.
  • Inherits most configuration options from flysystem_s3.
  • Works with Drupal's file system settings and Flysystem stream wrappers.

Requirements

  • Drupal Flysystem
  • Flysystem S3
  • A Cloudflare R2 bucket
  • Cloudflare R2 S3 API credentials

Installation

Install the module and its dependencies with Composer:

composer require drupal/flysystem_cloudflare_r2
drush en flysystem flysystem_s3 flysystem_cloudflare_r2

Configuration

Configure Flysystem stream wrappers in settings.php. The stream
wrapper scheme name must not contain underscores.

$schemes = [
  'r2-public' => [
    'driver' => 'r2',
    'config' => [
      'key' => '[cloudflare-r2-access-key-id]',
      'secret' => '[cloudflare-r2-secret-access-key]',
      'region' => 'auto',
      'bucket' => '[bucket-name]',
      'endpoint' => 'https://[account-id].r2.cloudflarestorage.com',
      'public' => TRUE,
    ],
      'cache' => TRUE,
  ],
];

$settings['flysystem'] = $schemes;

After configuring the stream wrapper, select it on Drupal's file system
settings page at /admin/config/media/file-system.

Cloudflare R2 Notes

  • Use region value auto.
  • Use the endpoint format https://[account-id].r2.cloudflarestorage.com.
  • For private buckets, omit public or set it to FALSE.
  • For public buckets or CDN-backed buckets, set public to TRUE and configure a public bucket URL or custom domain as needed.

Related Modules

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jul 2026
Latest release
3 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0 Stable 11 Jul 6, 2026