Skip to main content
Debian 11 (Bullseye)

Installation of Monarx Agent and PHP extension

Will avatar
Written by Will
Updated over a week ago

This article shows a basic installation of the Monarx Agent. For advanced configuration, including using regex patterns in scan bases and quarantine directories, see Advanced Agent Configuration.

Monarx uses deb packages managed via apt for Debian 11.

Set up the GPG key

apt-key adv --keyserver "keyserver.ubuntu.com" --recv-keys "4E240071023138C8"

Add the repository to local sources

sudo echo "deb [arch=amd64] https://repository.monarx.com/repository/debian-bullseye/ bullseye main" > /etc/apt/sources.list.d/monarx.list

Set up the Agent configuration file

During initial account setup the web app will prompt you to download your agent configuration file with your Enterprise's client_id and client_secret populated. Following initial installation configuration files can be provisioned in the Credentials Module in the Monarx web app (monarx-agent.conf). Place the file in your servers' /etc/ directory: /etc/monarx-agent.conf. You may re-use the credentials/configuration file created, alternatively you can provision more in the future.

Before installing the Agent & Protect modules below, uncomment/configure the user_base values in the monarx-agent.conf file according to the examples provided, or as described in Advanced Agent Configuration.

Install the Agent and Protect modules with apt-get

apt-get update && apt-get install monarx-protect-autodetect

The monarx-protect-autodetect package pulls in the monarx-agent and monarx-protect packages as dependencies. It configures Protect to be loaded as a PHP extension for common configurations of PHP, although you may need to restart your web servers for the changes to take effect. You can verify that the Agent is running and communicating with the cloud successfully by navigating to the Agents module in the Monarx web app.

Did this answer your question?