Set configuration values on your production system

This section discusses how to set sensitive values on your production system using the magento config:sensitive:set command.

To set sensitive values:

  1. Find a value to set using the sensitive value reference.

  2. Note the configuration path for the setting.

  3. Log in to the production system as, or switch to, the file system owner.

  4. Change to the Commerce installation directory.

  5. Enter the following command:

    bin/magento config:sensitive:set {configuration path} {value}
    

    For example, to set the value of the YouTube API key to 1234, enter

    bin/magento config:sensitive:set catalog/product_video/youtube_api_key 1234
    

    You can also set one or more values interactively as follows:

    bin/magento config:sensitive:set -i
    

    When prompted, enter a value for each sensitive setting or press Enter to skip a value and move to the next one.

  6. To verify that the value was set, log in to the Admin.

  7. Locate the setting in the Admin.

    For example, the YouTube API key setting is located in Stores > Settings > Configuration > Catalog > Catalog > Product Video.

    The setting is displayed in the Admin and cannot be edited. The following figure shows an example.

    Sensitive setting in the Admin

Previous pageBuild system setup
Next pageFile systems access permissions

Commerce