Syncthing is a fantastic FOSS utility that allows you to easily synchronize all your files and data across all of your computers/devices (macOS/Windows/Linux/Android). Syncthing is a Private & Secure, Open, and Easy to use program. It can be used as an alternative to Dropbox/GoogleDrive/MEGA etc. In this blog post, I'll show you everything you need in order to get started using Syncthing.
Syncthing works, over LAN and over the Internet. Every machine is identified by an ID using that ID lets us connect the devices to each other.
Requirement
- A VPS/Cloud server/Physical server up with 24*7
- Domain (optional)
Debian/Ubuntu Packages
You can refer to the command provided by the Syncthing document if you are using any other distribution
Install curl (if not already installed)
sudo apt install -y curl
Add the PGP key for the repository
sudo curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
Add the repository
sudo echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
Install Syncthing
sudo apt update
sudo apt install -y syncthing
Add systemd unit
By setting up a system, the system will automate the process of starting syncthing
wget https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-systemd/system/syncthing%40.service
sudo chown root: syncthing@.service
sudo mv syncthing@.service /etc/systemd/system
sudo systemctl daemon-reload
Enable and start the unit
sudo systemctl enable syncthing@username
sudo systemctl start syncthing@username
Check the status
sudo systemctl status syncthing@username
Access the web GUI for Syncthing
http://1270.1.1:8384 or ServerIp:8384
Allow connections to the web GUI from network devices
Open the config file in an editor:
sudo vim /home/username/.config/syncthing/config.xml
Change the line:
<address>127.0.0.1:8384</address>
To:
<address>0.0.0.0:8384</address>
Restart syncthing:
sudo systemctl restart syncthing@username
Now, you can access the web GUI and add shared folders. Make sure you set up a username and password in the GUI, to keep it safe.
How do we benefit from it?
As library technicians, we can install the package within the Koha hosted VPS/cloud server and make a daily backup to syncthing folder that will sync to entire devices that have been connected to the server.
See the workflow
Reference: