Configure projects with Ory CLI
All Ory components use the same configuration format and APIs whether they are self-hosted or used through Ory Network.
This allows you to use the Ory CLI to configure your components, no matter how you use Ory!
Configure projects
There are two ways to adjust the configuration of projects. You can:
- overwrite / import configuration from a file using the
ory update
command - patch the existing configuration using the
ory patch
command
Overwrite / import configuration
To overwrite the entire project configuration or to import a brand new config, create a file with the configuration you want to use.
The configuration format follows the updateProject API request payload.
The /services/identity/config
key is compatible with the
Ory Kratos configuration format except for some keys (for example serve
, dsn
)
which are ignored.
{
"services": {
"identity": {
"config": ...
}
}
}
Let's look at an example. If you want to change the name of the email sender for recovery and verification emails, create a configuration file that looks like this:
{
"name": "My Project Name",
"services": {
"identity": {
"config": {
"courier": {
"smtp": {
"from_name": "My Custom E-Mail Name"
}
}
}
}
}
}
Next, use the Ory CLI to apply the config:
ory update project --project <project-id> --workspace <workspace-id> --file config.json