Install Syncthing on Linux

Syncthing isn’t available to install using the default repo. So the first step is adding syncthing repo to our apt sources so we can install it on our computer. We need to open up a terminal and run the following command.

1echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list

Center

We must ensure we have curl installed to install the syncthing PGP key. All we need to do is the following command.

1sudo apt install curl

If it is already installed, you will get this message

Center

If you need to install it, your screen will look like this one.

Center

The next step we need to do Is add the synching repo PGP key to our apt keys. Without this, apt will not trust synching repo and will not install syncthing.

1curl -s https://syncthing.net/release-key.txt | sudo apt-key add -

You should see the following if you added it correctly.

Center

We need to update the download package information from synching and your other sources on your computer. We do that by running the sudo apt update.

1sudo apt update

Center

We finally get to install Syncthing on Linux. We just need to type the command below and press enter.

1sudo apt install syncthing

Center

Now we got syncthing installed; we need to enable syncthing to start at boot using the systemctl command. But make sure you replace the username with your user name in the following order. But please don’t use root. It is a security issue.

1sudo systemctl enable [email protected]

Center

Let’s start syncthing up for the first time by running this command below. Make sure you change the user name to your user name.

1sudo systemctl start [email protected]

Center

If you want to configure syncthing from another computer, you must change one line in the config file to allow access. It would be best if you had an editor. In this example, I am going to be using pico.

1sudo pico .config/syncthing/config.xml

Center

Need to find 127.0.0.1:8384 It is under the . We need to change it from 127.0.0.1:8384 to 0.0.0.0:8384 Center

Then we need to restart the syncthing service by running this command. Make sure you change the username to your username again

1sudo systemctl restart [email protected]