Skip to main content

Configure Ory Identities

Using the Ory CLI, you can quickly adjust the configuration of the Ory Identities and apply config from the Ory Network environment to self-hosted Ory Kratos Identity Server instances.

tip

Ory Kratos is the open-source project that powers the Ory Identities.

This feature is useful for fluently moving your local setup to the cloud, or for working on the configuration and testing different settings in the safety of the local development environment.

To work with the Ory Identities, you must have an active project. Use the CLI or the Ory Console to create one.

Export configuration from Ory Network

To get your project's Ory Identities configuration, run this command:

info

You must be signed in to an Ory Network account to perform this action. Read this document to learn more.

## List all available workspaces
ory list workspaces

## List all available projects
ory list projects --workspace <workspace-id>

## Get config
ory get identity-config --project <project-id> --workspace <workspace-id> --format yaml

The --format flag defines the format of the output file. You can choose one of yaml ,json, or json-pretty.

Getting the configuration in the YAML format produces output that is ready to use with self-hosted Ory Kratos.

Export to file

For a convenient way to get the Ory Identities configuration working in self-hosted Ory Kratos, save the configuration to a YAML file.

Run this command:

ory get identity-config --project <project-id> --workspace <workspace-id> --format yaml > identity-config.yaml

Import configuration to Ory Network

To start using the configuration from a self-hosted Ory Kratos instance in Ory Identities, import the configuration file with the CLI:

ory update identity-config --project <project-id> --workspace <workspace-id> --file config.yaml

Adjust specific keys

You can adjust specific keys in the configuration using the ory patch CLI command.

Running this sample command sets the /selfservice/methods/totp/enabled key value to false:

ory patch identity-config --project <project-id> --workspace <workspace-id> \
--replace '/selfservice/methods/totp/enabled=false'
note

Read this document to learn more about adjusting project configuration with the Ory CLI.