Understanding and Securing Webhooks
Setting up and securing n8n webhooks correctly: Header Auth, JWT, IP whitelisting, and reverse proxy configuration at a glance.
How to increase the payload limit in n8n with N8N_PAYLOAD_SIZE_MAX and reliably fix 413 errors on webhooks.
The error "413 Request Entity Too Large" usually appears in n8n when a webhook receives a larger file, such as a PDF, an image, or an extensive JSON payload, and the configured upper limit is exceeded. By default, n8n sets a limit of 16 MiB per payload, which can be raised via a single environment variable. In many cases, however, the actual bottleneck is not n8n itself but a layer in front of it, the reverse proxy. As of: July 2026.
This FAQ article shows which variable you need to set, how to distinguish between an n8n-internal limit and a proxy limit, and what to watch out for when raising the limit so that your instance stays stable.
The HTTP status code 413 signals that the server is rejecting the incoming request because its payload is larger than allowed. In n8n, this limit mainly applies in two places:
According to the n8n documentation on the endpoint environment variables, the default limit is 16 MiB. This is sufficient for most automations involving text data, small images, or normal API responses. However, once PDFs, high-resolution images, or multi-page documents pass through a workflow, the limit is quickly reached.
The decisive lever is called N8N_PAYLOAD_SIZE_MAX. It defines the maximum payload size in MiB and, according to official documentation, is set to 16 by default. To raise the limit, set the variable to a higher value, for example:
N8N_PAYLOAD_SIZE_MAX=64 for 64 MiBN8N_PAYLOAD_SIZE_MAX=128 for 128 MiBIn a Docker installation, add the variable to your Compose file or the Docker run environment; in an npm installation, set it before starting, for example via N8N_PAYLOAD_SIZE_MAX=64 n8n. Important: after setting the variable, the n8n instance must be restarted for the change to take effect. Simply reloading the web interface is not enough.
For form uploads with files, there is also a separate variable N8N_FORMDATA_FILE_SIZE_MAX, which according to the same documentation defaults to 200 MiB and specifically governs the file size within form-data payloads, for example when a webhook receives file uploads from a form. So if you want to specifically allow larger file attachments, check both variables and align them with each other.
A common pitfall from the n8n community: the variable is set correctly, but the error persists anyway. The reason is almost always an upstream instance that intercepts the request before it even reaches n8n. A community thread on 413 errors when uploading PDFs via webhookconfirms this pattern: it was not n8n itself but the upstream Nginx configuration that limited the request, even though the n8n-internal limit was significantly higher.
Therefore, check in order:
client_max_body_size directive limits the body size independently of n8n. A value like client_max_body_size 100M; in the server or location configuration must match the n8n limit or be more generous.Only once all layers, both the proxy and n8n itself, are set to a sufficiently high limit does the 413 error reliably disappear. In an older, now resolved case from the n8n community forum, the cause was even a bug in an earlier n8n version that blocked payloads starting at just 100 KB, regardless of the configured limit. Updating to a current n8n version reliably fixes such legacy issues too.
Before reflexively setting the limit to a very high value, it's worth taking a brief look at the downside. The documentation explicitly points out that a higher payload limit requires more memory and more processing power and can affect the performance of the entire instance. Anyone running many parallel workflows in production should therefore adjust the limit to actual needs, not to what is theoretically possible.
A few practical guidelines:
If you run an n8n instance in production and don't want to research every infrastructure topic yourself, you can outsource configuration, monitoring, and troubleshooting through n8n consulting and support by NordFlux. You retain control over your workflows and data while the technical fine-tuning happens in the background.
The variable N8N_PAYLOAD_SIZE_MAX sets the maximum payload size in MiB and, according to n8n documentation, defaults to 16. You raise it by setting the variable to a higher value and then restarting the instance.
In most of these cases, there is another limit in front of n8n, for example in an Nginx configuration with client_max_body_size, in Traefik, or in an upstream load balancer. n8n itself may already allow the request, but the proxy blocks it beforehand. Therefore, check each layer of the infrastructure individually.
N8N_PAYLOAD_SIZE_MAX limits the total size of a request to n8n. N8N_FORMDATA_FILE_SIZE_MAX specifically governs the maximum file size within form-data payloads, for example for file uploads via a webhook form, and defaults to 200 MiB. For pure file uploads via forms, this second variable is usually the relevant one.
Yes. Environment variables like N8N_PAYLOAD_SIZE_MAX are read in when the n8n process starts. Reloading the web interface is not enough; the instance or the container must be restarted for the new limit to take effect.
Yes. According to the documentation, a higher payload limit increases the demand on memory and processing power and can affect the performance of the entire instance. Therefore, set the limit deliberately based on actual needs rather than across the board to a very high value.
Founder of NordFlux. Spent four years automating processes at enterprise scale at Dräger, and now brings that depth to the mid-market — pragmatic and with full data sovereignty.
Certifications
Setting up and securing n8n webhooks correctly: Header Auth, JWT, IP whitelisting, and reverse proxy configuration at a glance.
sevDesk has no native n8n node: here is how to build a polling trigger with the Schedule Trigger and HTTP Request node, including documented API limits.
Raising N8N_PAYLOAD_SIZE_MAX is quick, but proxy limits and memory usage are often left unconsidered. NordFlux configures your n8n environment so large payloads pass through reliably without putting your instance at risk. In an initial conversation we clarify which limits actually fit your data volumes.