Install Syncthing 2.x for continuous file synchronisation on Debian or Ubuntu

edafe.de/syncthing

Syncthing is an open source tool that synchronises files continuously across multiple devices. It transfers data between two or more of your computers, without uploading any information to the cloud.

Packages are available for Android, Windows, macOS and Linux (including Synology DSM). In addition, Synctrain enables iOS devices to “securely synchronise files with other devices that have Syncthing installed”.

The usefulness of the Syncthing Project cannot be overstated.

Running the Syncthing stable-v2 channel

These instructions are targeting the latest release of the Syncthing stable channel.

Step 1

Add the necessary release key for validation of downloaded Syncthing packages.

$ sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg

Step 2

Add the Syncthing repository as a new source.

$ echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2" | sudo tee /etc/apt/sources.list.d/syncthing.list

Step 3

Install Syncthing on your local system.

$ sudo -- bash -c 'apt update && apt install --yes syncthing apt-transport-https'

Step 4

Enable Syncthing for the current user.

$ sudo -- bash -c 'systemctl enable syncthing@$USER.service && systemctl start syncthing@$USER.service && systemctl status syncthing@$USER.service'

Step 5

You may want to edit your firewall settings to open ports for incoming and outgoing traffic.

If you are using ufw as a host-based firewall

Configure ufw to allow connections to Syncthing.

$ sudo ufw limit syncthing

If you are using firewalld as a host-based firewall

Configure firewalld to allow connections to Syncthing.

$ sudo -- bash -c 'firewall-cmd --zone=public --add-service=syncthing --permanent && firewall-cmd --reload && firewall-cmd --info-zone=public'

Step 6

Use your browser to access the Syncthing configuration page on your local system by navigating to the following address:

http://localhost:8384

Step 7

Complete your setup by referring to the Syncthing documentation.

Upgrading from the v1 channel

If you have previously installed from apt.syncthing.net and are currently running Syncthing 1.x, upgrading to the stable-v2 channel is straightforward.

Remove the old APT sources configuration file.

$ sudo rm /etc/apt/sources.list.d/syncthing.list

Add the new repository for the stable-v2 channel together with its release key.

$ sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg && echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2" | sudo tee /etc/apt/sources.list.d/syncthing.list

Upgrade to the latest stable version of Syncthing.

$ sudo -- bash -c 'apt update && apt upgrade --yes'

The Syncthing 2.0 release has recently been described as ‘A Giant Leap Forward in Decentralized File Synchronization‘.

Install Cockpit on Debian 13 trixie

edafe.de/cockpit

Cockpit provides an easy-to-use, web-based interface for administering Linux systems. It simplifies tasks such as monitoring logs, controlling system services, configuring networks, and managing virtual machines.

Cockpit has been described as a “useful and extensible tool to observe, manage, and troubleshoot Linux servers“.

Step 1

cockpit requires the use of the firewalld service to be able to make changes to your firewall rules.

If you are using ufw as a host-based firewall

Remove ufw before replacing it with firewalld.

$ sudo apt-get remove --purge --yes ufw

[sudo] password for yourusername:

Install firewalld as a host-based firewall

Install firewalld and maintain ssh access as well as enabling cockpit to receive incoming connections.

$ sudo -- bash -c 'apt-get install --show-progress --yes firewalld && systemctl enable --now firewalld.service && firewall-cmd --zone=public --add-service=ssh --permanent && firewall-cmd --zone=public --add-service=cockpit --permanent && firewall-cmd --reload && firewall-cmd --info-zone=public'

Step 2

Proceed to install cockpit and selected add-on applications.

$ sudo apt-get install --show-progress --yes cockpit cockpit-bridge cockpit-machines cockpit-podman nullmailer ssh tuned-utils

Step 3

If you selected a wireless interface as the primary network interface for use during installation of the Debian system, you may need to re-establish connection to the wireless network after rebooting.

Enable NetworkManager for the primary network interface and reboot your system.

$ sudo sed -i 's/managed=false/managed=true/' /etc/NetworkManager/NetworkManager.conf&&sudo sed -i '/# The primary network interface/,$d' /etc/network/interfaces && sudo reboot

Step 4

Access the Cockpit web console on https://localhost:9090 by entering your username and password.

Step 5

By default, the Cockpit web console listens on port 9090 for connections. If you want to make changes from the default, use the following command to edit /etc/systemd/system/cockpit.socket.d/override.conf.

$ sudo systemctl edit cockpit.socket

The example below changes the web console port from 9090 to 9091 and restricts access to the localhost only.

### Editing /etc/systemd/system/cockpit.socket.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Socket]
ListenStream=
ListenStream=127.0.0.1:9091

### Edits below this comment will be discarded

Use the following command for your changes to take effect.

$ sudo -- bash -c 'systemctl daemon-reload && systemctl restart cockpit.socket && systemctl status cockpit.socket'
Click to copy