// troubleshooting guide · gitea

Gitea 500 Internal Server Error

Status
Workaround available
platforms:
Self-hosted, Docker, Helm
updated:
November 16, 2026
reports:
3
Method
how we research
Share

RUNBOOK · gitea/500-internal-server-error4 FIXES

// quick answer

Most 500s trace to a ROOT_URL or LOCAL_ROOT_URL mismatch, a proxy that does not pass Host and X-Forwarded-Proto, or a failed upgrade. Check the Gitea log for the exact error first.

Most likely fix: Read the log

How to fix it

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

  1. FIX 1Read the log

    1. 01Check Gitea's log output or journalctl -u gitea
    2. 02Note the exact error and version
    Did this fix it?
  2. FIX 2Fix LOCAL_ROOT_URL for push errors

    1. 01In app.ini [server] set LOCAL_ROOT_URL = http://127.0.0.1:3000/ instead of localhost
    2. 02Restart Gitea and push again
    Did this fix it?
  3. FIX 3Align ROOT_URL with the public URL

    1. 01Set ROOT_URL to the full public URL including scheme, host and port
    2. 02Restart Gitea
    Did this fix it?
  4. FIX 4Run doctor after an upgrade

    1. 01Back up first with gitea dump
    2. 02Run gitea doctor check --all, then --fix if it reports problems
    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

Pages or pushes return 500, pre-receive hook declined, or Internal Server Connection Error after an upgrade.

Why it happens

  • C-01ROOT_URL scheme or host differs from the public URL
  • C-02LOCAL_ROOT_URL set to localhost that does not resolve correctly
  • C-03Proxy not forwarding Host and X-Forwarded-Proto
  • C-04Incomplete database migration after upgrade

// this guide also covers

  • gitea 500 internal server error
  • gitea pre-receive hook declined
  • gitea internal server connection error

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 →