【精选】linux间文件实时同步(syncthing) ---带历史版本“后悔药”_syncthing linux_井底蛙-jdw的博客-CSDN博客https://blog.csdn.net/qq_41355314/article/details/116694273
wget https://gh-proxy.com/https://github.com/syncthing/syncthing/releases/download/v1.26.1/syncthing-linux-amd64-v1.26.1.tar.gz --no-check-certificate
tar -xzvf syncthing-linux-amd64-v1.26.1.tar.gz
mv syncthing-linux-amd64-v1.26.1 syncthing
cp syncthing /usr/local
./syncthing 或者
nohup syncthing &> /dev/null &
默认只能: localhost: 8384 访问,如果想公网。
配置文件地址:
/root/.config/syncthing/
vi /root/.config/syncthing/config.xml
开机自启动:
vi /etc/systemd/system/syncthing.service
[Unit]
Description=Syncthing File Synchronization Service
After=network.target
[Service]
User=root
ExecStart=/usr/local/syncthing/syncthing serve --no-browser --no-restart --logflags=0
Restart=on-failure
RestartSec=10
StartLimitInterval=300
StartLimitBurst=3
[Install]
WantedBy=default.target
sudo systemctl daemon-reload
sudo systemctl enable syncthing.service
sudo systemctl start syncthing.service
sudo systemctl status syncthing.service
sudo chmod +x /usr/local/syncthing/syncthing
sudo chmod 644 /etc/systemd/system/syncthing.service