// 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
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
FIX 1Raise the nginx limit
- 01In the Gitea location block set client_max_body_size to a larger value (docs example uses 16M)
- 02Reload nginx
Did this fix it?FIX 2Check Gitea's LFS cap
- 01Review LFS_MAX_FILE_SIZE in the [server] section of app.ini
- 02Raise it and restart Gitea
Did this fix it?FIX 3Bypass Cloudflare for big uploads
- 01Test with the proxy disabled (grey cloud) for the Git host
- 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 usThe same problem in other apps
Other Gitea errors
- Gitea Actions Jobs Stuck in Waiting (No Matching Runner)
- Gitea SSH Permission Denied (publickey) or Connection Refused
- Gitea 500 Internal Server Error
- Gitea Reverse Proxy Wrong URLs or Redirect Loop (ROOT_URL)
- Gitea Webhook Not Working (ALLOWED_HOST_LIST Error)
- Gitea Email Notifications Not Sending (SMTP Error)
- Why Is Gitea Using So Much Memory or CPU?
- Gitea Upgrade Failed or Database Is Locked