Syncthing Docker directories


(Urban Fictionary) #1

I’m trying to pull the docker container on my server, I have one I pulled from linuxserver.io but their sync directory is not working. So I want to pull the official as it will be the latest and greatest.

In the Entrypoints for the docker container I see the following: /bin/syncthing - is this the synchronization directory where pulled/pushed files are stored? /var/syncthing/config - is this where the configuration files go?

If the above is not the case what are the available directory variables for the container? Any links to the docker variables would be appreciated.

Thanks


(Audrius Butkevicius) #2

(Jakob Borg) #3

(Urban Fictionary) #5

Thank you Jakob.


(neyla) #6

Run Syncthing in a container. Combine with volumes to have the synchronized files available on the host.

The exposed volumes are by default:

/var/syncthing/config - the configuration and index directory into the Container /var/syncthing - the default sync folder into the Container You can add more folders and map them as you prefer.

Example usage:

$ docker pull syncthing/syncthing $ docker run -p 8384:8384 -p 22000:22000
-v /wherever/st-cfg:/var/syncthing/config
-v /wherever/st-sync:/var/syncthing
syncthing/syncthing:latest Note that local device discovery will not work with the above command resulting in poor local transfer rates if local device addresses are not manually configured.

To allow local discovery, the docker host network can be used instead:

$ docker pull syncthing/syncthing $ docker run --network=host
-v /wherever/st-cfg:/var/syncthing/config
-v /wherever/st-sync:/var/syncthing
syncthing/syncthing:latest Be aware that syncthing alone is now in control of what interfaces and ports it listens on. You can edit the syncthing configuration to change the defaults if there are conflicts.


(Urban Fictionary) #7

You are forgetting the UDP port setting for the docker.

Here is what I got working on my server.

docker run --net=bridge --name Syncthing -p 8384:8384 -p 22000:22000 -p 21027:21027/udp -v /my/own/configdir:/var/syncthing/config -v /my/own/syncdir:/var/syncthing/ -e PGID=1000 -e PUID=1000


(system) #8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.