您当前的位置:首页 > 计算机 > 服务器 > 网络服务

自建syncthing文件同步服务发现服务器和中继服务器

时间:04-19来源:作者:点击数:
CDSY,CDSY.XYZ

syncthing是比较好用的异地文件同步工具,默认使用全球发现服务器。如果已经实现了异地组网,可以自建发现服务器和中继服务器:

services:
  # 自建syncthing的发现服务器 syncthing-discovery-server
  syncthing_discovery_server:
    image: syncthing/discosrv
    container_name: syncthing-discovery-server
    command: --debug --listen=":8443" --db-dir="."
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - ./discosrv:/var/stdiscosrv
    ports:
      - 8443:8443 # Listen address (default “:8443”)
    restart: always

  # 自建syncthing的中继服务器 syncthing-relay-server
  syncthing_relay_server:
    image: syncthing/relaysrv:latest
    container_name: syncthing-relay-server
    command: -debug -pools="" -listen=":22067"
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - ./relaysrv:/var/strelaysrv
    ports:
      - 22067:22067 # 中继服务器的数据连接端口(必须开启)
      #- 22070:22070  # 用于公用的中继服务器池,显示数据传输、客户端数量等状态,可不开启
    restart: always

 

CDSY,CDSY.XYZ
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门
本栏推荐