1SYNCTHING(1)                       Syncthing                      SYNCTHING(1)
2
3
4

NAME

6       syncthing - Syncthing
7

SYNOPSIS

9          syncthing [-audit] [-auditfile=<file|-|-->] [-browser-only] [device-id]
10                    [-generate=<dir>] [-gui-address=<address>] [-gui-apikey=<key>]
11                    [-home=<dir> | -config=<dir> -data=<dir>]
12                    [-logfile=<filename>] [-logflags=<flags>]
13                    [-no-browser] [-no-console] [-no-restart] [-paths] [-paused]
14                    [-reset-database] [-reset-deltas] [-unpaused] [-upgrade]
15                    [-upgrade-check] [-upgrade-to=<url>] [-verbose] [-version]
16

DESCRIPTION

18       Syncthing lets you synchronize your files bidirectionally across multi‐
19       ple devices. This means the creation, modification or deletion of files
20       on  one machine will automatically be replicated to your other devices.
21       We believe your data is your data alone and you deserve to choose where
22       it  is  stored.  Therefore  Syncthing  does not upload your data to the
23       cloud but exchanges your data across your machines as soon as they  are
24       online at the same time.
25

OPTIONS

27       -audit Write events to timestamped file audit-YYYYMMDD-HHMMSS.log.
28
29       -auditfile=<file|-|-->
30              Use  specified  file or stream ("-" for stdout, "--" for stderr)
31              for audit events, rather than the timestamped default file name.
32
33       -browser-only
34              Open the web UI in a browser for an  already  running  Syncthing
35              instance.
36
37       -device-id
38              Print device ID to command line.
39
40       -generate=<dir>
41              Generate key and config in specified dir, then exit.
42
43       -gui-address=<address>
44              Override   GUI   listen   address.   Set   this  to  an  address
45              (0.0.0.0:8384) or file path (/var/run/st.sock,  for  UNIX  sock‐
46              ets).
47
48       -home=<dir>
49              Set common configuration and data directory. The default config‐
50              uration  directory   is   $HOME/.config/syncthing   (Unix-like),
51              $HOME/Library/Application Support/Syncthing (Mac) and %LOCALAPP‐
52              DATA%\Syncthing (Windows).
53
54       -config=<dir>
55              Set configuration directory. Alternative to -home  and  must  be
56              used together with -data.
57
58       -data=<dir>
59              Set  data  (e.g.  database)  directory. Alternative to -home and
60              must be used together with -config.
61
62       -logfile=<filename>
63              Set destination filename for logging (use "-" for stdout,  which
64              is the default option).
65
66       -logflags=<flags>
67              Select  information in log line prefix. The -logflags value is a
68              sum of the following:
69
70              • 1: Date
71
72              • 2: Time
73
74              • 4: Microsecond time
75
76              • 8: Long filename
77
78              • 16: Short filename
79
80              To prefix each log line with date and time, set -logflags=3 (1 +
81              2  from above). The value 0 is used to disable all of the above.
82              The default is to show time only (2).
83
84       -no-browser
85              Do not start a browser.
86
87       -no-console
88              Hide the console window. (On Windows only)
89
90       -no-restart
91              Do not restart Syncthing when it exits. The monitor process will
92              still  run to handle crashes and writing to logfiles (if config‐
93              ured to).
94
95       -paths Print the paths used  for  configuration,  keys,  database,  GUI
96              overrides, default sync folder and the log file.
97
98       -paused
99              Start with all devices and folders paused.
100
101       -reset-database
102              Reset  the  database,  forcing  a full rescan and resync. Create
103              .stfolder folders in each sync folder if they do not already ex‐
104              ist. Caution: Ensure that all sync folders which are mountpoints
105              are already mounted.  Inconsistent versions may  result  if  the
106              mountpoint is later mounted and contains older versions.
107
108       -reset-deltas
109              Reset delta index IDs, forcing a full index exchange.
110
111       -unpaused
112              Start with all devices and folders unpaused.
113
114       -upgrade
115              Perform upgrade.
116
117       -upgrade-check
118              Check for available upgrade.
119
120       -upgrade-to=<url>
121              Force upgrade directly from specified URL.
122
123       -verbose
124              Print verbose log output.
125
126       -version
127              Show version.
128

EXIT CODES

130       0      Success / Shutdown
131
132       1      Error
133
134       2      Upgrade not available
135
136       3      Restarting
137
138       4      Upgrading
139
140       Exit codes over 125 are usually returned by the shell/binary loader/de‐
141       fault signal handler. Exit codes over 128+N on Unix  usually  represent
142       the  signal  which  caused  the  process  to exit. For example, 128 + 9
143       (SIGKILL) = 137.
144

PROXIES

146       Syncthing can use a SOCKS, HTTP, or HTTPS proxy to talk to the  outside
147       world. The proxy is used for outgoing connections only - it is not pos‐
148       sible to accept incoming connections through the proxy.  The  proxy  is
149       configured  through the environment variable all_proxy. Somewhat unusu‐
150       ally,  this  variable  must  be  named  in  lower  case  -  it  is  not
151       “ALL_PROXY”. For example:
152
153          $ export all_proxy=socks://192.0.2.42:8081
154

