I am newbie in using syncthing. I feel myself like I have found a gold mine or diamond, and getting angry to myself about why I have not heart this software before…!
I have a couple of questions and any comment, directions are much appreciated.
I have kids, wife, all have computers/labtops/phones/tablets. We are using windows 10, and arch/manjaro linux at pc/labtops. I am running an arch/manjaro linux server for a central storage, sharing, and for all sorts of services (multimedia, backups etc.) All family share files/folders through arch server with nfs/samba/ftp etc, home folders are accessible via the same account information alongside with their pc/labtop.
I need to sync data on all these hardware to central server for each user.
In server, by using arch linux’s ready to use package, which includes systemd services, is installed from arch repository.
pacman -S syncthing
I am running
syncthing v1.4.2 "Fermium Flea" (go1.14.1 linux-amd64) builduser@svetlemodry 2020-04-08 18:40:04 UTC
I created services for each user accound via
systemctl enable syncthing@user
systemctl start syncthing@user
For each user account, I have customized ~/.config/syncthing/config.xml with following changes.
- I changed web gui default port to prevent collision for each user.
<gui enabled="true" tls="false" debugging="false"> <address>127.0.0.1:11200</address> <apikey>some text</apikey> <theme>default</theme> </gui>
I gave for example port numbers as 11200, 11201, 11203 for each account.
I have changed listening port as 22000,22001,22002 etc. based on the suggestion at Arch Syncthing Wiki. In the wiki, there is paragraph as follows:
Use a different listen address port for each machine, like
tcp://:22012and so forth. This will differentiate the nodes on the global discovery servers and avoid the “Connected to myself - should not happen” message on the other local devices whenever they leave the LAN.
- My setting for each user account in their corresponding configuration file is follows.
<options> <listenAddress>:22001</listenAddress> . . </options>
I have not completed all but, I have tried in two arc/manjaro linux client following configuration.
I have given the same gui port ids to corresponding user accounts in users hardware to make easy to remember.
I have also gave distinct listening address ports unique in the network such as 22010, 220011 etc. As a summary, for every user account in any machine, A distinc/unique listening port number is given.
- For example I have one pc and labtop, they are not both synching to the my account home folder successfully and I am very happy about it.
PC <----> Server <----> Labtop
- In syncthing settings PC, Server and Labtop, Server are all in auto-accept mode.
- Even the first architecture is adequate, I would like to give it a redundancy via following which I could not achieve.
+----->Server<------+ | | | | | | V V PC <-------FAILS----> Labtop
I add the PC to labtop and to labtop the PC etc, in addition to server. They never see each other even though all connection options (local,global, nat etc) are all activated. The server, however, happily synching with two device.
- Is the mesh and redundant architecture doable, as describe above?
- What is the truth about the directive in arch wiki: Are the distinct listening port numbers necessity. Could they be a problem for disconnection. In the second configuration, pc and labtop never see each other from the beginning. What would be methodoly multiple accounts on the server to assign the ports numbers?
- Based on your advices, I will mimic this solution for all devices of the users including phones/tablets.
ANY HELP MUCH APPRECIATED…
After changing the listening ports to default with pc/labtop/server the mesh architecture seems to work. However I do not know if this would create a problem in the long run. I still wonder what is meant in Arch Linux Wiki. Then when should we change the default listening ports?