Migrate from non-docker to docker deployment

I’m following the instructions for “Migrate from non-docker Seafile deployment to Docker.” It says I need to update to the latest version first. I’m still using version 11, which means I need to upgrade from version 11 to the latest version.

If I then create a Docker setup, can I use version 12 directly, or do I have to install version 11 first?

I tried to go directly to version 12, but I couldn’t log in because the “is_manually_set_contact_email” column was missing from the “profile_profile” table. So I ran the MySQL upgrade scripts, and now I can at least log in.

I have a local administrator account. It has no data except the library that is created for each user (my library). When I try to open this library, I get the error:
The sharing permissions for the library were not found.

At first, I saw the error in seahub.log: the system could not establish an LDAP connection. But this is a local user, so why does Seafile want to create an LDAP connection for this user?
Because all normal users must be reachable via LDAP, I corrected this. The connection error no longer appears in seahub.log, but the one mentioned above is still displayed. I cannot show "my library”.

Normal users are stored in an LDAP directory. I can log in with such a user, but the system then thinks it’s a new user. All data is missing, and the user receives the ID xyz@auth.local.
When I go to the system administration, all previous users are displayed under LDAP, but not under Database. Previously, all LDAP users were also displayed under Database. How can I reenable all LDAP users?

By the way, I also no longer see any groups in the system administration. It seems to me that the mapping to the ccnet_db database has been lost, but the ccnet.conf file no longer exists. How is this controlled?

On top of that, the table named Group in the ccnet_db file cannot be queried with the command line and the mysql or mariadb command. There’s a syntax error, Group is probably a keyword.

Some days I despair at all the stumbling blocks.

In version 11 document, “latest version” means the v11.0.

The simplest way to migrate from non-docker deployment to docker deployment on two different machines are:

  1. Shutdown the Seafile, Nginx and Memcached according to your situations.
  2. Backup MySQL databse and Seafile libraries data.
  3. Deploy the Seafile Docker (same version as your binary one) in the new machine.
  4. Recover the Seafile libraries and MySQL database in the new machine.
  5. Start Seafile Docker and shutdown the old MySQL (or Mariadb) according to your situations.

In this way, because you are using the same Seafile version, the databases tables and configuration files in the new and old instances can be identical. There is no compatibility issue.

You can find detailed steps at: Migrate from non-docker deployment - Seafile Admin Manual

I’m familiar with the document you provided, thanks. I’m following it exactly.

How can I specify the password for the seafile database user for version 11? I can’t find a way to define this in the docker-compose.yml file. That’s probably why I’m getting this error:
seafile-mysql | 2025-10-13 20:45:02 6 [Warning] Aborted connection 6 to db: ‘ccnet_db’ user: ‘seafile’ host: ‘172.18.0.4’ (Got an error reading communication packets)

You didn’t answer my question: how is the database name controlled in version 12, since the ccnet.conf configuration file has been removed? The database ccnet_db has tables that are at no other place.

To install Seafile version 11, you can follow the document for version 11: Seafile Community Installation - Seafile Admin Manual

The database password is defined in docker-compose.yml file. Note, after initial installation, the password for database in docker-compose.yml is no longer used, and you need to modify the generated configuration files.

To update docker installation from v11 to v12, you can check this document: Upgrade Seafile Docker - Seafile Admin Manual

In version 12.0, the database name is controlled by the environment variable SEAFILE_MYSQL_DB_CCNET_DB_NAME

Sorry, my problem was that I had configured the ports too restrictively in the Compose file. Now, with version 11, almost everything works. What doesn’t work:

The issue of the avatar image not displaying (showing only ‘Avatar’ text) in Seafile Server 11 is most commonly related to web server (Nginx/Apache) misconfiguration, specifically how static files such as user avatars are proxied. This problem was seen in earlier versions as well, and often occurs when Seafile is installed behind a reverse proxy, on a non-default port, or under a non-root URL path. If the /media or /media/avatars path is not correctly proxied or mapped in your web server configuration, the Seafile web app cannot load the avatar image files – resulting in the fallback ‘Avatar’ placeholder.

Ah, okay, thanks. That was informative.

But the problem lay elsewhere. As described above, I actually wanted to go directly to version 12, so I removed the two lines in the seahub_settings.py file:
FILE_SERVER_ROOT = ‘https://ablage.domain.tld/seafhttp’
SERVICE_URL = ‘https://ablage.domain.tld

Of course, these are necessary again in version 11. As soon as I set them, both the avatar and the wiki worked.

I was prematurely happy.

I was able to convert a non-docker deployment to a docker deployment. As long as I’m working with the same Seafile version (11), everything works.

Now I’ve converted this deployment to version 12, and the same errors I described at the very beginning are occurring again.

I can’t view “my library” with a local user; apparently, the permissions can’t be determined. It’s even worse with LDAP users. Logging in works, but Seafile no longer recognizes any libraries and creates a new “my library”.

The groups simply appear empty. Nothing that was there is there anymore.

I suggest you create a new thread about upgrading from v11.0 to v12.0.

LDAP functionality remains unchanged between v11.0 and v12.0. However, LDAP was re-implemented in v11.0, which means the issue you’re experiencing likely already existed in your v11.0 server.

To troubleshoot this problem, please refer to the v11.0 documentation, specifically the section on LDAP configuration changes: Upgrade notes for 11.0.x - Seafile Admin Manual

Okay, I’ll do that if I still can’t get it to work. It works with the binary setup. That means I can migrate from version 11 to 12, and everything will still be there afterward. I would use it that way if I could, but I still need Docker for the notification server and SeaDoc. So I thought, if I have to, I’ll switch completely to Docker. Unfortunately, it’s quite cumbersome. Nobody pays me for the hours and days I spend on it.

By the way, I completed the LDAP migration a long time ago, and the LDAP connection works perfectly with version 11. In Binary and with Docker.