Configure an S3 compatible object storage provider for uploads

Has scaleway changed anything? It had worked for me until 48 hours ago but it no longer works.

1 Like

Is your bill paid? What is wrong? Do any images work? They are all gone or you just can’t add new ones?

1 Like

Can you add a little more support? For example, Tencent COS from China is more convenient for Chinese users, and Tencent Cloud’s COS has CDN nodes around the world, which is very fast to access

Have you tried it? Does it work?

I have used it in the test environment, but I can only back up to Tencent COS, and I hope that the discourse official can add Tencent COS support to facilitate developers from China

1 Like

I think that you’ll need to share what you’ve done and what errors or problems you had. Then someone might be able to suggest how to make it work. You might look at the other examples and see if you can use those to make it work.

I think it’s unlikely that they’ll make changes in core to support it.

1 Like

Backblaze:

  • I’ve setup a B2 bucket in my account
  • Added details to the env section of app.yml
  • Run ./launcher rebuild app

…but I don’t see any confirmation in my Discourse instance dashboard that these settings have taken effect. Where should I look?

1 Like

Hi,

I could successfully test and use Cloudflare R2 for both uploads and backups. Detailed post here Cloudflare R2: Navigating Setup and Handling Configuration Errors - #40 by kamaljain

Would request to kindly test at your end and review the “Works with Discourse” to Yes for Cloudflare R2. Infact its easier than S3 and more economical, free if <10gb of storage.

2 Likes

I too tested a setup on multisite and also think that it’s working.

I’ve seen something that makes me wonder if you can get a list of backups. I’ll try to check my setup.

1 Like

I can see the backups listed. Havent tried the restore though.

1 Like

Hi bro, can I chat with you, Im have some problem when config with minio.
Thankyou.

iDrive Config

Just wanted to report that using iDrive’s E2 version of s3 storage works perfectly with these settings:

ENV settings in yaml file

Make sure your bucket is has at least Public & Read permissions in iDrive’s settings.

These are the settings I use for one bucket sharing uploads and backups.

DISCOURSE_USE_S3: true
DISCOURSE_S3_REGION: your-region
DISCOURSE_S3_ENDPOINT: https://your-idrive-endpoint.dev
DISCOURSE_S3_ACCESS_KEY_ID: your-access-key
DISCOURSE_S3_SECRET_ACCESS_KEY: your-secret-key
DISCOURSE_S3_CDN_URL: https://your-custom-cdn-url.com/uploads
DISCOURSE_S3_BUCKET: your-bucket-name/uploads
DISCOURSE_S3_BACKUP_BUCKET: your-bucket-name/backups
DISCOURSE_BACKUP_LOCATION: s3
DISCOURSE_S3_INSTALL_CORS_RULE: false

By default iDrive has Share everything in this region with every origin … so it should work out of the box regardless of sources. Lock it down to your own domains if you want to.

I use a Cloudflare origin certificate to create a CNAME that points to the iDrive endpoint.


Sync Existing Attachments

Rebuild

Rebuild the app after changing these ENV settings.


Upload and Rebake

Then enter the container and run

rake uploads:migrate_to_s3

Watch it upload, then run

rake posts:rebake_uncooked_posts

Exit the container


Add to hooks section of yaml file

In hooks section

after_assets_precompile:
    - exec:
        cd: $home
        cmd:
          - sudo -E -u discourse bundle exec rake s3:upload_assets
          - sudo -E -u discourse bundle exec rake s3:expire_missing_assets

This ensures that js/css stuff gets uploaded to iDrive after your attachments do, otherwise you’ll get a bunch of console errors in the browser as they’re all missing.


Rebuild

Rebuild again after assets command goes in.


Everything should be ok!

1 Like