Document cmd args in README

8acacf9e0ff21a7cfb8ef5508364d569c9aacf7f

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +40 -0Ignore whitespace
.github/readme.md+40 -0
@@ -276,6 +276,46 @@ In order to enable viewing your keys by clicking a button in the API block:
2762761. Set the value of `allowKeysExposure` to `true` in `config.yaml` file.
2772772. Restart the SillyTavern server.
278278
279+## Command-line arguments
280+
281+You can pass command-line arguments to SillyTavern server startup to override some settings in `config.yaml`.
282+
283+### Examples
284+
285+```shell
286+node server.js --port 8000 --listen false
287+# or
288+npm run start -- --port 8000 --listen false
289+# or (Windows only)
290+Start.bat --port 8000 --listen false
291+```
292+
293+### Supported arguments
294+
295+| Option | Description | Type | Default |
296+|-------------------------|------------------------------------------------------------------------------------------------------|----------|------------------------------|
297+| `--version` | Show version number | boolean | |
298+| `--enableIPv6` | Enables IPv6. | boolean | false |
299+| `--enableIPv4` | Enables IPv4. | boolean | true |
300+| `--port` | Sets the port under which SillyTavern will run. If not provided falls back to yaml config 'port'. | number | 8000 |
301+| `--dnsPreferIPv6` | Prefers IPv6 for dns. If not provided falls back to yaml config 'preferIPv6'. | boolean | false |
302+| `--autorun` | Automatically launch SillyTavern in the browser. If not provided falls back to yaml config 'autorun'.| boolean | false |
303+| `--autorunHostname` | The autorun hostname, probably best left on 'auto'. | string | null |
304+| `--autorunPortOverride` | Overrides the port for autorun. | string | null |
305+| `--listen` | SillyTavern is listening on all network interfaces. If not provided falls back to yaml config 'listen'.| boolean | false |
306+| `--corsProxy` | Enables CORS proxy. If not provided falls back to yaml config 'enableCorsProxy'. | boolean | false |
307+| `--disableCsrf` | Disables CSRF protection | boolean | null |
308+| `--ssl` | Enables SSL | boolean | false |
309+| `--certPath` | Path to your certificate file. | string | "certs/cert.pem" |
310+| `--keyPath` | Path to your private key file. | string | "certs/privkey.pem" |
311+| `--whitelist` | Enables whitelist mode | boolean | null |
312+| `--dataRoot` | Root directory for data storage | string | null |
313+| `--avoidLocalhost` | Avoids using 'localhost' for autorun in auto mode. | boolean | null |
314+| `--basicAuthMode` | Enables basic authentication | boolean | null |
315+| `--requestProxyEnabled` | Enables a use of proxy for outgoing requests | boolean | null |
316+| `--requestProxyUrl` | Request proxy URL (HTTP or SOCKS protocols) | string | null |
317+| `--requestProxyBypass` | Request proxy bypass list (space separated list of hosts) | array | null |
318+
279319## Remote connections
280320
281321Most often this is for people who want to use SillyTavern on their mobile phones while their PC runs the ST server on the same wifi network.