---
title: "Upload size limit"
description: "Every layer that limits the upload size on an on-premises Signer: MaxFileSize, MaxUploadSizeInBytes, IIS, Kestrel and Nginx, and how document versions affect storage."
canonical: "https://docs.lacunasoftware.com/en-us/articles/signer/on-premises/limite-de-upload"
locale: "en"
product: "Signer"
last_updated: "2026-10-22"
---

# Upload size limit

An upload goes through several layers before it reaches Signer. Each layer has its own size limit. The upload works
only if the file fits all of them. By default, Signer accepts files of up to 100 MB.

## The layers

| Layer | Setting | Default | What happens when the file is over the limit |
|---|---|---|---|
| Web interface | `General:MaxFileSize` | `104857600` (100 MB) | The screen shows a size limit message before sending the file |
| Signer server (Kestrel or IIS *in-process*) | `General:MaxUploadSizeInBytes` | `106954752` (102 MB) | The server rejects the request with status code `413` |
| IIS | `maxAllowedContentLength` in `web.config` | `1073741824` (1 GB) | IIS rejects the request before it reaches Signer |
| Reverse proxy (Nginx) | `client_max_body_size` | `1m` (1 MB), if the directive is missing | Nginx rejects the request with status code `413` |

The web interface sends files larger than `General:SegmentedUploadThresholdMB` (default: 10 MB) in parts. So a proxy
with a small limit can work in the web interface and fail on API calls, which send the whole file in one request.

## How to raise the limit

Follow the steps for the size you want to accept. The example uses 200 MB (`209715200` bytes).

1. In the `General` section, set `MaxFileSize` to the file size:

   ```json
   "General": {
     "MaxFileSize": 209715200,
     "MaxUploadSizeInBytes": 210763776
   }
   ```

1. Set `MaxUploadSizeInBytes` to at least 1 MB (`1048576` bytes) more than `MaxFileSize`. The extra room covers the
   *multipart* request envelope (the format that carries the file and the other form fields).
1. If Signer runs on IIS and the size is over 1 GB, raise `maxAllowedContentLength` in the `web.config` of the site
   folder. The Signer package ships this file. On every [update](https://docs.lacunasoftware.com/en-us/articles/signer/on-premises/windows/update), apply the change again.
1. If an Nginx sits in front of Signer, set `client_max_body_size` to the same value as `MaxUploadSizeInBytes` in the
   site's `server` block:

   ```nginx
   client_max_body_size 201m;
   ```

   Do the same on any other proxy or load balancer between the user and Signer.
1. Restart Signer and reload Nginx (`nginx -s reload`).

> **Warning**
>
> Edit the JSON file with a plain text editor. Curly quotes (`“` and `”`), common in text copied from an e-mail or a
> document, make the JSON invalid, and the application does not start.

> **Note**
>
> Files of hundreds of MB use more memory and time when the document is processed. Test the size you want to accept
> in staging before you change production.

## Storage

Signer keeps the original file and the versions the document gets along the flow, such as the signed versions.
The space a document uses is larger than the uploaded file. Keep this in mind when you raise the limit and when you
plan the [Blob Storage](https://docs.lacunasoftware.com/en-us/articles/signer/on-premises/blob-storage).

## See also

* [Signer settings](https://docs.lacunasoftware.com/en-us/articles/signer/on-premises/settings)
* [Ubuntu Server installation](https://docs.lacunasoftware.com/en-us/articles/signer/on-premises/linux/install-ubuntu)
* [Windows Server setup](https://docs.lacunasoftware.com/en-us/articles/signer/on-premises/windows)
