What is Syncthing?
Syncthing
replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.
In otherwords, you can create your own directory that "auto" sync between each other.
Syncthing uses a website for setup, that can be found at
http://localhost:8384
setup in general is pretty easy and pretty straight forward.
Installing Syncthing for Debian/Ubuntu based distros
The basics:
The stable channel is updated with stable release builds, usually every first Tuesday of the month.
# Add the release PGP keys:
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
# Add the "stable" channel to your APT sources:
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
# Update and install syncthing:
sudo apt-get update
sudo apt-get install syncthing
Cross-platform
There is a setup for Windows boxes, macOS, and a Android app. Please see the above website for more information.
Starting the program.
There are a couple of different ways to start the program, you can use it "on demand" by typing
syncthing
in the terminal.
But a better way is to setup syncthing to start when your user logs in.
Here is the summary:
How to set up a user service
Create the user who should run the service, or choose an existing one. Probably this will be your own user account.
Copy the Syncthing/etc/linux-systemd/user/syncthing.service file into the load path of the user instance.
Enable and start the service:
systemctl --user enable syncthing.service
systemctl --user start syncthing.service
Checking the service status
To check if Syncthing runs properly you can use the status subcommand. To check the status of a system service:
systemctl status syncthing@myuser.service
To check the status of a user service:
systemctl --user status syncthing.service
The syncthing.service file can be found on Github
Here is a summary of it:
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization
Documentation=man:syncthing(1)
[Service]
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
RestartForceExitStatus=3 4
# Hardening
ProtectSystem=full
PrivateTmp=true
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true
[Install]
WantedBy=default.target