Skip to content

The Sirveo CLI

The binary is typically used to start the server:

Terminal window
sirveo server --config-file /etc/sirveo/config.yaml

For additional commands and utilities, see:

Terminal window
sirveo --help

Some useful commands are further documented below.

version

To check the release version, use one of:

Terminal window
sirveo version
sirveo --version

Which outputs:

version: 0.2.1
commit: 30a9b84
build time: 2024-03-14T01:40:43+02:00
build mode: licensed
database revision: 14

adduser

This command creates additional users. It is useful to recover access if credentials are lost. Since it must interact with the database, it requires a configuration file with at least all the db_* settings configured appropriately.

Example usage:

Terminal window
sirveo adduser --config-file=config/config.json

Details are prompted for interactively:

database connected: localhost:5432
existing users: 1
Enter Username (min 5 chars): recovery_admin
Enter Password (2-255 chars): <hidden>
New user account created
recovery_admin (2534567b-4eea-4595-c4c7-a466362b57e4)

check-license

Use this command to inspect license details, without starting the server.

Example output:

------------------
License is valid
------------------
Validation Message: license is valid
License Key: XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XX
License Issued At: 2024-02-19T20:24:19Z
License Valid From: 2024-02-19T20:24:19Z
License Valid Until: 2024-03-20T20:24:19Z
License Name: Cloud Sandbox License
Instance Limit: 1
Scheme: V1

To provide the input license via text file:

Terminal window
sirveo check-license --random-instance-id --file license.txt

Or via the SIRVEO_LICENSE environment variable:

Terminal window
sirveo check-license --random-instance-id --env

Or via CLI:

Terminal window
sirveo check-license --random-instance-id --license '...license content'

In the above examples, the input license is being validated against a randomly-generated instance ID. Some licenses may require a specific instance ID. If a server has an existing database, its instance ID can be obtained from the database:

select value from server_state where key = 'instance_id';

And provided to the check-license command via:

Terminal window
sirveo check-license \
--file license.txt \
--instance-id='1f6f25e4-383a-4fae-a0b5-818f90b68b8c'

This command prints Sirveo’s end user license agreement:

Terminal window
sirveo legal --eula

And third party notices and software licenses:

Terminal window
sirveo legal --third-party