Installing Integrations

Integrations can be installed by moving the integration into the integrations directory on your Polarity Server. The integrations directory defaults to /app/polarity-server/integrations. There should be a directory for each integration.

/app/polarity-server/integrations
├── generic-rest/
├── virustotal/
├── google-maps/
└── crits

As an example, the above directory structure has four installed integrations (generic-rest, virustotal, google-maps, and crits).

If you have changed the default integration directory you can check your Polarity Server configuration file /app/polarity-server/config/config.js and check the integrations.path property to find your integration installation path.

Once you have copied the integration to your integrations folder you will need to install the node modules that the integration depends on.

Navigate into the integration directory and run the command npm install to install all the dependencies.

cd /app/polarity-server/integrations/generic-rest
npm install --production

You will notice that after the npm install command there will be a node_modules directory inside your integration directory. You also need to ensure that all files in your integration are owned by the polarityd user. You can do this with the following command:

chown -R polarityd:polarityd /app/polarity-server/integrations/generic-rest

Finally, you need to restart Polarity Server for the integration to be loaded the first time.

systemctl restart polarityd

Note that after the first time an integration is installed you can restart the integration from the Polarity Integration user interface and do not need to restart the Polarity Server in the event that you make changes to the integration.

Last updated