Install Syncthing 2.x for continuous file synchronisation on Debian or Ubuntu
Syncthing is an open source tool that synchronises files continuously across multiple devices. It transfers data between two or more of your computers, without uploading any information to the cloud.
Syncthing packages are available for Android, Windows, macOS and Linux (including Synology DSM). In addition, Synctrain enables iOS devices to “securely synchronise files with other devices that have Syncthing installed”.
The usefulness of the Syncthing Project cannot be overstated.
Running the Syncthing stable-v2 channel
Syncthing is included in the Debian and Ubuntu repositories, respectively. If you would rather use the most up-to-date version, you need to add the Syncthing repository to your list of APT sources.
These instructions are targeting the latest release of the Syncthing stable channel. In the following example, syncthinguser is the local username.
Step 1
Add the Syncthing release key for validation of packages downloaded from the Syncthing repository.
$ sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
Step 2
Add the Syncthing repository.
$ echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2" | sudo tee /etc/apt/sources.list.d/syncthing.list
Step 3
Install Syncthing on your system.
$ sudo -- bash -c 'apt update && apt install --yes syncthing apt-transport-https'
Step 4
Enable Syncthing for the local user syncthinguser. Don’t forget to replace syncthinguser with your username before running the command.
$ sudo -- bash -c 'systemctl enable syncthing@syncthinguser.service && systemctl start syncthing@syncthinguser.service && systemctl status syncthing@syncthinguser.service'
Step 5
You may need to edit your firewall settings to open ports for incoming and outgoing traffic.
If you are using ufw as a host-based firewall
Configure ufw to allow connections to Syncthing.
$ sudo ufw limit syncthing
If you are using firewalld as a host-based firewall
Configure firewalld to allow connections to Syncthing.
$ sudo -- bash -c 'firewall-cmd --zone=public --add-service=syncthing --permanent && firewall-cmd --reload && firewall-cmd --info-zone=public'
Step 6
Access the Syncthing configuration page by using your browser to navigate to the following address:
http://localhost:8384
Step 7
Complete your setup by referring to the Syncthing documentation.
Upgrading from the v1 channel
If you have previously installed from apt.syncthing.net and are currently running Syncthing 1.x, upgrading to the stable-v2 channel is straightforward.
Remove the old APT sources configuration file.
$ sudo rm /etc/apt/sources.list.d/syncthing.list
Add the new repository for the stable-v2 channel together with its release key.
$ sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg && echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2" | sudo tee /etc/apt/sources.list.d/syncthing.list
Upgrade to the latest stable version of Syncthing.
$ sudo -- bash -c 'apt update && apt upgrade --yes'
The Syncthing 2.0 release was recently described as ‘A Giant Leap Forward in Decentralized File Synchronization‘.
#android #cloud #debian #diday #digitalsovereignty #howto #ios #iphone #linux #linuxmint #macos #obsidianmd #opensource #privacy #selfhosting #syncthing #synctrain #ubuntu #windows