syncthing.1 10 KB

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