Changing Max Attachment Size

:mega: If you are on managed hosting, you should contact your hosting provider to change this setting. The below instructions only apply if you self host your own instance of Discourse.

Here is what you need to do to allow more than 10mb for attachments upload.

  1. Connect to your server via SSH

  2. cd /var/discourse/

  3. nano containers/app.yml

  4. Scroll down where it says db_default_text_search_config under params

Add upload_size: 20m below db_default_text_search_config

  db_default_text_search_config: "pg_catalog.english"

  # replace 20m with desired value
  upload_size: 20m

After making changes press Ctrl+O (to write) and Ctrl+X (to exit).

From /var/discourse run:

./launcher rebuild app

Once rebuild is complete, navigate to and change the max attachment size kb to 20480 (20mb) or your desired number. At this point everything should work perfectly, you can go on and test your upload file size.