Syncthing is a powerful and secure open-source file synchronization tool that synchronizes files across multiple devices and platforms. Whether you need to synchronize files between your computers, servers, or mobile devices, Syncthing offers a decentralized and flexible solution that prioritizes privacy and security. Syncthing lets you create your private file synchronization network, ensuring your data remains controlled and protected from third-party access.

In this guide, we will walk you through the step-by-step process of installing Syncthing on Ubuntu 22.04.

Step 1 – Add Syncthing Repository

By default, the Syncthing package is not included in the Ubuntu central repository, so you will need to add the Syncthing official repo to the APT source list.

First, install the required dependencies:

apt update -y
apt install gnupg2 curl apt-transport-https -y

Next, download the Syncthing GPG key:

curl -fsSL https://syncthing.net/release-key.txt | gpg --dearmor -o /etc/apt/trusted.gpg.d/syncthing.gpg

Next, add the Syncthing repository to APT.

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

Next, update the repository index.

apt update

Step 2 – Install Syncthing

At this point, the Syncthing repository is ready. You can now install Syncthing using the apt command:

apt install syncthing

Once Syncthing is installed, you can verify the Syncthing installation using the following command:

syncthing --version

You will see the Syncthing version in the following output:

syncthing v1.27.3 "Gold Grasshopper" (go1.21.6 linux-amd64) [email protected] 2024-01-15 03:45:19 UTC [noupgrade]

Step 3 – Manage Syncthing Service

By default Syncthing service is managed by systemd. You can easily start, stop, and disable the Syncthing service via the systemctl command.

To start the Syncthing service, run:

systemctl start [email protected]

To enable the Syncthing service, run:

systemctl enable [email protected]

To check the status of the Syncthing service, run:

systemctl status [email protected]

Output:

[email protected] - Syncthing - Open Source Continuous File Synchronization for root
     Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
     Active: active (running) since Fri 2024-02-09 09:54:38 UTC; 5s ago
       Docs: man:syncthing(1)
   Main PID: 59585 (syncthing)
      Tasks: 15 (limit: 4579)
     Memory: 18.8M
        CPU: 1.491s
     CGroup: /system.slice/system-syncthing.slice/[email protected]
             ├─59585 /usr/bin/syncthing serve --no-browser --no-restart --logflags=0
             └─59592 /usr/bin/syncthing serve --no-browser --no-restart --logflags=0

Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] INFO: GUI and API listening on 127.0.0.1:8384
Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] INFO: TCP listener ([::]:22000) starting
Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] INFO: Completed initial scan of sendreceive folder "Default Folder" (default)
Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] INFO: QUIC listener ([::]:22000) starting
Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] INFO: My name is "ubuntu22"
Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] WARNING: Syncthing should not run as a privileged or system user. Please consider using a normal user account.
Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] INFO: quic://0.0.0.0:22000 detected NAT type: Not behind a NAT
Feb 09 09:54:40 ubuntu22 syncthing[59585]: [T65LQ] INFO: quic://0.0.0.0:22000 resolved external address quic://69.28.88.125:22000 (via stun.syncthing.net:3478)

Step 4 – Configure Syncthing

By default, Syncthing listens on localhost. To access Syncthing from the outside world, you will need to configure It to listen on your server IP.

Edit the Syncthing configuration file.

nano /root/.local/state/syncthing/config.xml

Find the following line:

        <address>127.0.0.1:8384</address>

Replace it with the following line:

        <address>your-server-ip:8384</address>

Save and close the file, then restart the Syncthing service:

systemctl restart [email protected]

Step 5 – Access Syncthing Web UI

Now, open your web browser and access the Syncthing web interface using the URL http://your-server-ip:8384. You will see the Syncthing dashboard on the following screen.

You can now follow the same steps to install Syncthing on another server and share files and folders between both servers.

Conclusion

In this guide, we’ve covered the steps to install Syncthing, configure its settings, and access its web interface for managing file synchronization across your devices. With Syncthing, you can synchronize files seamlessly, collaborate with others, and access your data from anywhere without relying on third-party cloud services or compromising the security of your files. You can try deploying Syncthing on dedicated server hosting from Atlantic.Net!