echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
Update Sources List
sudo apt update
Install the SyncThing package
sudo apt install syncthing
Allow External Connections to the Web Client
Run SyncThing to generate the config files
syncthing
Find where the config file is located
syncthing -paths
Modify the config file
Change this line from <address>127.0.0.1:8384</address> to <address>0.0.0.0:8384</address>. This will allow connections from any address, if you want to restrict this to only allow connections from with the same subnet as the pi change the address to the pi’s.
Config SyncThing as a Service
Add the below content to the file /lib/systemd/system/syncthing.service
NOTE: CHANGE THE USER TO THE USER YOU WANT SYNCTHING TO RUN AS