V13 Upload not working

I upgraded from V11 to V12 and then to V13. Since other services are still running on the server, I use a docker nginx proxy. I followed the instructions for using my own proxy, but I must have overlooked something.

Uploading data fails with status code 500 The Nginx log shows:

mydomain.de 172.21.0.1 - - [Jan/26/2026:00:33:57 +0000] “PUT /seafhttp/repo/a20d8f24-e1b8-4e38-8676-73993c519b33/commit/eb256e72b58f6cb76b5492753d8195f1d7acee37 HTTP/2.0” 500 1 “-” “Seafile/9.0.16 (Apple OS X)” “172.21.0.11:80”

In the .env file, I set:

SEAFILE_SERVER_HOSTNAME=mydomain.de
SEAFILE_SERVER_PROTOCOL=https

Running the upgrade_Script shows some database warnings:

root@a873a4acb01d:/opt/seafile/seafile-server-latest/upgrade# ./upgrade_12.0_13.0.sh

This script would upgrade your seafile server from 12.0 to 13.0
Press [ENTER] to contiune

Updating seafile/seahub database …

[INFO] You are using MySQL
[INFO] updating ccnet database…
[WARNING] Failed to execute sql: (1060, “Duplicate column name ‘is_department_owner’”)
[WARNING] Failed to execute sql: (1061, “Duplicate key name ‘EmailUser_is_active’”)
[WARNING] Failed to execute sql: (1061, “Duplicate key name ‘EmailUser_is_department_owenr’”
[INFO] updating seahub database…
[WARNING] Failed to execute sql: (1709, ‘Index column size too large. The maximum column size is 767 bytes’)
[WARNING] Failed to execute sql: (1060, “Duplicate column name ‘is_active’”)
[WARNING] Failed to execute sql: (1060, “Duplicate column name ‘tags_enabled’”)
[WARNING] Failed to execute sql: (1060, “Duplicate column name ‘tags_lang’”)
[WARNING] Failed to execute sql: (1060, “Duplicate column name ‘details_settings’”)
[WARNING] Failed to execute sql: (1060, “Duplicate column name ‘ocr_enabled’”)
[WARNING] Failed to execute sql: (1060, “Duplicate column name ‘global_hidden_columns’”)
[WARNING] Failed to execute sql: (1061, “Duplicate key name ‘key_last_face_cluster_time_face_recognition_enabled’”)
[INFO] updating seafevents database…

Done

migrating avatars …

Done

updating /opt/seafile/seafile-server-latest symbolic link to /opt/seafile/seafile-server-13.0.15 …

I removed the obsolete config values according to these instructions: Summary of obsolete configurations - Seafile Admin Manual

I would be very grateful for every hint!

Here are the key points to check to help resolve the upload issue:

  1. Database Upgrade Warnings: The upgrade_12.0_13.0.sh script reported numerous [WARNING] messages regarding “Duplicate column name”, “Duplicate key name”, and “Index column size too large”. These indicate potential inconsistencies or corruption in the Seafile database schema after the upgrade. This is the most critical area to investigate as database issues can lead to various functional problems, including failed uploads.

    • Action: Carefully review the Seafile upgrade logs and documentation specific to upgrading from V11/V12 to V13, paying close attention to database migration steps and any prerequisites. Verify the database schema integrity and consider potential manual fixes or repairs if the automated upgrade script failed to apply necessary changes correctly.
  2. Nginx Proxy Configuration: Although the user followed instructions for their own proxy, a 500 error from Nginx during a PUT request to /seafhttp/ suggests that Nginx might not be correctly configured to handle all Seafile-related requests, especially those for file uploads, or that the backend Seafile server is returning the 500 error which Nginx then passes on.

    • Action: Double-check the Nginx configuration, especially the proxy passes and client body size limits, to ensure they are appropriate for Seafile uploads. Ensure that Nginx is correctly forwarding requests to the Seafile HTTP server (seafhttp).
  3. Seafile Server Logs: The Nginx log shows a 500 status, but the actual cause of the 500 error would be logged by the Seafile server itself. For Seafile V13, you should primarily check seafile.log (for seaf-server related issues) and seahub.log (for seahub related issues), in addition to controller.log. These logs will provide more specific error messages related to why the upload failed on the backend.

    • Action: Examine seafile.log, seahub.log, and controller.log for any errors or exceptions occurring at the time of the failed uploads. This will provide crucial details about the internal server error.
  4. Browser Console Errors: When an upload fails, the browser’s developer console (specifically the Network and Console tabs) can often provide more precise details about the client-side error, including the exact response from the server for the failed upload request.

    • Action: Open the browser’s developer console (usually by pressing F12) and go to the ‘Network’ tab. Try uploading a file and observe the failed request. Look at the status code, response body, and any relevant headers. Also, check the ‘Console’ tab for any JavaScript errors related to the upload process.
  5. Obsolete Configurations: The user mentioned removing obsolete configurations. While good, it’s essential to ensure that no critical configurations were inadvertently removed or that new required configurations for V13 were missed.

    • Action: Review the seafile.conf, seahub_settings.py, and other relevant configuration files for V13 to ensure all necessary settings are present and correctly configured, especially those related to SERVICE_URL and FILE_SERVER_ROOT (they are removed and you should use SEAFILE_SERVER_DOMAIN environtment variable).

Thanks a lot Daniel for the quick response. You are right I should have looked at the Seafile logs!

This is probably the root cause:

fileserver.log

[2026-01-26 08:30:26] [ERROR] path /repo/a20d8f24-e1b8-4e38-8676-73993c519b33/commit/eb256e72b58f6cb76b5492753d8195f1d7acee37 internal server error: Failed to save gc id: Error 1146: Table 'seafile-db.GCID' doesn't exist

Any idea how to fix this?

And seahub.log had

[2026-01-26 08:27:36] [ERROR] django.security.DisallowedHost:253 log_response Invalid HTTP_HOST header: ‘localhost’. You may need to add ‘localhost’ to ALLOWED_HOSTS.

Traceback (most recent call last):

File “/opt/seafile/seafile-server-13.0.15/seahub/thirdpart/django/core/handlers/exception.py”, line 55, in inner

response = get_response(request)

           ^^^^^^^^^^^^^^^^^^^^^

File “/opt/seafile/seafile-server-13.0.15/seahub/thirdpart/django/utils/deprecation.py”, line 119, in _call_

response = self.process_request(request)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “/opt/seafile/seafile-server-13.0.15/seahub/thirdpart/django/middleware/common.py”, line 48, in process_request

host = request.get_host()

       ^^^^^^^^^^^^^^^^^^

File “/opt/seafile/seafile-server-13.0.15/seahub/thirdpart/django/http/request.py”, line 202, in get_host

raise DisallowedHost(msg)

django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: ‘localhost’. You may need to add ‘localhost’ to ALLOWED_HOSTS.

I added localhost to ALLOWED_HOSTS = [mydomain.de, ‘127.0.0.1’, ‘localhost’] in seahub_settings.py

You can find the correct version of MySQL tables at:

The GCID table is in the second one. You can create the table manually.

1 Like

Thank you so much, it works like a charm now! Creating the missing tables fixed it.

The reason why the databases didn’t update correctly might be that my database names don’t contain underscores due to some historic reason (I think I started with Seafile V3). When upgrading to V12, I initially missed the variables for the database names.