Skip to main content

Manage database configs

Logto helps to maintain some technical configs, such as OIDC and Cookie keys. Before we can managing them via Admin Console or Management API, you can use CLI to achieve the goal.

Get config by key​

Usage:

logto db config get <key> [keys...]

Say you want to get the OIDC private keys:

logto db config get oidc.privateKeys

The output will be like:

oidc.privateKeys=["\n-----BEGIN PRIVATE KEY-----\nMIIJRAIBA..."]

Run logto db config get --help for all available keys, or see Configuration for detailed explanation.

Set config by key​

logto db config set <key> [keys...]

Say you want to set the OIDC Cookie keys:

logto db config set oidc.cookieKeys "[\"key1\",\"key2\"]"

Normally, the value to set should be a valid JSON string, and follows the pre-defined type definition. Run logto db config set --help for all available keys, or see Configuration for detailed explanation.