You are reading the documentation for an outdated Corteza release. 2023.9 is the latest stable Corteza release.

Server plugins

Deprecation warning: Plugin support has been deprecated in version 2022.9 as the current go plugin support with go >= 1.18 does not suite the architecture of Corteza.

Corteza implements the support for Go plugins which can be used to modify default behaviour of the server and provide new functionalities like workflow functions and types.

Enabling and Adding Plugins to Corteza Instance

Plugins can be added to Corteza by specifying their location with PLUGINS_PATHS. Provide a colon separated list of paths to plugin files (plugin file has .so extension). Paths can contain wildcards and are resolved accordingly.

You can quickly disable all plugins by setting PLUGINS_ENABLED to false (enabled by default).

Versions

In case plugin is not fully compatible with Corteza, server refuses to start. It yields some variation of the following error:

Error: plugin.Open("myplugin"): plugin was built with a different version of package github.com/cortezaproject/corteza-server/pkg/rand

Plugins and Corteza Inside Docker Container

Plugins need to be accessible to server. You can either map files or directories via volume or copy files inside a new Docker image.

Using Container Volume Parameter

docker run --rm -it \
  -v "$(pwd)/myplugin.so:/myplugin.so:ro" \
  -e "PLUGINS_PATHS=/myplugin.so" \
  "cortezaproject/corteza-server:2021.9"

Using Docker Compose Configuration

services:
  server:
    image: cortezaproject/corteza:2021.9.3
    volumes:
     - "./plugins/plugin.so:/corteza/plugin.so:ro"