Skip to content

[Bug]: S3 endpoint silently strips Cloudflare R2 EU jurisdiction subdomain on save #9305

Description

@bst1n

Error Message and Logs

Unable to list contents for '', shallow listing
Reason: Error executing "ListObjectsV2" on "https://b52bf1144d4001acd18a39a8f258f90b.r2.cloudflarestorage.com/coolify-airprepa/?list-type=2&prefix=&delimiter=%2F"; AWS HTTP error: Client error: GET https://b52bf1144d4001acd18a39a8f258f90b.r2.cloudflarestorage.com/coolify-airprepa/?list-type=2&prefix=&delimiter=%2F resulted in a 404 Not Found response:

NoSuchBucketThe specified bucket does not exist.NoSuchBucket (client): The specified bucket does not exist. - NoSuchBucketThe specified bucket does not exist.

Steps to Reproduce

  1. Create a Cloudflare R2 bucket with EU jurisdiction (not just a WEUR location hint — this is Cloudflare's GDPR-compliant data residency feature)

  2. Go to Coolify → Settings → S3 Storages → Add

  3. Enter the EU jurisdiction endpoint:

    https://<ACCOUNT_ID>.eu.r2.cloudflarestorage.com

  4. Fill in bucket name, access key, secret key, region auto

  5. Click Save

  6. Observe that the saved endpoint has been silently changed to:

    https://<ACCOUNT_ID>.r2.cloudflarestorage.com

The .eu. subdomain is gone.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.468

Are you using Coolify Cloud?

Yes (Coolify Cloud)

Operating System and Version (self-hosted)

No response

Additional Information

Description
When configuring an S3 storage with Cloudflare R2's EU jurisdiction endpoint, Coolify silently removes the .eu. subdomain on save. This makes it impossible to use R2 EU jurisdiction buckets for database backups.

Expected Behavior
The endpoint should be saved exactly as entered. Coolify should not modify, strip, or rewrite S3 endpoint URLs.

Actual Behavior
Coolify silently removes the .eu. subdomain from the endpoint on save. No error or warning is shown. The resulting endpoint points to the global R2 namespace, which cannot access EU jurisdiction buckets. Clicking "Validate Connection" then fails with:
NoSuchBucket: The specified bucket does not exist.

Why this is critical

  • Cloudflare R2 EU jurisdiction is the standard mechanism for European users to guarantee data residency within the EU. It is documented by Cloudflare and requires the .eu. subdomain in the S3 endpoint.
  • R2 is listed as a supported S3 provider in Coolify's documentation, but EU jurisdiction is not accounted for.
  • The "Automatic" location option when creating R2 buckets often defaults to North America East for non-US users. There is no reliable way to force a WEUR bucket without using EU jurisdiction from the Cloudflare dashboard.
  • This means European Coolify users currently have no working path to store R2 backups in Europe.

Suggested Fix
The S3 endpoint field should be stored and used as-is, without any URL parsing or subdomain stripping. This would also prevent similar issues with other S3-compatible providers that use non-standard endpoint formats (e.g., Supabase — see #2932).

Metadata

Metadata

Assignees

No one assigned

    Labels

    💤 Waiting for feedbackIssues awaiting a response from the author.🔍 TriageIssues that need assessment and prioritization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions