📜  syncthing ubuntu install - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:35:13.626000             🧑  作者: Mango

Syncthing Ubuntu Install - Shell/Bash

Syncthing is a cross-platform and open-source peer-to-peer file synchronization software that can synchronize files between devices without the need for a centralized server. In this guide, we will be discussing how to install Syncthing on Ubuntu using the Shell/Bash terminal.

Prerequisites

Before we start with the installation, please ensure that your Ubuntu system has the following components installed:

  • Bash shell
  • Root privileges
Installation Steps
  1. Firstly, we need to add the Syncthing PPA (Personal Package Archive) to our Ubuntu system by using the following command:
sudo add-apt-repository ppa:syncthing/stable
  1. Now, let's update our system to fetch the latest version of Syncthing:
sudo apt-get update
  1. Once the update completes, we can begin the installation process by running the following command:
sudo apt-get install syncthing
  1. After the installation is completed, we can start the Syncthing service using the below command:
syncthing
  1. Once the service is started, you can access Syncthing by visiting http://localhost:8384/ from your web browser.
Configuration Steps
  1. After the installation, we need to configure Syncthing by creating a configuration file. Let's create the configuration file using the following command:
mkdir -p ~/.config/syncthing
touch ~/.config/syncthing/config.xml
  1. Next, we need to configure Syncthing by editing the configuration file:
nano ~/.config/syncthing/config.xml
  1. Once the configuration file is open, let's add the necessary configuration details and save the file:
<configuration version="26">
 <gui enabled="true" tls="false">
   <address>127.0.0.1:8384</address>
   <apikey></apikey>
 </gui>
  
 <options>
   <listenAddress>:22000</listenAddress>
 </options>
 <devices>
   <device id="device-id" name="device-name">
     <address>dynamic</address>
   </device>
 </devices>
 <folders>
   <folder id="folder-id" label="folder-label" path="/path/to/folder">
     <device id="device-id" introducedBy=""></device>
   </folder>
 </folders>
</configuration>
  1. Replace the device-id, device-name, folder-id, folder-label, and /path/to/folder with your own details.

  2. After the configuration is saved, we can restart Syncthing by using the following command:

syncthing -restart

Congratulations! You have successfully installed and configured Syncthing on your Ubuntu system. You can now synchronize your files between devices using Syncthing.