// troubleshooting guide · seafile

Seafile 502 Bad Gateway After Upgrade

Status
Workaround available
platforms:
Self-hosted server (Docker)
updated:
November 16, 2026
reports:
5
Method
how we research
Share

RUNBOOK · seafile/502-bad-gateway3 FIXES

// quick answer

A 502 means your proxy can't reach Seahub. After upgrades, check the container logs first: seahub may not start (database, missing library), or since 13.0.12 the bundled Nginx no longer reads config from the mapped volume.

Most likely fix: Read the logs

How to fix it

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

  1. FIX 1Read the logs

    1. 01Run docker logs seafile (and the database container)
    2. 02Check seahub.log and seafile.log in the logs folder for start-up errors
    3. 03Fix the reported error (database credentials, missing dependency) and restart
    Did this fix it?
  2. FIX 2Re-check proxy ports after a 13.x upgrade

    1. 01Since 13.0.12 the bundled Nginx maps everything to port 80 inside the container and no longer uses your mapped config
    2. 02Point your external reverse proxy at the container's published HTTP port
    3. 03Move custom rules (OnlyOffice, SeaDoc) to your external proxy such as Caddy or Nginx
    Did this fix it?
  3. FIX 3Don't send HTTPS to an HTTP port

    1. 01Make sure the port your proxy targets speaks plain HTTP
    2. 02Avoid publishing the container on ports already used by the host's web server
    Did this fix it?

SANDBOX · seafile RUNS IN YOUR BROWSER

Try it: upload, share and sync files between the web and your laptop

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

Symptoms

The web interface returns 502 Bad Gateway, often right after updating the Docker image or a minor version.

Why it happens

  • C-01Seahub failing to start (database unreachable, missing shared library)
  • C-02Bundled Nginx in 13.0.12+ ignoring custom config in the shared volume
  • C-03External proxy pointing at the wrong port or using HTTPS to an HTTP port
  • C-04Port conflicts between host Nginx and the container

// this guide also covers

  • seafile 502 bad gateway
  • seafile not starting after upgrade
  • seahub not starting
  • seafile docker 502

Still not working?

If Seafile keeps failing, you're not alone. See every Seafile 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 Seafile Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

Other Seafile errors

All 11 Seafile errors and fixes →