Data1, Data2 locations

I’m looking at setting up syncthing using Docker and I’m a bit confused as to the purpose of the data1 and data2 volume mounts.

In my I just found out about Syncthing today depth of knowledge my understanding is that the sync directories are setup inside Syncthing.
I know from my other Docker containers that /path/to/dir:dir ‘points’ dir inside the container to /path/to/dir on the host machine.
Does this mean that I have to know all the directories I want to sync before creating the container, and if I need to add a directory in the future I need to add more volumes in the compose file?
Also are Data1, Data2 arbitrary names?

1 Like

I have the same question.

Did you eventually find your answer?

I was just looking at the documentation and wondering about this.

I believe /data1 and /data2 are just examples. For example, let’s say you want to share your entire drive, then you could map /:/host_root_drive so that in the syncthing app, all files are in /host_root_drive/.

I’m puzzled why no one has a definite answer. It’s a filesyncing app, so you can do a lot of damage if you misconfigure it. You don’t want to guess.

Also, as I understand, you’re supposed to configure syncthing through a web UI. It’d be a serious shortcoming if you can only configure the syncing at boot time.

From the docs, I’d guess the datadir parameter corresponds to the “–data=dir” parameter to the syncthing CLI, which defines a location for the database, though it doesn’t explain why you might have more than one.

vinhdizzo is correct.