syncthing/syncthing is reset to default if the container is modified

Discussion about Docker
Locked
User avatar
JoeS
Posts: 4
Joined: 07 Dec 2022, 13:43

syncthing/syncthing is reset to default if the container is modified

Post by JoeS »

NAS: F5-221
TOS Version: 4.2.40-
Volume #1: btrfs
Docker App: v10.05.5
Syncthing image: syncthing/syncthing

Issue: Each time I stop the syncthing container and edit the settings, like adding a new Directory/Loading Path to the "Volume" tab, a new 'volume' directory is created in the '/mnt/md0/appdata/docker/volumes' directory. The contents of the new volume are all defaults. All configuration previously set is still inside an old volume, but it is no longer used by Docker/syncthing so you end up with a clean/fresh install of syncthing every time.

In this image, each volume is another copy of syncthing. It's the only docker image installed.
SSH dir view of numerous volumes of syncthing configs
SSH dir view of numerous volumes of syncthing configs
Do you have any suggestions for resolving this?

Container Settings:
Settings Tab 1
Settings Tab 1
Settings Tab 2
Settings Tab 2
Settings Tab 3
Settings Tab 3
2022-12-07_2473.png (23.62 KiB) Viewed 1752 times
Settings Tab 4
Settings Tab 4
Settings Tab 5
Settings Tab 5
2022-12-07_2475.png (24.29 KiB) Viewed 1752 times
Settings Tab 6
Settings Tab 6
User avatar
JoeS
Posts: 4
Joined: 07 Dec 2022, 13:43

Re: syncthing/syncthing is reset to default if the container is modified

Post by JoeS »

Is there a way to move the "/var/syncthing/config" outside of the container/volume so that it does not get lost every time the container is updated? I know you can do it via CLI or docker-compose, but the Docker App in the UI doesn't allow you to edit the "Entrypoint" entry.

Can I specify something in the editable "Command" field at the bottom of tab 6 (Environment) that will override what is being set for the config data location?

Thanks!

Joe
User avatar
JoeS
Posts: 4
Joined: 07 Dec 2022, 13:43

Re: syncthing/syncthing is reset to default if the container is modified

Post by JoeS »

So, the solution was to place an entry in the Volume section. The reason for this is so that your config files persist after the container is updated/replaced.

I added an entry with:
File/Directory: "/mnt/md0/appdata/syncthing/config"
Landing: "/var/syncthing/config"

This tells the container to map the File location to the Landing location so that in the container, the internal directory /var/syncthing/config actually points outside the container to the /mnt location. If you update the container, which happens often, you still have your config files.

You want to make sure to put your config files on a partition that has enough room. Depending on the number of files you are trying to sync, the sync database stored in the /config directory can easily top 1GB. If you try to place it in your /etc directory like I did, then you get lots of errors when the /etc partition fills up.
Locked