Syncthing works in a decentralized manner, meaning you can simply install the software in all your devices and they will directly stream any changes in your shared folders between them.
However, if you usually only have one device open at a time it won't have anywhere to send the changes. For this reason it's practical to install the software in a server so that at least there's always one online node. This node can also be configured as an "introducer", meaning that every time you set up the software in a new device you just need to setup the server node, and it will automatically setup the rest for you.
The project maintains a PPA here with installation instructions, but in short:
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt-get update
sudo apt-get install syncthing
The software must be configured to start automatically on startup. On a recent Debian or Ubuntu this involves setting up a Systemd service.
cat > ~/.config/systemd/user/syncthing.service <<EOF
[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
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true
[Install]
WantedBy=default.target
EOF
systemctl enable syncthing@$USER.service
systemctl start syncthing@$USER.service
TBD
Backup everything under $HOME/.config/syncthing
to preserve the identity of the node
between full reinstalls.
What happens if you rm -rf ~
and how to recover from that.