DEVELOPMENT SETTINGS

156       The following environment variables modify Syncthing’s behavior in ways
157       that are mostly useful for developers. Use with  care.   If  you  start
158       Syncthing from within service managers like systemd or supervisor, path
159       expansion may not be supported.
160
161       STTRACE
162              Used to increase the debugging verbosity in specific or all  fa‐
163              cilities,  generally  mapping  to  a Go package. Enabling any of
164              these also enables microsecond timestamps, file names plus  line
165              numbers.  Enter a comma-separated string of facilities to trace.
166              syncthing -help always outputs an up-to-date list. The valid fa‐
167              cility strings are:
168
169              Main and operational facilities:
170
171                     config Configuration loading and saving.
172
173                     db     The database layer.
174
175                     main   Main package.
176
177                     model  The  root  hub;  the  largest chunk of the system.
178                            File pulling, index transmission and requests  for
179                            chunks.
180
181                     scanner
182                            File change detection and hashing.
183
184                     versioner
185                            File versioning.
186
187              Networking facilities:
188
189                     beacon Multicast and broadcast UDP discovery packets: Se‐
190                            lected interfaces and addresses.
191
192                     connections
193                            Connection handling.
194
195                     dialer Dialing connections.
196
197                     discover
198                            Remote device discovery requests, replies and reg‐
199                            istration of devices.
200
201                     nat    NAT discovery and port mapping.
202
203                     pmp    NAT-PMP discovery and port mapping.
204
205                     protocol
206                            The BEP protocol.
207
208                     relay  Relay interaction (strelaysrv).
209
210                     upnp   UPnP discovery and port mapping.
211
212              Other facilities:
213
214                     fs     Filesystem access.
215
216                     events Event generation and logging.
217
218                     http   REST API.
219
220                     sha256 SHA256  hashing  package  (this facility currently
221                            unused).
222
223                     stats  Persistent device and folder statistics.
224
225                     sync   Mutexes. Used for debugging  race  conditions  and
226                            deadlocks.
227
228                     upgrade
229                            Binary upgrades.
230
231                     walkfs Filesystem access while walking.
232
233                     all    All of the above.
234
235       STBLOCKPROFILE
236              Write  block  profiles  to  block-$pid-$timestamp.pprof every 20
237              seconds.
238
239       STCPUPROFILE
240              Write a CPU profile to cpu-$pid.pprof on exit.
241
242       STDEADLOCKTIMEOUT
243              Used for debugging internal deadlocks; sets  debug  sensitivity.
244              Use only under direction of a developer.
245
246       STDEADLOCKTHRESHOLD
247              Used  for  debugging internal deadlocks; sets debug sensitivity.
248              Use only under direction of a developer.
249
250       STGUIASSETS
251              Directory to load GUI assets from. Overrides compiled in assets.
252              Useful  for  developing  webgui,  commonly  use  STGUIASSETS=gui
253              bin/syncthing.
254
255       STHASHING
256              Specify which hashing package  to  use.  Defaults  to  automatic
257              based  on performance. Specify “minio” (compatibility) or “stan‐
258              dard” for the default Go implementation.
259
260       STHEAPPROFILE
261              Write heap profiles to heap-$pid-$timestamp.pprof each time heap
262              usage increases.
263
264       STNODEFAULTFOLDER
265              Don’t  create a default folder when starting for the first time.
266              This variable will be ignored anytime after the first run.
267
268       STNORESTART
269              Equivalent to the -no-restart flag
270
271       STNOUPGRADE
272              Disable automatic upgrades.
273
274       STPROFILER
275              Set to a listen address such as “127.0.0.1:9090”  to  start  the
276              profiler  with  HTTP  access,  which  then  can  be  reached  at
277              http://localhost:9090/debug/pprof. See go tool  pprof  for  more
278              information.
279
280       STPERFSTATS
281              Write  running performance statistics to perf-$pid.csv. Not sup‐
282              ported on Windows.
283
284       STRECHECKDBEVERY
285              Time before folder statistics (file, dir, … counts) are recalcu‐
286              lated from scratch. The given duration must be parseable by Go’s
287              time.ParseDuration. If missing or  not  parseable,  the  default
288              value  of  1  month  is  used.  To  force recalculation on every
289              startup, set it to 1s.
290
291       GOMAXPROCS
292              Set the maximum number of CPU cores  to  use.  Defaults  to  all
293              available CPU cores.
294
295       GOGC   Percentage  of  heap  growth  at which to trigger GC. Default is
296              100. Lower numbers keep peak memory usage down, at the price  of
297              CPU usage (i.e. performance).
298

SEE ALSO

300       syncthing-config(5),   syncthing-stignore(5),  syncthing-device-ids(7),
301       syncthing-security(7),   syncthing-networking(7),    syncthing-version‐
302       ing(7), syncthing-faq(7)
303

AUTHOR

305       The Syncthing Authors
306
308       2014-2019, The Syncthing Authors
309
310
311
312
313v1                               Apr 15, 2021                     SYNCTHING(1)
Impressum