Command reference
stcprestapi
Runs the Riversoft® STCP Gemini API from the command line.
stcprestapi [options]| Option | Type | Description |
|---|---|---|
-config | string | Configuration file. If omitted, uses configs/config.json in the executable folder. |
-ns | boolean | Disables TLS (no security), even if ssl is true in config.json. Do not combine with -c/-k. |
-c | string | TLS certificate. Use together with -k. Overrides cert in config.json. |
-k | string | TLS private key. Use together with -c. |
-kp | string | TLS private key password, if any. |
-h | string | Network interface on which the API listens. Overrides host in config.json. |
-p | int | API port. Overrides port in config.json. |
-lite | boolean | Self-serving mode: the API also serves the Portal files. |
-webapp | string | Embedded Portal directory, used with -lite. If omitted, uses portal/app in the executable folder. The webapp_dir parameter in config.json, when set, takes precedence. |
-init-db | boolean | Initializes the structure of the configuration and log databases (tables and triggers). Available for MySQL and MariaDB (type_database = mysql). |
-init-db-file | boolean | Generates the database creation scripts in the scripts_db_init folder, in the current directory, without running them. |
Note
-init-db and -init-db-file are used only during installation or initial configuration, not in normal API execution. Command-line options take precedence over config.json, and config.json takes precedence over the API registration in the database.
Example:
stcprestapi -lite -p 33070 \
-config /usr/local/stcpgemini-api/configs/config.json \
-webapp /usr/local/stcpgemini-api/portal/app \
-c <certificate> -k <private-key>In test environments without TLS, replace -c and -k with -ns.
stcpserver
Runs Riversoft STCP Gemini Server with the instance configuration file.
/usr/local/bin/stcpserver /usr/local/stcp/configs/stcpserver.config.jsonThe options override the equivalent configuration file parameters:
| Option | Description |
|---|---|
-i | Instance name. |
-U | User for daemon mode execution. |
-G | Group for daemon mode execution. |
-D | Application directory. |
-L | Lock control directory. |
-P | PID file. |
-M | Umask value. |
-F | Forces daemon mode execution. |
-C | Sends console messages to syslog. |
-s | Passphrase to encrypt the configuration file passwords. |
-? | Shows the help. |