Configure an S3 compatible object storage provider for uploads

Update: some users were unable to load the site (assets and files). We’ve found that the contabostorage.com domain was present in some blocklists as a phishing site. The solution was simple:

setup a subdomain files.mydomain.com like described here Can I Setup a Custom Domain for My Object Storage? : Contabo

Updated DISCOURSE_S3_CDN_URL: https://files.mydomain.com in app.yml

Then

cd /var/discourse
sudo ./launcher rebuild app

and to complete the job

./launcher enter app
rake posts:rebake

Now all assets and uploads load from https://files.mydomain.com/pathtofile/file.ext

Done

2 Likes