📅  最后修改于: 2023-12-03 15:35:13.626000             🧑  作者: Mango
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.
Before we start with the installation, please ensure that your Ubuntu system has the following components installed:
sudo add-apt-repository ppa:syncthing/stable
sudo apt-get update
sudo apt-get install syncthing
syncthing
mkdir -p ~/.config/syncthing
touch ~/.config/syncthing/config.xml
nano ~/.config/syncthing/config.xml
<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>
Replace the device-id, device-name, folder-id, folder-label, and /path/to/folder with your own details.
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.