syncthing.1 11 KB

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