Syncthing: https://syncthing.net/
Syncthing is a free, open-source peer-to-peer file synchronization application available for Windows, Mac, Linux, Android, Solaris, Darwin, and BSD. It can sync files between devices on a local network, or between remote devices over the Internet. Data security and data safety are built into the design of the software.
This is written using Linux Mint 21.2 x86_64 using kernel 5.15.0-89-generic.
I couldn't find good directions for doing this, so here we go.
sudo curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
sudo echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update
sudo apt install syncthing
If you get the following error.
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
E: Failed to fetch https://apt.syncthing.net/dists/syncthing/InRelease
Install apt-transport-https
sudo apt install apt-transport-https
I don't like to run services from my personal account, I also wanted the user's home directory in a non-standard path. Use whatever path you want or /home
.
sudo useradd -r -M -d /raidarray/syncthing/ syncthing
sudo passwd syncthing
Login, I use su -
you can use whatever.
sudo su - syncthing
Run syncthing
.
syncthing
This will display a bunch of status info, just wait for a minute then do CTRL-C
to force quit it. The goal here is to create the .config
directory and files.
Exit back to your regular user.
exit
I don't want syncthing to be able to login, so I change the shell to /bin/false
.
sudo usermod --shell /bin/false syncthing
I use vi
you can use nano
or whatever editor you like.
Here we are going to edit the syncthing
user config file, you will need to change the pathing of course.
sudo vi /raidarray/syncthing/.local/state/syncthing/config.xml
Note they change this path now and then, you can find it with: find /raidarray/syncthing -type d -name syncthing
Look for:
<gui enabled="true" tls="false" debugging="false">
<address>127.0.0.1:8384</address>
Change to:
<gui enabled="true" tls="false" debugging="false">
<address>0.0.0.0:8384</address>
Save and quit.
sudo systemctl stop [email protected]
sudo systemctl disable [email protected]
sudo rm /lib/systemd/system/[email protected]
sudo cp /lib/systemd/system/[email protected] /lib/systemd/system/[email protected]
sudo systemctl enable [email protected]
sudo systemctl start [email protected]
sudo systemctl status [email protected]
This should output something like:
● [email protected] - Syncthing - Open Source Continuous File Synchronization for syncthing
Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-11-24 16:07:43 EST; 29min ago
Docs: man:syncthing(1)
Main PID: 22558 (syncthing)
CGroup: /system.slice/system-syncthing.slice/[email protected]
└─22558 /usr/bin/syncthing -no-browser -no-restart -logflags=0
You should be able to browse to your syncthing WebGUI now.
http://hostname:8384
Login with syncthing and whatever password you set.
Seems to work great. Installed in a Ubuntu distro running on WSL 2.