1SYNCTHING-LOCALDISCO(7)            Syncthing           SYNCTHING-LOCALDISCO(7)
2
3
4

NAME

6       syncthing-localdisco - Local Discovery Protocol v4
7

MODE OF OPERATION

9       Each participating device periodically sends an Announcement packet. It
10       also keeps a table of the announcements it has seen. There is no way to
11       solicit a reply; the only message type is Announcement.
12
13       On multihomed hosts the announcement packets should be sent on each in‐
14       terface on which Syncthing will accept connections.
15
16       The announcement packet is sent over UDP.
17
18       For IPv4, the Announcement packet is broadcast either to the  link-spe‐
19       cific broadcast address, or to the generic link-local broadcast address
20       255.255.255.255, with destination port 21027.
21
22       For IPv6,  the  Announcement  packet  is  multicast  to  the  transient
23       link-local multicast address ff12::8384, with destination port 21027.
24
25       It  is recommended that local discovery Announcement packets be sent on
26       a 30 to 60 second interval, possibly with immediate transmissions  when
27       a  previously  unknown  device  is discovered or a device has restarted
28       (see the instance_id field).
29

DEVICE ID

31       The device ID is the SHA-256 (32 bytes) of the  device  X.509  certifi‐
32       cate. See device-ids in the Syncthing documentation.
33

ANNOUNCEMENT PACKET

35       The Announcement packet has the following structure:
36
37           0                   1                   2                   3
38           0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
39          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
40          |                             Magic                             |
41          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42          /                                                               /
43          \                       Announce Message                        \
44          /                                                               /
45          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
46
47       There  is no explicit length field as the length is given by the length
48       of the discovery announcement packet itself.
49
50       The Magic field is a 32 bit word  representing  0x2EA7D90B  in  network
51       (big  endian) byte order. It identifies the packet as being a Syncthing
52       discovery protocol packet.
53
54       The Announce Message contents are in protocol buffer format  using  the
55       following schema:
56
57          message Announce {
58              bytes           id          = 1;
59              repeated string addresses   = 2;
60              int64           instance_id = 3;
61          }
62
63       The id field contains the Device ID of the sending device.
64
65       The  addresses  field contains a list of addresses where the device can
66       be contacted. Direct connections will typically have the tcp:// scheme.
67       Relay connections will typically use the relay:// scheme.
68
69       When   interpreting   addresses  with  an  unspecified  address,  e.g.,
70       tcp://0.0.0.0:22000 or tcp://:42424, the source address of the  discov‐
71       ery announcement is to be used.
72
73       The  instance_id  field  is  set  to  a randomly generated ID at client
74       startup. Other devices on the network can detect a change  in  instance
75       ID  between  two  announces and conclude that the announcing device has
76       restarted.
77

AUTHOR

79       The Syncthing Authors
80
82       2014-2019, The Syncthing Authors
83
84
85
86
87v1                               Oct 17, 2021          SYNCTHING-LOCALDISCO(7)
Impressum