Skip to content

Run Seafile as non root user inside docker

You can use run seafile as non root user in docker.

First 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/

Then destroy the containers and run them again:

docker compose down
docker compose up -d

Now you can run Seafile as seafile user.

Tip

When doing maintenance, other scripts in docker are also required to be run as seafile user, e.g. su seafile -c ./seaf-gc.sh