Change the maximum attachment/upload size

:bookmark: This guide explains how to change the maximum attachment upload size for self-hosted Discourse instances.

:person_raising_hand: Required user level: System Admin

The default attachment upload size limit is 10MB

If you are self-hosting Discourse and need to allow uploads larger than 10 MB, follow the steps below.

Changing the upload size

  1. Connect to your server:
  • Use SSH to access your server’s command line interface.
  1. Edit the configuration file:
  • Navigate to the configuration directory and edit the app.yml file:
cd /var/discourse/
nano containers/app.yml
  1. Modify the upload parameters:
  • Look for the section labeled params. Directly below, add your desired upload size with careful attention to formatting:
params:
  ## Which Git revision should this container use? (default: latest)
  version: latest
  ## Maximum upload size (default: 10m)
  upload_size: 20m
  1. Save your changes:
  • Press Ctrl+X to exit, then Y to confirm, and Enter to save the changes.
  1. Rebuild the Discourse instance:
  • Run the following command from the /var/discourse directory:
./launcher rebuild app
  1. Update site settings:
  • Go to /admin/site_settings/category/files in your Discourse dashboard.
  • Adjust the max attachment size kb to 20480 (for 20 MB) or your preferred size.
62 个赞
Can't Increase the Max File Size
What is the max image upload size limit by file type
Image upload size/resize question
Struggling to find correct instructions to increase file upload limit
Upload Large Video
Can't Increase the Max File Size
What is the maximum file size we can upload on discourse?
:cn: Change the max size of uploads/attachments | Discourse 修改上传附件的大小
Image upload error when using resizer
With Uploads -- That page doesn’t exist or is private
Rebuild of Discourse fails due to spaces in YAML file
Category image upload stops at 0%
Issue with maximum upload file size
Attachments max size limit in self and business hosting difference
Do I need to install NGINX and PHP to optimize my Discourse forum?
Remove Dropbox Onebox For Audio Links
Uploads involving client-side JS preprocessing fail in Chrome based browsers
“Image larger than 4mb” error when posting a gif
Inquiry About Discourse’s Support for Amazon S3 Storage
Increasing max file size
NGinx.conf File location
Multipart upload
Can Discourse accept attachments when using emails to create new category topics?
What is the maximum file size we can upload on discourse?
Problem about attachment file size
Max upload size error
Why is my upload limit 100mb?It's set to 500mb
Issue with maximum upload file size
Meta Data From Image Upload
How to change upload limit by command line
Attachments: Oops! That page doesn’t exist or is private
Increase the file size of attachment
Sorry, that file is too big V2
Raising max file upload limit in configs
Allow log file for topic and restricted to admin