syncthing.1 10 KB

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