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>] [-logfile=<filename>] [-logflags=<flags>]
12                    [-no-browser] [-no-console] [-no-restart] [-paths] [-paused]
13                    [-reset-database] [-reset-deltas] [-unpaused] [-upgrade]
14                    [-upgrade-check] [-upgrade-to=<url>] [-verbose] [-version]
15

DESCRIPTION

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

OPTIONS

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

EXIT CODES

121       0      Success / Shutdown
122
123       1      Error
124
125       2      Upgrade not available
126
127       3      Restarting
128
129       4      Upgrading
130
131       Some of these exit codes are only returned when running without a moni‐
132       tor process (with environment variable  STNORESTART  set).  Exit  codes
133       over 125 are usually returned by the shell/binary loader/default signal
134       handler. Exit codes over 128+N on Unix  usually  represent  the  signal
135       which caused the process to exit. For example, 128 + 9 (SIGKILL) = 137.
136

PROXIES

138       Syncthing  can use a SOCKS, HTTP, or HTTPS proxy to talk to the outside
139       world. The proxy is used for outgoing connections only - it is not pos‐
140       sible  to  accept  incoming connections through the proxy. The proxy is
141       configured through the environment variable all_proxy. Somewhat  unusu‐
142       ally,  this  variable  must  be  named  in  lower  case  -  it  is  not
143       “ALL_PROXY”. For example:
144
145          $ export all_proxy=socks://192.0.2.42:8081
146

DEVELOPMENT SETTINGS

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

SEE ALSO

295       syncthing-config(5),   syncthing-stignore(5),  syncthing-device-ids(7),
296       syncthing-security(7),   syncthing-networking(7),    syncthing-version‐
297       ing(7), syncthing-faq(7)
298

AUTHOR

300       The Syncthing Authors
301
303       2014-2019, The Syncthing Authors
304
305
306
307
308v1                               Apr 13, 2019                     SYNCTHING(1)
Impressum