用 Syncthing 在设备间私密同步文件
运行 Syncthing,在局域网或互联网上让 Linux 电脑和手机之间的文件夹保持一致——不需要云账号,文件不经过第三方服务器。
运行 syncthing serve,浏览器打开 http://127.0.0.1:8384,通过交换设备 ID 完成设备配对。
01命令
命令
$ syncthing serve --gui-address=127.0.0.1:838402作用说明
Syncthing 是点对点同步服务:两台交换过设备 ID 的机器会互相发现(局域网内直连,否则走中继),持续同步你标记为共享的文件夹。8384 端口的网页界面用来添加文件夹、接受伙伴设备和开启文件版本管理。多数发行版以 systemd 用户服务运行——systemctl --user enable --now syncthing.service 可让它在登录后常驻;传输全程 TLS 加密,数据不会存到任何中心服务器。
03风险
!注意: 在一台设备上删除文件会同步删除所有设备上的副本——想要后悔药请在文件夹设置里启用版本管理;不要把管理界面暴露到 0.0.0.0 且不设密码。
04撤销
撤销
$ systemctl --user stop syncthing.service && systemctl --user disable syncthing.service05来源
- syncthing — Command line documentation依据: Documents syncthing serve, the --gui-address option, and running syncthing as a service.
- Syncthing FAQ — security and how it works依据: Explains that all data is encrypted in TLS transit and shared only with explicitly paired device IDs — no central cloud.
最后验证: 2026-09-18 · 分类: 安全与隐私