Installation - Magento

3 min read Updated: 12.10.2026

On this page System Requirements
  1. System Requirements
  2. Installing DockRay in Magento via Composer
  3. Configuring the Project Token and Private Key
  4. Verifying the Integration in the Magento Admin Panel
  5. Post-Installation Verification
  6. What's Next?

To get started with DockRay in Magento, create a project in DockRay, copy its token, and generate a private API key. The token identifies the project, while the private key authenticates your Magento installation.

Don't have a project yet? Read the guide Creating an Account and Your First Project, then return to this documentation to install the integration.

System Requirements

The DockRay integration supports stores running Magento Open Source or Adobe Commerce 2.4.4 or later, as well as Mage-OS. PHP 8.1 or later is required.

The package is distributed via Composer under the name dockcodes/dock-ray-magento. Before installation, check the relevant distribution channel for the latest available release.

Installing DockRay in Magento via Composer

Connect to your store's server and navigate to the Magento root directory. Then run the following commands to install the package, enable the module, and update the application configuration.

bash
composer require dockcodes/dock-ray-magento
bin/magento module:enable DockCodes_DockRay
bin/magento setup:upgrade

# In production mode, also run:


bin/magento setup:di:compile
bin/magento setup:static-content:deploy

Once the installation is complete, the DockRay module will be available in the Magento admin panel. In production environments, run these commands according to your store's deployment procedure.

Configuring the Project Token and Private Key

Connect your Magento installation to the DockRay project you created. In the admin panel, navigate to Stores → Configuration → DockRay → Monitoring and enter your project token and private key.

If you prefer not to store the private key in the database, you can save both credentials in the environment configuration using the following commands:

bash
bin/magento config:set --lock-env dockray/connection/token YOUR_PROJECT_TOKEN
bin/magento config:set --lock-env dockray/connection/private_key YOUR_PRIVATE_KEY

Replace YOUR_PROJECT_TOKEN with your project token and YOUR_PRIVATE_KEY with your generated API key. When values are saved using the --lock-env option, the corresponding fields are locked in the admin panel and use the values stored in the environment configuration.

Verifying the Integration in the Magento Admin Panel

After saving your credentials, open DockRay → Overview. This screen displays the connection status, available module features, and information about the latest vulnerability report. You can also send a test event to verify that the integration is working correctly.

DockRay Overview panel in Magento showing the connection status, module features, and latest vulnerability report
The DockRay → Overview screen displays the connection status and available features, and lets you send a test event.

To manage the integration settings, select DockRay → Settings from the Magento admin menu. Overview lets you check the integration status, while Settings provides access to the configuration options.

Magento admin sidebar with the DockRay menu expanded to show Overview and Settings
After installation, the DockRay section appears in the Magento admin menu with the Overview and Settings options.

Post-Installation Verification

Before enabling monitoring, make sure the token and private key belong to the same DockRay project. Also verify that the private key has not been added to your repository or exposed in publicly accessible application code.

Next, configure the environment, select the reporting scope, and send a test event. Once you have confirmed that the integration is working correctly, you can enable reporting for production traffic.

What's Next?

After installation, read the guide to monitoring application vulnerabilities in DockRay to configure known vulnerability checks and review reports for your Magento components.

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.