Syncthing is great tool! It allows me to sync data across all devices connected via my home network. Windows, FreeBSD, & Android. This HowTo will walk you through a few easy steps that'll have you running Syncthing at boot time as a normal user on your FreeBSD machine.
(Do note, this is an amateur How-To. If there is a more efficient way of executing at boot time, please let me know!)
Install wget (to download syncthing via console)
*** If you don't have sudo installed, log in and run as root
Now, log in as the user that will be running Syncthing.
Download the latest version of SyncThing
Extract Syncthing tar ball
Create SyncThing directory (I used the following)
Copy syncthing files to new directory
Create a Syncthing executable script and store it somewhere safe.
Edit /etc/crontab to run Syncthing script at boot time.
*** Or log in as root to edit /etc/crontab
Add the following line at the bottom of /etc/crontab to execute your Syncthing script
*** UserName is the user you wish to run Syncthing
Save and exit /etc/crontab
That's it! Every time your FreeBSD server restarts, Syncthing will run automatically for the designated user. FYI, Syncthing updates are downloaded automatically via the application. Hope this helps!
~kuan
(Do note, this is an amateur How-To. If there is a more efficient way of executing at boot time, please let me know!)
Install wget (to download syncthing via console)
Code:
# sudo pkg install wget
Now, log in as the user that will be running Syncthing.
Download the latest version of SyncThing
Code:
# mkdir ~/Downloads
# cd ~/Downloads
# wget https://github.com/syncthing/syncthing/releases/download/v0.11.6/syncthing-freebsd-amd64-v0.11.6.tar.gz --no-check-certificate
Extract Syncthing tar ball
Code:
# tar xzf syncthing-freebsd-amd64-v0.11.6.tar.gz
Create SyncThing directory (I used the following)
Code:
# mkdir ~/.config/syncthing
Copy syncthing files to new directory
Code:
# cd ~/.config/syncthing
# cp -R ~/Downloads/syncthing-freebsd-amd64-v0.11.6/* ./
Create a Syncthing executable script and store it somewhere safe.
Code:
#!/bin/sh
/usr/home/UserName/.config/syncthing/syncthing
Edit /etc/crontab to run Syncthing script at boot time.
Code:
# sudo vi /etc/crontab
Add the following line at the bottom of /etc/crontab to execute your Syncthing script
Code:
@reboot UserName /safe/script/storage/location/SyncThing.sh
Save and exit /etc/crontab
That's it! Every time your FreeBSD server restarts, Syncthing will run automatically for the designated user. FYI, Syncthing updates are downloaded automatically via the application. Hope this helps!
~kuan