syncthing.1 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING" "1" "Sep 17, 2018" "v0.14" "Syncthing"
  4. .SH NAME
  5. syncthing \- Syncthing
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH SYNOPSIS
  34. .INDENT 0.0
  35. .INDENT 3.5
  36. .sp
  37. .nf
  38. .ft C
  39. syncthing [\-audit] [\-auditfile=<file|\-|\-\->] [\-browser\-only] [device\-id]
  40. [\-generate=<dir>] [\-gui\-address=<address>] [\-gui\-apikey=<key>]
  41. [\-home=<dir>] [\-logfile=<filename>] [\-logflags=<flags>]
  42. [\-no\-browser] [\-no\-console] [\-no\-restart] [\-paths] [\-paused]
  43. [\-reset\-database] [\-reset\-deltas] [\-unpaused] [\-upgrade]
  44. [\-upgrade\-check] [\-upgrade\-to=<url>] [\-verbose] [\-version]
  45. .ft P
  46. .fi
  47. .UNINDENT
  48. .UNINDENT
  49. .SH DESCRIPTION
  50. .sp
  51. Syncthing lets you synchronize your files bidirectionally across multiple
  52. devices. This means the creation, modification or deletion of files on one
  53. machine will automatically be replicated to your other devices. We believe your
  54. data is your data alone and you deserve to choose where it is stored. Therefore
  55. Syncthing does not upload your data to the cloud but exchanges your data across
  56. your machines as soon as they are online at the same time.
  57. .SH OPTIONS
  58. .INDENT 0.0
  59. .TP
  60. .B \-audit
  61. Write events to timestamped file \fBaudit\-YYYYMMDD\-HHMMSS.log\fP\&.
  62. .UNINDENT
  63. .INDENT 0.0
  64. .TP
  65. .B \-auditfile=<file|\-|\-\->
  66. Use specified file or stream (\fB"\-"\fP for stdout, \fB"\-\-"\fP for stderr) for audit events, rather than the timestamped default file name.
  67. .UNINDENT
  68. .INDENT 0.0
  69. .TP
  70. .B \-browser\-only
  71. Open the web UI in a browser for an already running Syncthing instance.
  72. .UNINDENT
  73. .INDENT 0.0
  74. .TP
  75. .B \-device\-id
  76. Print device ID to command line.
  77. .UNINDENT
  78. .INDENT 0.0
  79. .TP
  80. .B \-generate=<dir>
  81. Generate key and config in specified dir, then exit.
  82. .UNINDENT
  83. .INDENT 0.0
  84. .TP
  85. .B \-gui\-address=<address>
  86. Override GUI listen address.
  87. .UNINDENT
  88. .INDENT 0.0
  89. .TP
  90. .B \-home=<dir>
  91. Set configuration directory. The default configuration directory is
  92. \fB$HOME/.config/syncthing\fP (Unix\-like), \fB$HOME/Library/Application Support/Syncthing\fP (Mac) and \fB%LOCALAPPDATA%\eSyncthing\fP (Windows).
  93. .UNINDENT
  94. .INDENT 0.0
  95. .TP
  96. .B \-logfile=<filename>
  97. Set destination filename for logging (use \fB"\-"\fP for stdout, which is the default option).
  98. .UNINDENT
  99. .INDENT 0.0
  100. .TP
  101. .B \-logflags=<flags>
  102. Select information in log line prefix. The \fB\-logflags\fP value is a sum of
  103. the following:
  104. .INDENT 7.0
  105. .IP \(bu 2
  106. 1: Date
  107. .IP \(bu 2
  108. 2: Time
  109. .IP \(bu 2
  110. 4: Microsecond time
  111. .IP \(bu 2
  112. 8: Long filename
  113. .IP \(bu 2
  114. 16: Short filename
  115. .UNINDENT
  116. .sp
  117. To prefix each log line with date and time, set \fB\-logflags=3\fP (1 + 2 from
  118. above). The value 0 is used to disable all of the above. The default is to
  119. show time only (2).
  120. .UNINDENT
  121. .INDENT 0.0
  122. .TP
  123. .B \-no\-browser
  124. Do not start a browser.
  125. .UNINDENT
  126. .INDENT 0.0
  127. .TP
  128. .B \-no\-console
  129. Hide the console window. (On Windows only)
  130. .UNINDENT
  131. .INDENT 0.0
  132. .TP
  133. .B \-no\-restart
  134. Disable the Syncthing monitor process which handles restarts for some configuration changes, upgrades, crashes and also log file writing (stdout is still written).
  135. .UNINDENT
  136. .INDENT 0.0
  137. .TP
  138. .B \-paths
  139. Print the paths used for configuration, keys, database, GUI overrides, default sync folder and the log file.
  140. .UNINDENT
  141. .INDENT 0.0
  142. .TP
  143. .B \-paused
  144. Start with all devices and folders paused.
  145. .UNINDENT
  146. .INDENT 0.0
  147. .TP
  148. .B \-reset\-database
  149. Reset the database, forcing a full rescan and resync. Create \fI\&.stfolder\fP
  150. folders in each sync folder if they do not already exist. \fBCaution\fP:
  151. Ensure that all sync folders which are mountpoints are already mounted.
  152. Inconsistent versions may result if the mountpoint is later mounted and
  153. contains older versions.
  154. .UNINDENT
  155. .INDENT 0.0
  156. .TP
  157. .B \-reset\-deltas
  158. Reset delta index IDs, forcing a full index exchange.
  159. .UNINDENT
  160. .INDENT 0.0
  161. .TP
  162. .B \-unpaused
  163. Start with all devices and folders unpaused.
  164. .UNINDENT
  165. .INDENT 0.0
  166. .TP
  167. .B \-upgrade
  168. Perform upgrade.
  169. .UNINDENT
  170. .INDENT 0.0
  171. .TP
  172. .B \-upgrade\-check
  173. Check for available upgrade.
  174. .UNINDENT
  175. .INDENT 0.0
  176. .TP
  177. .B \-upgrade\-to=<url>
  178. Force upgrade directly from specified URL.
  179. .UNINDENT
  180. .INDENT 0.0
  181. .TP
  182. .B \-verbose
  183. Print verbose log output.
  184. .UNINDENT
  185. .INDENT 0.0
  186. .TP
  187. .B \-version
  188. Show version.
  189. .UNINDENT
  190. .SH EXIT CODES
  191. .INDENT 0.0
  192. .TP
  193. .B 0
  194. Success / Shutdown
  195. .TP
  196. .B 1
  197. Error
  198. .TP
  199. .B 2
  200. Upgrade not available
  201. .TP
  202. .B 3
  203. Restarting
  204. .TP
  205. .B 4
  206. Upgrading
  207. .UNINDENT
  208. .sp
  209. Some of these exit codes are only returned when running without a monitor
  210. process (with environment variable \fBSTNORESTART\fP set). Exit codes over 125 are
  211. usually returned by the shell/binary loader/default signal handler. Exit codes
  212. over 128+N on Unix usually represent the signal which caused the process to
  213. exit. For example, \fB128 + 9 (SIGKILL) = 137\fP\&.
  214. .SH PROXIES
  215. .sp
  216. Syncthing can use a SOCKS, HTTP, or HTTPS proxy to talk to the outside
  217. world. The proxy is used for outgoing connections only \- it is not possible
  218. to accept incoming connections through the proxy. The proxy is configured
  219. through the environment variable \fBall_proxy\fP\&. Somewhat unusually, this
  220. variable must be named in lower case \- it is not “ALL_PROXY”. For
  221. example:
  222. .INDENT 0.0
  223. .INDENT 3.5
  224. .sp
  225. .nf
  226. .ft C
  227. $ export all_proxy=socks://192.0.2.42:8081
  228. .ft P
  229. .fi
  230. .UNINDENT
  231. .UNINDENT
  232. .SH DEVELOPMENT SETTINGS
  233. .sp
  234. The following environment variables modify Syncthing’s behavior in ways that
  235. are mostly useful for developers. Use with care.
  236. If you start Syncthing from within service managers like systemd or supervisor,
  237. path expansion may not be supported.
  238. .INDENT 0.0
  239. .TP
  240. .B STTRACE
  241. Used to increase the debugging verbosity in specific or all facilities,
  242. generally mapping to a Go package. Enabling any of these also enables
  243. microsecond timestamps, file names plus line numbers. Enter a
  244. comma\-separated string of facilities to trace. \fBsyncthing \-help\fP always
  245. outputs an up\-to\-date list. The valid facility strings are:
  246. .INDENT 7.0
  247. .TP
  248. .B Main and operational facilities:
  249. .INDENT 7.0
  250. .TP
  251. .B config
  252. Configuration loading and saving.
  253. .TP
  254. .B db
  255. The database layer.
  256. .TP
  257. .B main
  258. Main package.
  259. .TP
  260. .B model
  261. The root hub; the largest chunk of the system. File pulling, index
  262. transmission and requests for chunks.
  263. .TP
  264. .B scanner
  265. File change detection and hashing.
  266. .TP
  267. .B versioner
  268. File versioning.
  269. .UNINDENT
  270. .TP
  271. .B Networking facilities:
  272. .INDENT 7.0
  273. .TP
  274. .B beacon
  275. Multicast and broadcast UDP discovery packets: Selected interfaces
  276. and addresses.
  277. .TP
  278. .B connections
  279. Connection handling.
  280. .TP
  281. .B dialer
  282. Dialing connections.
  283. .TP
  284. .B discover
  285. Remote device discovery requests, replies and registration of
  286. devices.
  287. .TP
  288. .B nat
  289. NAT discovery and port mapping.
  290. .TP
  291. .B pmp
  292. NAT\-PMP discovery and port mapping.
  293. .TP
  294. .B protocol
  295. The BEP protocol.
  296. .TP
  297. .B relay
  298. Relay interaction (\fBstrelaysrv\fP).
  299. .TP
  300. .B upnp
  301. UPnP discovery and port mapping.
  302. .UNINDENT
  303. .TP
  304. .B Other facilities:
  305. .INDENT 7.0
  306. .TP
  307. .B fs
  308. Filesystem access.
  309. .TP
  310. .B events
  311. Event generation and logging.
  312. .TP
  313. .B http
  314. REST API.
  315. .TP
  316. .B sha256
  317. SHA256 hashing package (this facility currently unused).
  318. .TP
  319. .B stats
  320. Persistent device and folder statistics.
  321. .TP
  322. .B sync
  323. Mutexes. Used for debugging race conditions and deadlocks.
  324. .TP
  325. .B upgrade
  326. Binary upgrades.
  327. .TP
  328. .B walkfs
  329. Filesystem access while walking.
  330. .TP
  331. .B all
  332. All of the above.
  333. .UNINDENT
  334. .UNINDENT
  335. .TP
  336. .B STBLOCKPROFILE
  337. Write block profiles to \fBblock\-$pid\-$timestamp.pprof\fP every 20 seconds.
  338. .TP
  339. .B STCPUPROFILE
  340. Write a CPU profile to \fBcpu\-$pid.pprof\fP on exit.
  341. .TP
  342. .B STDEADLOCKTIMEOUT
  343. Used for debugging internal deadlocks; sets debug sensitivity. Use only
  344. under direction of a developer.
  345. .TP
  346. .B STDEADLOCKTHRESHOLD
  347. Used for debugging internal deadlocks; sets debug sensitivity. Use only
  348. under direction of a developer.
  349. .TP
  350. .B STGUIASSETS
  351. Directory to load GUI assets from. Overrides compiled in assets. Useful for
  352. developing webgui, commonly use \fBSTGUIASSETS=gui bin/syncthing\fP\&.
  353. .TP
  354. .B STHASHING
  355. Specify which hashing package to use. Defaults to automatic based on
  356. performance. Specify “minio” (compatibility) or “standard” for the default
  357. Go implementation.
  358. .TP
  359. .B STHEAPPROFILE
  360. Write heap profiles to \fBheap\-$pid\-$timestamp.pprof\fP each time heap usage
  361. increases.
  362. .TP
  363. .B STNODEFAULTFOLDER
  364. Don’t create a default folder when starting for the first time. This
  365. variable will be ignored anytime after the first run.
  366. .TP
  367. .B STNORESTART
  368. Equivalent to the \fB\-no\-restart\fP flag. Disable the Syncthing monitor
  369. process which handles restarts for some configuration changes, upgrades,
  370. crashes and also log file writing (stdout is still written).
  371. .TP
  372. .B STNOUPGRADE
  373. Disable automatic upgrades.
  374. .TP
  375. .B STPROFILER
  376. Set to a listen address such as “127.0.0.1:9090” to start the profiler with
  377. HTTP access, which then can be reached at
  378. \fI\%http://localhost:9090/debug/pprof\fP\&. See \fBgo tool pprof\fP for more
  379. information.
  380. .TP
  381. .B STPERFSTATS
  382. Write running performance statistics to \fBperf\-$pid.csv\fP\&. Not supported on
  383. Windows.
  384. .TP
  385. .B STRECHECKDBEVERY
  386. Time before folder statistics (file, dir, … counts) are recalculated from
  387. scratch. The given duration must be parseable by GO’s time.ParseDuration. If
  388. missing or not parseable, the default value of 1 month is used. To force
  389. recalculation on every startup, set it to \fB0\fP\&.
  390. .TP
  391. .B GOMAXPROCS
  392. Set the maximum number of CPU cores to use. Defaults to all available CPU
  393. cores.
  394. .TP
  395. .B GOGC
  396. Percentage of heap growth at which to trigger GC. Default is 100. Lower
  397. numbers keep peak memory usage down, at the price of CPU usage
  398. (i.e. performance).
  399. .UNINDENT
  400. .SH SEE ALSO
  401. .sp
  402. \fBsyncthing\-config(5)\fP, \fBsyncthing\-stignore(5)\fP,
  403. \fBsyncthing\-device\-ids(7)\fP, \fBsyncthing\-security(7)\fP,
  404. \fBsyncthing\-networking(7)\fP, \fBsyncthing\-versioning(7)\fP,
  405. \fBsyncthing\-faq(7)\fP
  406. .SH AUTHOR
  407. The Syncthing Authors
  408. .SH COPYRIGHT
  409. 2014-2018, The Syncthing Authors
  410. .\" Generated by docutils manpage writer.
  411. .