Skip to content

Server Options

Each configuration option may be specified by either a CLI option or an Environment Variable. For example, the Server may be started on a different port through:

sh
$ precept start --http.port=8081
$ # OR
$ PRECEPT_HTTP_PORT=8081 precept start

List Options (denoted by a [] suffix on their Type in the table below) may be supplied multiple times as a CLI option, or as a comma-separated list when supplied an an Environment Variable:

sh
$ precept start \
$   --http.cors=https://my.origin.com \
$   --http.cors=https://other.origin.com
$ # OR
$ PRECEPT_HTTP_CORS="https://my.origin.com,https://other.origin.com" \
$   precept start

Please consult the following table for a comprehensive list of Options expected by the Server:

OptionEnvironment VariableDescription
--http.portPRECEPT_HTTP_PORT Port number to listen for HTTP requests on
Type: number
Default: 8080
--http.corsPRECEPT_HTTP_CORS Allowed CORS origins. May be specified multiple times.
Type: string[]
Default: []
--http.base-urlPRECEPT_HTTP_BASE_URLRequired External base URL that the HTTP server is reachable from.
Type: string
--http.auth.issuer-base-urlPRECEPT_HTTP_AUTH_ISSUER_BASE_URLRequired Base URL of the OAuth2 provider
Type: string
--http.auth.audiencePRECEPT_HTTP_AUTH_AUDIENCERequired Expected audience of JWT tokens
Type: string
--http.auth.ui.client-idPRECEPT_HTTP_AUTH_UI_CLIENT_IDRequired Client ID that the UI should use.
Type: string
--http.auth.ui.authorityPRECEPT_HTTP_AUTH_UI_AUTHORITYRequired Base URL that the UI will attempt to use for oAuth2 authentication. Defaults to the same URL given to `--http.auth.issuer-base-url`.
Type: string
--http.auth.ui.query-paramsPRECEPT_HTTP_AUTH_UI_QUERY_PARAMSRequired JSON-encoded query params that the UI will pass through to the IDP during login. Supported query params vary across IDP implementations.
Type: string
--http.auth.ui.query-params-whitelistPRECEPT_HTTP_AUTH_UI_QUERY_PARAMS_WHITELISTRequired List of query params that may be manually specified in the login URL before passing through to IDP.
Type: string[]
--http.ui.custom-logo-urlPRECEPT_HTTP_UI_CUSTOM_LOGO_URLRequired Custom logo URL to replace the default Precept logo in the UI.
Type: string
--datapackPRECEPT_DATAPACK_PATHS Path to a Datapack file or glob pattern. May be specified multiple times.
Type: string[]
Default: []
--storage.connectionPRECEPT_STORAGE_CONNECTIONRequired PostgreSQL Storage Driver connection string
Type: string
--secrets-jwe.secretPRECEPT_SECRETS_JWE_SECRETRequired Path to the JWK-formatted secret key that will be used for JWE encryption/decryption.
Type: string
--secrets-jwe.allow-plaintext-passthruPRECEPT_SECRETS_JWE_ALLOW_PLAINTEXT_PASSTHRU Allow config values already stored in plaintext to be passed through to Resource Actions.
Type: string
--license.keyPRECEPT_LICENSE_KEYRequired License key specified as a JWT string
Type: string
--license.filePRECEPT_LICENSE_FILERequired Path to the file containing the license key in JWT format
Type: string
--license.public-keyPRECEPT_LICENSE_PUBLIC_KEYRequired Public key for license validation
Type: string
--license.public-key-filePRECEPT_LICENSE_PUBLIC_KEY_FILERequired Path to the file containing the public key
Type: string