Configuration - Magento

3 min read Updated: 12.10.2026

On this page Configuring DockRay in Magento
  1. Configuring DockRay in Magento
  2. Project Connection and Credentials
  3. Configuring Magento Environments
  4. Error Reporting and Monitoring Scope
  5. Magento Vulnerability Monitoring
  6. How to Store Your Private Key Securely

Configuring DockRay in Magento

The DockRay module for Magento lets you monitor application errors and check installed components for vulnerabilities. To get started, configure the connection to your project, specify the environment, and adjust the scope of reported data.

You can find the settings in the Magento admin panel under Stores → Configuration → DockRay → Monitoring. Integration status and reports are available under DockRay → Overview.

Project Connection and Credentials

To connect Magento to DockRay, enter your project token and private key in the Connection section. The key is stored in encrypted form. If the key field contains dots, this indicates that the saved key is retained. You do not need to enter it again unless you want to change it.

DockRay connection settings in Magento: Project token and Project private key fields in the Connection section
The Connection section in DockRay settings for Magento. It contains the project token and private key, which is stored in encrypted form.

If you want to store the key outside the Magento database, you can set it in the app/etc/env.php file using the following command:

bin/magento config:set --lock-env dockray/connection/private_key ...

Alternatively, use the CONFIG__DEFAULT__DOCKRAY__CONNECTION__PRIVATE_KEY environment variable. The value from env.php or the environment variable takes precedence over the value saved in the admin panel.

Configuring Magento Environments

Each environment should send reports to DockRay under a unique name, such as production for the live store and staging for the test environment. This makes it easier to distinguish errors and vulnerability reports from different installations.

It is good practice to use separate private keys for production and staging. This allows you to revoke access independently for each environment. Keep reporting disabled for local installations unless you are intentionally testing the DockRay integration.

Error Reporting and Monitoring Scope

Configure reporting so that DockRay primarily receives errors that require your team's attention. Reducing unnecessary events makes issues easier to investigate and helps ensure that alerts and monthly usage better reflect the actual state of your Magento store.

Do not send events that are a normal part of application behavior. These include handled validation exceptions, 404 errors generated by automated scanners or invalid URLs, and events deliberately triggered by automated tests and monitoring tasks.

DockRay settings in Magento: Behaviour, JavaScript errors, and Vulnerability checks
The Behaviour, JavaScript errors, and Vulnerability checks sections let you specify the environment, application version, percentage of monitored requests, and scope of collected data. JavaScript error reporting and vulnerability checks are disabled by default.

Magento Vulnerability Monitoring

DockRay can check installed components for known vulnerabilities and display the results in a security report. Once you enable Vulnerability checks, you can see how many components were analyzed, which ones are vulnerable, and whether a patched version is available.

You can find the report in the DockRay → Overview section, under Last vulnerability report. Pay attention to the severity level and the version in which the vulnerability was fixed. If an update is available, plan its deployment according to your store's update and testing procedures.

DockRay vulnerability report for Magento showing the number of checked components, vulnerable extensions, severity levels, and patched versions
An example DockRay vulnerability report featuring fictional acme/* extensions. The Send now option lets you send the report immediately without waiting for cron to run.

How to Store Your Private Key Securely

Treat your DockRay private key as a confidential access credential. Store it in your server configuration, a secrets manager, or your platform's private settings. Do not include it in your code repository, logs, screenshots, or code sent to the browser.

If you suspect that the key has been exposed, revoke it immediately and generate a new one. Then update the configuration for the relevant environment to maintain a secure connection between Magento and DockRay.

Keep reading

DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.