# Can't Increase the Max File Size

**URL:** https://meta.discourse.org/t/cant-increase-the-max-file-size/31839
**Category:** Support
**Created:** [August 6, 2015, 6:29pm UTC](https://meta.discourse.org/t/cant-increase-the-max-file-size/31839 "2015-08-06T18:29:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kyler](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kyler/32/43326_2.png) [@kyler](https://meta.discourse.org/u/kyler)
#### Post date: [August 6, 2015, 6:29pm UTC](https://meta.discourse.org/t/cant-increase-the-max-file-size/31839/1 "2015-08-06T18:29:52Z")

</div>

Hey, I’m trying to increase the max file upload size on my site. I edited my config file per the instructions here:

[https://meta.discourse.org/t/changing-max-attachment-size/26435](https://meta.discourse.org/t/changing-max-attachment-size/26435)

I rebuilt the app and then my discourse went down. So I removed the lines and rebooted the server. Back up now, but still now sure on how to do this.

Can someone tell me exactly what file to edit? I had [Discourse.org](http://Discourse.org) install my forum on a Digital Ocean droplet, so everything is standard. Thanks!

---

<div class="post-metadata">

### Author: ![jfmgonzales](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jfmgonzales/32/44630_2.png) [@jfmgonzales](https://meta.discourse.org/u/jfmgonzales)
#### Post date: [August 6, 2015, 8:33pm UTC](https://meta.discourse.org/t/cant-increase-the-max-file-size/31839/2 "2015-08-06T20:33:10Z")

</div>

You can SSH into discourse while you’re SSH’ed into your Droplet. From there, you could `nano /etc/nginx/conf.d/discourse.conf` and edit the file directly.

Or I guess you could also copy the file from inside discourse to your host server,

```
$ scp discourseIP:/etc/nginx/conf.d/discourse.conf ~/discourse.conf

```

edit the file, and then `scp` it back into the discourse container.

```
$ scp ~/discourse.conf discourseIP:/etc/nginx/conf.d/discourse.conf

```

Either way, once you’ve edited the file, you would have to tell the contained instance of `nginx` to reload its configuration, like so:

```
$ docker exec discourse nginx -s reload

```

#Update

It turns out that there’s a parameter for it in the \*.yml configuration. Just add `upload_size: 5000M`.

Source: [Change the maximum attachment/upload size](https://meta.discourse.org/t/changing-max-attachment-size/26435/2)

---

<div class="post-metadata">

### Author: ![diogocsc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/diogocsc/32/119719_2.png) [@diogocsc](https://meta.discourse.org/u/diogocsc)
#### Post date: [July 20, 2018, 10:07pm UTC](https://meta.discourse.org/t/cant-increase-the-max-file-size/31839/3 "2018-07-20T22:07:25Z")

</div>

how do we know the ip of the discourse ?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 23, 2018, 12:39am UTC](https://meta.discourse.org/t/cant-increase-the-max-file-size/31839/5 "2018-07-23T00:39:33Z")

</div>

This is all documented in this howto:

> [@Change the maximum attachment/upload size](https://meta.discourse.org/t/changing-max-attachment-size/26435):
>
> 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 Connect to your server: Use SSH to access your server’s command line interface. Edit the configuration file: Navigate to the configurati…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 23, 2018, 12:39am UTC](https://meta.discourse.org/t/cant-increase-the-max-file-size/31839/6 "2018-07-23T00:39:35Z")

</div>


