syncthing-file-replication

Syncthing file replication using ubuntu 22.04

SyncThing is a peer-to-peer file sync service, meaning that your devices form a direct connection instead of storing files on someone else's servers. If all those devices are on the same network, your files never leave that network (though SyncThing can work remotely as well).

Installation

Update the package list and install Syncthing:

apt update
apt install syncthing

Starting Syncthing Service

Enable and start the Syncthing service:

systemctl enable syncthing@root.service 
systemctl start syncthing@root.service 
systemctl status syncthing@root.service 

Configuring Syncthing

Update the config.xml file located at /root/.config/syncthing/config.xml. Modify the <gui> section with the following:
`

 <gui enabled="true" tls="false" debugging="false">
        <address>0.0.0.0:8384</address>
        <apikey>EyKiG4cPR36uh5oVVpbXsmNEmysV6Gna</apikey>
        <theme>default</theme>
 </gui>

Restart Syncthing

After updating the config file, restart the Syncthing service:

sudo systemctl restart syncthing@root.service 

Replace /root with the appropriate user's home directory if you want to run Syncthing as a different user.

Web UI Setup

Note: Ensure that your firewall allows traffic on port 8384 for Syncthing to function correctly.

Update Web UI Credentials:

Configure Connection Settings:

Add Remote Devices

Identify Device ID:

Add Remote Devices:

Set Up Folder Replication

Add Replication Folder:

Notify Syncthing2:

Repeat for Syncthing2:

Reference

  1. Syncthing Documentation