Skip to content

Command reference

stcprestapi

Runs the Riversoft® STCP Gemini API from the command line.

stcprestapi [options]
OptionTypeDescription
-configstringConfiguration file. If omitted, uses configs/config.json in the executable folder.
-nsbooleanDisables TLS (no security), even if ssl is true in config.json. Do not combine with -c/-k.
-cstringTLS certificate. Use together with -k. Overrides cert in config.json.
-kstringTLS private key. Use together with -c.
-kpstringTLS private key password, if any.
-hstringNetwork interface on which the API listens. Overrides host in config.json.
-pintAPI port. Overrides port in config.json.
-litebooleanSelf-serving mode: the API also serves the Portal files.
-webappstringEmbedded 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-dbbooleanInitializes the structure of the configuration and log databases (tables and triggers). Available for MySQL and MariaDB (type_database = mysql).
-init-db-filebooleanGenerates 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.json

The options override the equivalent configuration file parameters:

OptionDescription
-iInstance name.
-UUser for daemon mode execution.
-GGroup for daemon mode execution.
-DApplication directory.
-LLock control directory.
-PPID file.
-MUmask value.
-FForces daemon mode execution.
-CSends console messages to syslog.
-sPassphrase to encrypt the configuration file passwords.
-?Shows the help.