In this guide, we are going to look at how to install and use Syncthing File Synchronization on Linux Mint 20. Syncthing is an open source application used for synching files between computers in a network. Other similar applications include Nextcloud, Pydo Cells and Seafile.
Features of Syncthing file synchronization
- It is easy to use through a cli and GUI through Synchthing-GTK
- Its data syncing fully automatic – Low interaction
- Synthing strives to be safe from data loss – Ensures no corruption on user’s files.
- It is universally available – Runs on both Windows and Linux
Installing Syncthing on Linux Mint 20
Update your system and install required dependencies by running the below commands.
$ sudo apt-get update $ sudo apt-get install curl apt-transport-https
Now import Syncthing GPG key with the below command:
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
Next, create repo content
$ echo "deb https://apt.syncthing.net/ syncthing release" > sudo /etc/apt/sources.list.d/syncthing.list
Having added the key, update apt packages and install syncthing
$ sudo apt-get update $ sudo apt-get install syncthing
Verify the installation by checking the installed version
$ syncthing --version syncthing v1.9.0 "Fermium Flea" (go1.15.1 linux-amd64) [email protected] 2020-08-28 05:48:25 UTC [noupgrade]
Configure Syncthing on Linux Mint 20
Let us go ahead to create a systemd unit file for easier management of Syncthing. Systemd files are found in /etc/systemd path.
$ sudo vim /etc/systemd/system/syncthing.service
Add the following content
[Unit] Description=Syncthing Documentation=man:syncthing(1) After=network.target [Service] User=lorna ExecStart=/usr/bin/syncthing -no-browser -gui-address="0.0.0.0:8384" -no-restart -logflags=0 Restart=on-failure SuccessExitStatus=3 4 RestartForceExitStatus=3 4 [Install] WantedBy=multi-user.target
Save the file and reload daemon and start Syncthing service with the below commands. Note that you can specify your server IP address in ‘gui-address=”your-ip:8384”
Also note that I have used ‘User=lorna‘. If you use root, you will get a warning from Syncthing UI that Syncthing should not run as a privileged or system user.
$ sudo systemctl daemon-reload $ sudo systemctl start syncthing
Confirm syncthing service status
$ sudo systemctl status syncthing
The output should be as below if running:
Access Syncthing UI
Once installation is complete, access Syncthing from the browser with localhost: http://localhost:8483/. If you had provided a gui IP in the systemd unit file, user the url: http://<your-IP>:8483/. You will get a page asking you to set a Gui authentication username and password.
Click on Settings-> Gui to set authentication settings and click save
Once you login with your set credentials, you should see a page as below:
Syncthing Add Remote Devices.
In order to be able to sync files between two computers, both computers must have syncthing installed. On one device, add the other device through adding the device ID. Click on ‘Add remote device’
Enter the remote device ID, give a name and click save. Click on sharing tab to determine the files to share
Note: The default folder being shared is ~Sync. When you have made changes like adding Sync directories, ensure you restart Syncthing on “Actions” > “Restart”.
That’s it. You have successfully installed and set up Syncthing file synchronization on Linux Mint 20. Enjoy sharing files! Below are more interesting Linux guides.