Unhealthy `seafile-mysql` container with docker compose

Hello!
We’ve been successfully using Seafile Community Edition 12.0.11 for about a month now. Today I tried modifying the configuration so that a non-root user could backup the data tree on disk. Unfortunately this broke the seafile-mysql container somehow.

I was trying to follow the instructions in the manual under “Run Seafile as non root user inside docker,” following the instructions as follows:

First deploy Seafile with docker, and destroy the containers.

docker compose down

Then add the NON_ROOT=true to the .env.

NON_ROOT=true

Then modify /opt/seafile-data/seafile/ permissions.

chmod -R a+rwx /opt/seafile-data/seafile/

Start Seafile:

docker compose up -d

Now however the seafile-mysql container fails to start. It remains in “unhealthy” status, failing with the following error forever:

seafile-mysql  | 2025-05-18 23:19:25 3 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
seafile-mysql  | 2025-05-18 23:19:25 4 [Warning] Access denied for user 'root'@'::1' (using password: NO)
seafile-mysql  | 2025-05-18 23:19:30 5 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
seafile-mysql  | 2025-05-18 23:19:30 6 [Warning] Access denied for user 'root'@'::1' (using password: NO)

I also tried running

sudo docker compose up -d

But I still get the same error.

Did running chmod -R a+rwx /opt/seafile-data/seafile/ somehow mess up the DB? That is where the DB data files live as well.

Thanks for the help

Somehow, running

chmod -R 775 /opt/seafile-data/seafile/

fixed the issue. In other words it was the “a+w” permission that was somehow preventing it from starting.