@@ -17,6 +17,8 @@ Synopsis
17
17
[--gui-address=<address>] [--gui-apikey=<key>]
18
18
[--log-level=<level>] [--log-file=<filename>]
19
19
[--log-max-old-files=<num>] [--log-max-size=<num>]
20
+ [--log-format-timestamp=<format>] [--no-log-format-level-string]
21
+ [--log-format-level-syslog]
20
22
[--no-browser] [--no-console]
21
23
[--no-port-probing] [--no-restart] [--no-upgrade]
22
24
[--paused] [--unpaused]
@@ -86,20 +88,20 @@ few log messages.
86
88
Common options
87
89
--------------
88
90
89
- .. cmdoption :: --home=<dir>, -H <dir>
91
+ .. cmdoption :: --home=<dir>, -H <dir> ($STHOMEDIR)
90
92
91
93
Set common configuration and data directory. The default configuration
92
94
directory is ``$XDG_STATE_HOME/syncthing `` or
93
95
``$HOME/.local/state/syncthing `` (Unix-like),
94
96
``$HOME/Library/Application Support/Syncthing `` (Mac) and
95
97
``%LOCALAPPDATA%\Syncthing `` (Windows).
96
98
97
- .. cmdoption :: --config=<dir>, -C <dir>
99
+ .. cmdoption :: --config=<dir>, -C <dir> ($STCONFDIR)
98
100
99
101
Set configuration directory. Alternative to ``--home `` and must be used
100
102
together with ``--data ``.
101
103
102
- .. cmdoption :: --data=<dir>, -D <dir>
104
+ .. cmdoption :: --data=<dir>, -D <dir> ($STDATADIR)
103
105
104
106
Set data (e.g. database) directory. Alternative to ``--home `` and must be used
105
107
together with ``--config ``.
@@ -112,31 +114,33 @@ Common options
112
114
Serve options
113
115
-------------
114
116
115
- .. cmdoption :: --allow-newer-config
117
+ .. cmdoption :: --allow-newer-config ($STALLOWNEWERCONFIG)
116
118
117
119
Try loading a config file written by a newer program version, instead of
118
120
failing immediately.
119
121
120
- .. cmdoption :: --audit
122
+ .. cmdoption :: --audit ($STAUDIT)
121
123
122
124
Write events to timestamped file ``audit-YYYYMMDD-HHMMSS.log ``.
123
125
124
- .. cmdoption :: --auditfile=<file|-|-->
126
+ .. cmdoption :: --auditfile=<file|-|--> ($STAUDITFILE)
125
127
126
128
Use specified file or stream (``"-" `` for stdout, ``"--" `` for stderr) for
127
129
audit events, rather than the timestamped default file name.
128
130
129
- .. cmdoption :: --db-maintenance-interval=<interval>
131
+ .. cmdoption :: --db-maintenance-interval=<interval> ($STDBMAINTENANCEINTERVAL)
130
132
131
133
Database maintenance interval -- internal database maintenance routines
132
- run this often.
134
+ run this often. The format is that of a Go duration string (see
135
+ https://pkg.go.dev/time#ParseDuration).
133
136
134
- .. cmdoption :: --db-delete-retention-interval=<interval>
137
+ .. cmdoption :: --db-delete-retention-interval=<interval> ($STDBDELETERETENTIONINTERVAL)
135
138
136
139
Database deleted item retention interval -- deleted items are forgotten
137
- from the database after this interval.
140
+ from the database after this interval. The format is that of a Go duration
141
+ string (see https://pkg.go.dev/time#ParseDuration).
138
142
139
- .. cmdoption :: --gui-address=<address>
143
+ .. cmdoption :: --gui-address=<address> ($STGUIADDRESS)
140
144
141
145
Override GUI listen address. Set this to an address (``0.0.0.0:8384 ``)
142
146
or a URL (``http://0.0.0.0:8384 ``). Supported schemes are ``http `` for
@@ -145,67 +149,76 @@ Serve options
145
149
``unix:///run/syncthing/syncthing.socket `` (notice the three slashes: two
146
150
as part of the URL structure, one to specify an absolute path).
147
151
148
- .. cmdoption :: --gui-apikey=<string>
152
+ .. cmdoption :: --gui-apikey=<string> ($STGUIAPIKEY)
149
153
150
154
Override the API key needed to access the GUI / REST API.
151
155
152
- .. cmdoption :: --log-level=<level>
153
-
154
- Set the log level for all packages. Valid levels are DEBUG, INFO, WARN,
155
- and ERROR.
156
-
157
- .. cmdoption :: --log-file=<filename>
156
+ .. cmdoption :: --log-file=<filename> ($STLOGFILE)
158
157
159
158
Set destination filename for logging (use ``"-" `` for stdout, which is the
160
159
default option).
161
160
162
- .. cmdoption :: --log-max-old-files=<num>
161
+ .. cmdoption :: --log-level=<level> ($STLOGLEVEL)
162
+
163
+ Set the log level for all packages. Valid levels are DEBUG, INFO, WARN,
164
+ and ERROR.
165
+
166
+ .. cmdoption :: --log-max-old-files=<num> ($STLOGMAXOLDFILES)
163
167
164
168
Number of old files to keep (zero to keep only current). Applies only when
165
169
log rotation is enabled through ``--log-max-size ``.
166
170
167
- .. cmdoption :: --log-max-size=<num>
171
+ .. cmdoption :: --log-max-size=<num> ($STLOGMAXSIZE)
168
172
169
- Maximum size of any log file (zero to disable log rotation).
173
+ Maximum size in bytes of any log file (zero to disable log rotation).
170
174
171
- .. cmdoption :: --no-browser
175
+ .. cmdoption :: --log-format-timestamp=<format> ($STLOGFORMATTIMESTAMP)
176
+
177
+ Format for timestamp, set to empty to disable timestamps. The format is that
178
+ of the Go time formatter (see https://pkg.go.dev/time#Layout).
179
+
180
+ .. cmdoption :: --[no-]log-format-level-string ($STLOGFORMATLEVELSTRING)
181
+
182
+ Whether to include level string (e.g. "INF") in log line.
183
+
184
+ .. cmdoption :: --[no-]log-format-level-syslog ($STLOGFORMATLEVELSYSLOG)
185
+
186
+ Whether to include level as syslog prefix (e.g. "<6>") in log line.
187
+
188
+ .. cmdoption :: --no-browser ($STNOBROWSER)
172
189
173
190
Do not start a browser.
174
191
175
- .. cmdoption :: --no-console
192
+ .. cmdoption :: --no-console ($STNOCONSOLE)
176
193
177
194
Hide the console window. (On Windows only)
178
195
179
- .. cmdoption :: --no-port-probing
196
+ .. cmdoption :: --no-port-probing ($STNOPORTPROBING)
180
197
181
198
Don't try to find unused random ports for the GUI and listen address when
182
199
generating an initial configuration / starting for the first time.
183
200
184
- .. cmdoption :: --no-restart
201
+ .. cmdoption :: --no-restart ($STNORESTART)
185
202
186
203
Do not restart Syncthing when it exits. The monitor process will still run
187
204
to handle crashes and writing to logfiles (if configured to).
188
205
189
- .. cmdoption :: --no-upgrade
206
+ .. cmdoption :: --no-upgrade ($STNOUPGRADE)
190
207
191
- Disable automatic upgrades. Equivalent to the ``STNOUPGRADE `` environment
192
- variable, see below.
208
+ Disable automatic upgrades.
193
209
194
- .. cmdoption :: --paused
210
+ .. cmdoption :: --paused ($STPAUSED)
195
211
196
212
Start with all devices and folders paused.
197
213
198
- .. cmdoption :: --unpaused
214
+ .. cmdoption :: --unpaused ($STUNPAUSED)
199
215
200
216
Start with all devices and folders unpaused.
201
217
202
- .. cmdoption :: --upgrade
203
-
204
- Perform upgrade.
205
-
206
- .. cmdoption :: --verbose
218
+ .. cmdoption :: --debug-*
207
219
208
- Print verbose log output.
220
+ Several debug options exist. See ``syncthing serve --help `` for the flags
221
+ that apply to your version.
209
222
210
223
Decrypt options
211
224
---------------
@@ -218,7 +231,7 @@ Decrypt options
218
231
219
232
Don't write decrypted files to disk (but verify plaintext hashes).
220
233
221
- .. cmdoption :: --password=<pw>
234
+ .. cmdoption :: --password=<pw> ($FOLDER_PASSWORD)
222
235
223
236
Folder password for decryption / verification. Can be passed through the
224
237
``FOLDER_PASSWORD `` environment variable instead to avoid recording in a
@@ -284,9 +297,9 @@ caused the process to exit. For example, ``128 + 9 (SIGKILL) = 137``.
284
297
Subcommands
285
298
-----------
286
299
287
- The command line syntax actually supports different modes of operation through
288
- several subcommands, specified as the first argument. If omitted, the default
289
- ``serve `` is assumed.
300
+ The command line syntax supports different modes of operation through
301
+ several subcommands, specified as the first argument. If omitted, the
302
+ default ``serve `` is assumed.
290
303
291
304
The initial setup of a device ID and default configuration can be called
292
305
explicitly with the ``generate `` subcommand. It can also update the configured
0 commit comments