# Change the maximum attachment/upload size

**URL:** https://meta.discourse.org/t/change-the-maximum-attachment-upload-size/26435
**Category:** Self-Hosting
**Tags:** how-to
**Created:** [March 17, 2015, 2:00pm UTC](https://meta.discourse.org/t/change-the-maximum-attachment-upload-size/26435 "2015-03-17T14:00:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [March 17, 2015, 2:00pm UTC](https://meta.discourse.org/t/change-the-maximum-attachment-upload-size/26435/1 "2015-03-17T14:00:41Z")

</div>

> 🔖 This guide explains how to change the maximum attachment upload size for self-hosted Discourse instances.
> 
> 🙋 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:

```bash
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:

```yaml
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:

```bash
./launcher rebuild app

```

1. **Update site settings:**

- Go to `/admin/site_settings/category/files` in your Discourse dashboard.
- Adjust `max attachment size kb` and `max image size kb` to your preferred size (e.g. `20 MB`). The setting UI allows you to enter the value and select a unit (KB, MB, or GB) from the dropdown.

❗ Both settings are capped by the nginx `client_max_body_size` value, which is controlled by the `upload_size` param you set in step 3. The site settings cannot exceed this limit.

> Last edited by @david 2025-09-29T13:05:48Z
> 
> > **Check document**
> >
> > Perform check on document:
