I just bought the LG Stylus 2 smart phone, which won't give me access to the SD card as mass storage device, so I installed
syncthing as first service on my BPI-R1.
Repository
The first thing to do is to attach the syncthing repository.
curl -s https://syncthing.net/release-key.txt | apt-key add -
echo "deb http://apt.syncthing.net/ syncthing release" | tee /etc/apt/sources.list.d/syncthing-release.list
Next I updated the package cache.
apt-get update
Installation
apt-cache search syncthing
apt-get install syncthing
apt-get install syncthing-inotify
Then I checked what was installed
dpkg-query -L syncthing
Next step was to add a syncthing user
useradd syncthing
Then I linked
/lib/systemd/system/syncthing@.service
to
/etc/systemd/system/multi-user.target.wants/syncthing@syncthing.service
in order to start the service in multi user target.
Now enable the Service
systemctl enable syncthing@syncthing.service
First settings
Before I started the service I had to adjust the adress setting in ~/.config/syncthing/config.xml. Normally the syncthing web frontend listens to localhost. I want to be able to access the GUI from everywhere, so I replaced localhost within the address file
<gui enabled="true" tls="false" debugging="false">
<address>0.0.0.0:8384</address>
<apikey>xxxxxxxxxxxxxxxxxxx</apikey>
<theme>default</theme>
</gui>
Now it possible to access the GUI from every PC on the LAN. Open a browser and enter the servername
myserver:8384
in the URL field of the browser.
Share directory
Make a directory
mkdir /mnt/data/syncthing/doc
Enter it in the syncthing web GUI
follow the instructions in the syncthing manual to share directories with other devices.
Hint: If you want to sync to an SD card in an Android phone you have to place the local directory on the phone under the path ...sdcard.../Android/data/com.nutomic.syncthingandroid.files. Only in this subtree on the SD card syncthing is allowed to write.