> ## Content Index
> Fetch the complete content index at: https://piotrkrzyzek.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Fix Ghost File Upload Limit With CloudFlare & NGINX
- URL: https://piotrkrzyzek.com/fix-ghost-file-upload-limit-with-cloudflare-nginx/
- Published: 2022-05-27T22:44:00.000Z
- Updated: 2026-10-14T13:50:22.000Z
- Description: Ghost CMS is a wonderful tool with some great built in features and error checking, and as such it is at the whims and limits of the infrastructure you run on it. In this article, we'll go over how…
- Author: Peter Krzyzek

Ghost CMS is a wonderful tool with some great built in features and error checking, and as such it is at the whims and limits of the infrastructure you run on it. In this article, we'll go over how to go around and address the file upload limit you may see in Ghost CMS.

You may have seen an error on your site when you try to upload a larger file (be it an image or theme):

`The image you uploaded was larger than the maximum file size your server allows`

##  The Solution 

###  TLDR: Add client\_max\_body\_size setting to NGINX and disable CloudFlare proxy mode (or get on a paid CF plan). 

## The reasons

You see file size upload errors because of the infrastructure that runs Ghost. Not Ghost itself (which doesn't have file limits), but the server (in this case NGINX) and the domain level stuff via CloudFlare.

Thus, we have to adjust both NGINX as well as our CloudFlare account (for this domain).

## The fix & solution

There are two parts to this. First fixing up NGINX, and in my case via Nginx Proxy Manager (NPM).

The setting you need in NGINX is the `client_max_body_size` setting. In NPM this is set in the selected domains ADVANCED tab.

You can also see the documentation refenced here in Ghost's docs:

![Ghost icon](https://web.archive.org/web/20221209033028im_/https://ghost.org/favicon.ico)

Though their docs don't mention NPM nor the next issue.

In my case, I just set it to 1000M (\~1000 MB):

```config
client_max_body_size 1000M;
```

![Nginx Proxy Manager Advanced tab with custom config client_max_body_size 1000M to raise the Ghost upload limit](https://web.archive.org/web/20221209033028im_/https://res-1.cloudinary.com/cklph/image/upload/q_auto/v1/blog-images/Nginx-Proxy-Manager-2022-05-27-at-11.49.16-PM.jpg)

For CloudFlare, you'll need to do one of two things:

(A) (Temporarily) Disable 'PROXY' mode (turn off the orange cloud) for the associated DNS records

or

(B) Upgrade to a paid CloudFlare plan

Why? Because CloudFlare's FREE plan only allows for 100MB file sizes (or lower).

## Steps afterwards

If you've opted to disable the CloudFlare orange cloud (proxy mode) you should be able to upload a file as big as you want. Simply re-enable it once done. To remember though that once to change setting in either direction, it does take a short bit for the setting to 'set' and update itself in CF's system. So give it a few seconds (or a minute) to ensure it's set and it'll work.

💡

You may also have to clear your browser's cache and reload the page you're on (such as an admin page) so that your browser picks up the new settings in the network.