syncthing.1 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING" "1" "Feb 05, 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 is an application that lets you synchronize your files 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, default 2. The \fB\-logflags\fP value is
  103. a sum of 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.
  150. Create \fI\&.stfolder\fP folders in each sync folder if they do not already exist.
  151. \fBCaution\fP: Ensure that all sync folders which are mountpoints are already mounted. Inconsistent versions may result if the mountpoint is later mounted and contains older versions.
  152. .UNINDENT
  153. .INDENT 0.0
  154. .TP
  155. .B \-reset\-deltas
  156. Reset delta index IDs, forcing a full index exchange.
  157. .UNINDENT
  158. .INDENT 0.0
  159. .TP
  160. .B \-unpaused
  161. Start with all devices and folders unpaused.
  162. .UNINDENT
  163. .INDENT 0.0
  164. .TP
  165. .B \-upgrade
  166. Perform upgrade.
  167. .UNINDENT
  168. .INDENT 0.0
  169. .TP
  170. .B \-upgrade\-check
  171. Check for available upgrade.
  172. .UNINDENT
  173. .INDENT 0.0
  174. .TP
  175. .B \-upgrade\-to=<url>
  176. Force upgrade directly from specified URL.
  177. .UNINDENT
  178. .INDENT 0.0
  179. .TP
  180. .B \-verbose
  181. Print verbose log output.
  182. .UNINDENT
  183. .INDENT 0.0
  184. .TP
  185. .B \-version
  186. Show version.
  187. .UNINDENT
  188. .SH EXIT CODES
  189. .INDENT 0.0
  190. .TP
  191. .B 0
  192. Success / Shutdown
  193. .TP
  194. .B 1
  195. Error
  196. .TP
  197. .B 2
  198. Upgrade not available
  199. .TP
  200. .B 3
  201. Restarting
  202. .TP
  203. .B 4
  204. Upgrading
  205. .UNINDENT
  206. .sp
  207. Some of these exit codes are only returned when running without a monitor
  208. process (with environment variable \fBSTNORESTART\fP set). Exit codes over 125 are
  209. usually returned by the shell/binary loader/default signal handler. Exit codes
  210. over 128+N on Unix usually represent the signal which caused the process to
  211. exit. For example, \fB128 + 9 (SIGKILL) = 137\fP\&.
  212. .SH PROXIES
  213. .sp
  214. Syncthing can use a SOCKS, HTTP, or HTTPS proxy to talk to the outside
  215. world. The proxy is used for outgoing connections only \- it is not possible
  216. to accept incoming connections through the proxy. The proxy is configured
  217. through the environment variable \fBall_proxy\fP\&. Somewhat unusually, this
  218. variable must be named in lower case \- it is not “ALL_PROXY”. For
  219. example:
  220. .INDENT 0.0
  221. .INDENT 3.5
  222. .sp
  223. .nf
  224. .ft C
  225. $ export all_proxy=socks://192.0.2.42:8081
  226. .ft P
  227. .fi
  228. .UNINDENT
  229. .UNINDENT
  230. .SH DEVELOPMENT SETTINGS
  231. .sp
  232. The following environment variables modify Syncthing’s behavior in ways that
  233. are mostly useful for developers. Use with care.
  234. If you start Syncthing from within service managers like systemd or supervisor,
  235. path expansion may not be supported.
  236. .INDENT 0.0
  237. .TP
  238. .B STNODEFAULTFOLDER
  239. Don’t create a default folder when starting for the first time. This
  240. variable will be ignored anytime after the first run.
  241. .TP
  242. .B STGUIASSETS
  243. Directory to load GUI assets from. Overrides compiled in assets.
  244. .TP
  245. .B STTRACE
  246. Used to increase the debugging verbosity in specific or all facilities, generally mapping to a Go package. Enabling any of these also enables microsecond timestamps, file names plus line numbers. Enter a comma\-separated string of facilities to trace. \fBsyncthing \-help\fP always outputs an up\-to\-date list. The valid facility strings
  247. are:
  248. .INDENT 7.0
  249. .TP
  250. .B Main and operational facilities:
  251. .INDENT 7.0
  252. .TP
  253. .B main
  254. Main package.
  255. .TP
  256. .B model
  257. The root hub; the largest chunk of the system. File pulling, index transmission and requests for chunks.
  258. .TP
  259. .B config
  260. Configuration loading and saving.
  261. .TP
  262. .B db
  263. The database layer.
  264. .TP
  265. .B scanner
  266. File change detection and hashing.
  267. .TP
  268. .B versioner
  269. File versioning.
  270. .UNINDENT
  271. .TP
  272. .B Networking facilities:
  273. .INDENT 7.0
  274. .TP
  275. .B beacon
  276. Multicast and broadcast discovery packets.
  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 devices.
  286. .TP
  287. .B relay
  288. Relay interaction.
  289. .TP
  290. .B protocol
  291. The BEP protocol.
  292. .TP
  293. .B nat
  294. NAT discovery and port mapping.
  295. .TP
  296. .B pmp
  297. NAT\-PMP discovery and port mapping.
  298. .TP
  299. .B upnp
  300. UPnP discovery and port mapping.
  301. .UNINDENT
  302. .TP
  303. .B Other facilities:
  304. .INDENT 7.0
  305. .TP
  306. .B events
  307. Event generation and logging.
  308. .TP
  309. .B http
  310. REST API.
  311. .TP
  312. .B sha256
  313. SHA256 hashing package (this facility currently unused).
  314. .TP
  315. .B stats
  316. Persistent device and folder statistics.
  317. .TP
  318. .B sync
  319. Mutexes. Used for debugging race conditions and deadlocks.
  320. .TP
  321. .B upgrade
  322. Binary upgrades.
  323. .TP
  324. .B all
  325. All of the above.
  326. .UNINDENT
  327. .UNINDENT
  328. .TP
  329. .B STPROFILER
  330. Set to a listen address such as “127.0.0.1:9090” to start the profiler with
  331. HTTP access.
  332. .TP
  333. .B STCPUPROFILE
  334. Write a CPU profile to cpu\-$pid.pprof on exit.
  335. .TP
  336. .B STHEAPPROFILE
  337. Write heap profiles to \fBheap\-$pid\-$timestamp.pprof\fP each time heap usage
  338. increases.
  339. .TP
  340. .B STBLOCKPROFILE
  341. Write block profiles to \fBblock\-$pid\-$timestamp.pprof\fP every 20 seconds.
  342. .TP
  343. .B STPERFSTATS
  344. Write running performance statistics to \fBperf\-$pid.csv\fP\&. Not supported on
  345. Windows.
  346. .TP
  347. .B STDEADLOCK
  348. Used for debugging internal deadlocks. Use only under direction of a
  349. developer.
  350. .TP
  351. .B STDEADLOCKTIMEOUT
  352. Used for debugging internal deadlocks; sets debug sensitivity. Use only
  353. under direction of a developer.
  354. .TP
  355. .B STDEADLOCKTHRESHOLD
  356. Used for debugging internal deadlocks; sets debug sensitivity. Use only
  357. under direction of a developer.
  358. .TP
  359. .B STNORESTART
  360. Equivalent to the \-no\-restart argument. Disable the Syncthing monitor process which handles restarts for some configuration changes, upgrades, crashes and also log file writing (stdout is still written).
  361. .TP
  362. .B STNOUPGRADE
  363. Disable automatic upgrades.
  364. .TP
  365. .B STHASHING
  366. Specify which hashing package to use. Defaults to automatic based on
  367. performance. Specify “minio” (compatibility) or “standard” for the default Go implementation.
  368. .TP
  369. .B GOMAXPROCS
  370. Set the maximum number of CPU cores to use. Defaults to all available CPU
  371. cores.
  372. .TP
  373. .B GOGC
  374. Percentage of heap growth at which to trigger GC. Default is 100. Lower
  375. numbers keep peak memory usage down, at the price of CPU usage
  376. (i.e. performance).
  377. .UNINDENT
  378. .SH SEE ALSO
  379. .sp
  380. \fBsyncthing\-config(5)\fP, \fBsyncthing\-stignore(5)\fP,
  381. \fBsyncthing\-device\-ids(7)\fP, \fBsyncthing\-security(7)\fP,
  382. \fBsyncthing\-networking(7)\fP, \fBsyncthing\-versioning(7)\fP,
  383. \fBsyncthing\-faq(7)\fP
  384. .SH AUTHOR
  385. The Syncthing Authors
  386. .SH COPYRIGHT
  387. 2014-2018, The Syncthing Authors
  388. .\" Generated by docutils manpage writer.
  389. .