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
Prepare the System
First, update your package list and install the necessary dependencies for handling HTTPS repositories and GPG keys.
sudo apt update
sudo apt install curl apt-transport-https -y
Add the GPG Key and Repository
Create the keyring directory:
sudo mkdir -p /etc/apt/keyrings
Download the Syncthing GPG key:
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
Add the Syncthing "stable" channel to your sources:
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
Install Syncthing
Now that the repository is added, update your package index and install the software.
sudo apt update
sudo apt install syncthing -y
Start and Enable the Service
To ensure Syncthing starts automatically when your user logs in or the system boots, you should enable the systemd service for your specific user.
Replace mahesh with your actual Debian username.
sudo systemctl enable syncthing@mahesh.service
sudo systemctl start syncthing@mahesh.service
Access the Web Interface
By default, Syncthing provides a web-based GUI for configuration.
Address: http://127.0.0.1:8384
Allow connections to the web GUI from network devices
Open the config file in an editor:
sudo vim /home/mahesh/.local/state/syncthing/config.xml
Find the GUI section and change the address from 127.0.0.1:8384 to 0.0.0.0:8384:
<gui enabled="true" tls="false">
<address>0.0.0.0:8384</address>
</gui>
Save and Exit
Restart syncthing:
sudo systemctl restart syncthing@mahesh
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.
Reference:
https://apt.syncthing.net/
