// troubleshooting guide · gitea

Gitea Push 413 Request Entity Too Large (LFS Upload Fails)

Status
Workaround available
platforms:
nginx, Cloudflare, Docker
updated:
November 16, 2026
reports:
3
Method
how we research
Share

RUNBOOK · gitea/push-413-lfs3 FIXES

// quick answer

A 413 comes from nginx's body-size limit, Gitea's LFS_MAX_FILE_SIZE, or Cloudflare. Find which layer returns it, then raise that limit.

Most likely fix: Raise the nginx limit

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Raise the nginx limit

    1. 01In the Gitea location block set client_max_body_size to a larger value (docs example uses 16M)
    2. 02Reload nginx
    Did this fix it?
  2. FIX 2Check Gitea's LFS cap

    1. 01Review LFS_MAX_FILE_SIZE in the [server] section of app.ini
    2. 02Raise it and restart Gitea
    Did this fix it?
  3. FIX 3Bypass Cloudflare for big uploads

    1. 01Test with the proxy disabled (grey cloud) for the Git host
    2. 02Use SSH for pushes if HTTP must stay proxied
    Did this fix it?

SANDBOX · gitea RUNS IN YOUR BROWSER

Try it: push, review, run CI and merge in a code host and cloud workspace

A hands-on Gitea-style sandbox, including the spots where users get stuck. See where problems like this one start. 1-2 minutes, nothing is saved.

Symptoms

git push or LFS upload fails with RPC failed; HTTP 413 or Client error 413.

Why it happens

  • C-01nginx client_max_body_size too small
  • C-02Gitea LFS_MAX_FILE_SIZE exceeded
  • C-03Cloudflare proxy upload cap

// this guide also covers

  • gitea 413 request entity too large
  • gitea lfs upload fails
  • gitea client_max_body_size

Still not working?

If Gitea keeps failing, you're not alone. See every Gitea problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us

Watch Gitea Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other Gitea errors

All 11 Gitea errors and fixes →