Updating Seafile Server

Hello everyone,

I would like to update our Seafile server and Linux Mint, but I’m not sure about the best way to proceed.

Seafile Server Version:

  • Community Edition 8.0.8 (non-Docker installation)

Linux Version:

  • Linux Mint 20.2 Uma

  • Edition: Cinnamon

  • Desktop: GNOME

  • Toolkit: GTK

I already tried upgrading Linux Mint to version 21 first, but after the upgrade the Seafile server would no longer start. I restored a snapshot to get the server running again.

My questions are:

  • Should I update Seafile first and then upgrade Linux Mint?

  • What is the recommended procedure for upgrading Seafile to the latest version?

  • Do I have to migrate to Docker, or is it still possible to upgrade and run the latest Community Edition without Docker?

To ensure a smooth transition, here is the recommended approach for your Seafile upgrade:

1. Upgrade Order and Strategy

The reason your Seafile server failed to start after upgrading Linux Mint is likely due to changes in system libraries and Python versions (Mint 20 uses Python 3.8, while Mint 21 uses 3.10). Native installations are sensitive to these changes.

You have two main paths:

Option A: Migrate to Docker (Recommended)
This is the most stable long-term solution. Docker decouples Seafile from your host OS dependencies.

  1. Back up your existing data and database.
  2. Upgrade your OS to Linux Mint 21.
  3. Install Seafile via Docker and restore your data.

Option B: Sequential Native Upgrade
If you prefer to stay with a non-Docker installation, you must upgrade Seafile sequentially. You cannot skip major versions.

  1. Upgrade 8.0.x → 9.0.x
  2. Upgrade 9.0.x → 10.0.x
  3. Upgrade 10.0.x → 11.0.x
  4. Upgrade 11.0.x → 12.0.x

2. Recommended Procedure

If you choose to stay native, do the following:

  1. Backup Everything: Always back up your seafile-data directory and your MySQL/MariaDB databases before any step.
  2. Upgrade Seafile First: Try to upgrade Seafile as far as your current OS dependencies allow.
  3. Upgrade OS: Once you reach the limit of what Mint 20 supports, perform the OS upgrade.
  4. Fix Dependencies: After the OS upgrade, you will likely need to re-install Python dependencies for the current Seafile version using pip to match the new Python version in Mint 21.
  5. Continue Seafile Upgrades: Proceed through the remaining major versions.

3. Key Notes for Latest Versions

  • Python Dependencies: Each major version (9.0, 10.0, etc.) has specific Python library requirements. Consult the Upgrade Notes for each version.
  • Seafile 12.0+: Starting with version 12.0, the settings FILE_SERVER_ROOT and SERVICE_URL in ccnet.conf and seahub_settings.py are no longer used. These are now managed via the Web UI.

Is non-Docker still supported?
No, the Community Edition is not available as a non-Docker installation since version 13.0.

Would it also be possible to set up a new server with Linux Mint 22 and Seafile running in Docker, and then restore the existing data onto the new server? This would allow me to keep the old server in operation until the new one is fully configured and ready for production.

Yes, it is definitely possible and is often the recommended way to handle a major migration or upgrade.

Our suggestion steps steps are below:

  1. Deploy a new Seafile instance with Docker in a new machine
  2. Stop the new Seafile instance and clean its database (MySQL/MariaDB data)
  3. Backup and restore database and seafile data from old server to the new server
  4. Now the database tables in the new instance are for the old version. You need to run the upgrade scripts to update the database tables to be compatible with the newest version. (Or you can run the SQL statements manually, the files are under seafile-server-latest/upgrade/sql)
  5. Restart the new Seafile instance, and check the logs to see if there are any database related errors. If so, fix them manually.

I’ve decided to update Seafile to version 12.0.x without Docker after all.

Where can I find the download links, or what command should I use to download the update files? I couldn’t find this information anywhere in the documentation.

You can find the upgrade documents at: Outline - Seafile Admin Manual

The file can be downloaded at: Download - Seafile

I’d definitely take a backup before updating, especially the database and Seafile data directory. Then check the upgrade notes for your exact version and go one release at a time if it’s a bigger version jump. That usually avoids a lot of migration headaches.

I can’t find an update for versions 9.0.x, 10.0.x, and 11.0.x on the link, only 12.0.14.

I found the upgrade. I didn’t know that the upgrade script was included in the download.

However, the upgrade caused some problems for me. Two warnings were displayed.

After starting the services, the server was running, but the wrong version was displayed.

A few minutes later, the server went down, and the services could no longer be started. The following error message was displayed:

I then restored a snapshot. Does anyone know what could be causing this?

Database table can be incorrect or missing if you missed to run SQL upgrade script during Seafile upgrade or upgrade from a very old version. You can find the correct version of MySQL tables at:

We have updated the database. However, after the update, there were still some warnings, but the update was reported as completed successfully.

The server initially continued to run after the update, but after a restart, the Seafile website could no longer be accessed. An attempt to start the Seafile and Seahub services also failed. The following error message was displayed:

administrator@Seafile-SRV-01 ~/whw/seafile-server-latest $ ./seahub.sh start

Cannot find JWT PRIVATE KEY value from environment, try to read .env file.
Error: .env file not found.
Please follow the upgrade manual to set the .env file.

administrator@Seafile-SRV-01 ~/whw/seafile-server-latest $ ./seafile.sh start

Cannot find JWT PRIVATE KEY value from environment, try to read .env file.
Error: .env file not found.
Please follow the upgrade manual to set the .env file.

administrator@Seafile-SRV-01 ~/whw/seafile-server-latest $