- 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