Docker configuration file location for

I had a very long troubleshooting session before realizing that I had edited the wrong configuration file… There are actually two files for in my docker container configuration:


Can someone tell me which to use? It seems that the file stored in ‘conf’ folder is used and the right one. When changing thing there (CSRF settings) the application starts to work.
After this finding can I safely remove the other file and copy all missing settings over to the file in the conf folder?

You should use the configuration file in the host machine, outside the docker image. It should be a location like: /opt/seafile-data/seafile/conf

That’s a nonsense answer. It doesn’t matter where the config file is on the host machine. The only thing that matters is where it is mapped to inside the container. In the container, the settings file should be at /opt/seafile/conf/

I’m assuming @webtux has /shared/seafile/ mounted to /opt/seafile/. In this case, the second one /shared/seafile/conf/ would the correct.
Can you share your docker-compose.yml file @webtux ?

We don’t recommend to enter into the docker container and modify things inside. Because

  1. The folder structure inside the docker container can be changed in the future.
  2. Things inside the docker container are not persistent by default. Your modifications will lost once you restart the container.

There is a unique location for configurations on the host machine. Modifying the files on the host machine can make sure you modify the correct one.

I think it is misleading to suggest that the location on the host machine matters at all. Because it doesn’t.

If I understand correctly, inside the container, there is a directory /shared. This directory contains various config files. Symlinks in /opt/seafile (also in the container) point to those config files.

Which host directory is mapped to /shared does not matter.

Modifying the mapped files inside the container also persists the data, there is no difference to modifying them on the host. This is because the files are mapped to the host file system.

If the folder structure of /shared was to be changed, then one would also have to change the paths of the mounts in the docker-compose.yml. Unless you would just change the symlinks, but then your first point is moot.

I would suggest that you do not make arbitrary abstractions for the users, as this creates more confusion and makes it harder to distinguish necessary abstractions and restrictions from actually necessary ones.

From my understanding of docker, when a software is distributed as docker image, it is treated like a binary program. That the user of the docker image don’t need to understand the internal structure of the docker image.

My docker-compose.yml has this:

- /var/lib/docker/volumes/seafile_data:/shared

So in the end I see the seafile folder here from the host:

From the postings I would asume my observation is right that the file ‘seafile/conf/’ is used and the file ‘seafile/’ can be removed safely?