# Configura un provider di storage di oggetti compatibile con S3 per i caricamenti

**URL:** https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916
**Category:** Self-Hosting
**Tags:** cdn, configuring, how-to, reference
**Created:** [22 Aprile 2020, 10:37pm UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916 "2020-04-22T22:37:37Z")
**Posts on this page:** 1
**Showing post:** 497

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [19 Novembre 2025, 2:34pm UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916/497 "2025-11-19T14:34:03Z")

</div>

Sono riuscito a far funzionare R2 correttamente utilizzando questo insieme di regole:

```plaintext
  ## Questa serie di righe consente il caricamento e il download dei file ospitati su R2 S3.
  DISCOURSE_USE_S3: true
  DISCOURSE_S3_REGION: auto
  DISCOURSE_S3_ACCESS_KEY_ID: access-key-id
  DISCOURSE_S3_SECRET_ACCESS_KEY: access-key
  DISCOURSE_S3_CDN_URL: https://eufiles.technospider.com
  DISCOURSE_S3_BUCKET: exotics-unlimited
  DISCOURSE_S3_BACKUP_BUCKET: exotics-unlimited-backups
  DISCOURSE_BACKUP_LOCATION: s3
# DISCOURSE_CDN_URL: https://eufiles.technospider.com
  DISCOURSE_S3_ENDPOINT: https://71 ***** 5d4976.r2.cloudflarestorage.com
# DISCOURSE_INCLUDE_S3_UPLOADS_IN_BACKUPS: true
  DISCOURSE_S3_INSTALL_CORS_RULE: false

```

Una volta commentata la riga CDN\_URL le cose hanno funzionato. Immagino che per la natura del fatto che R2 crea automaticamente il CDN, quella riga non sia necessaria e anzi, aggiungerla rompa le cose.  
Ho commentato la riga di inclusione delle immagini solo per mantenere basse le dimensioni dei miei backup. Sto utilizzando il livello gratuito di R2 e non voglio superare il mio limite.

---

_[View the full topic](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916)._
