Skip to main content

All agent configuration variables

This document includes all of the variables you can configure the Moderne agent to run with. Your configuration will only use some of these.

Core variables

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_APIGATEWAYRSOCKETURItrueThe URI used to connect to the Moderne API, provided by Moderne.
MODERNE_AGENT_CRYPTO_SYMMETRICKEYtrueA 256-bit AES encryption key, hex encoded. Used to encrypt your artifacts.
MODERNE_AGENT_NICKNAMEtrueA name used to identify your agent in the SaaS agent dashboard UI.
MODERNE_AGENT_TOKENtrueThe Moderne SaaS agent connection token, provided by Moderne.
MODERNE_AGENT_DOWNLOADPARALLELISMfalse2 threadsHow many threads are used to download LSTs.
MODERNE_AGENT_ARTIFACTINDEXINTERVALSECONDSfalse120 secondsHow frequently LSTs will be indexed.
MODERNE_AGENT_DEFAULTCOMMITOPTIONS_{index}falseAll options available.Use to restrict which commit options are available on a tenant level (if the organizations service doesn't return any). Acceptable values: Direct, Branch, Fork, PullRequest, ForkAndPullRequest.

Example:

docker run \
-e MODERNE_AGENT_APIGATEWAYRSOCKETURI=https://api.tenant.moderne.io/rsocket \
-e MODERNE_AGENT_CRYPTO_SYMMETRICKEY=yourSymmetricKey \
-e MODERNE_AGENT_NICKNAME=prod-1 \
-e MODERNE_AGENT_TOKEN=yourToken \
-e MODERNE_AGENT_DEFAULTCOMMITOPTIONS_0=PullRequest \
-e MODERNE_AGENT_DEFAULTCOMMITOPTIONS_1=ForkAndPullRequest \
# ... Additional variables

Azure variables

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_AZUREDEVOPS_{index}_OAUTH_CLIENTIDtrueThe client ID of the registered OAuth app.
MODERNE_AGENT_AZUREDEVOPS_{index}_OAUTH_CLIENTSECRETtrueThe client secret of the registered OAuth app.
MODERNE_AGENT_AZUREDEVOPS_{index}_OAUTH_TENANTIDtrueThe Azure tenant ID of the registered OAuth app.
MODERNE_AGENT_AZUREDEVOPS_{index}_SKIPSSLfalsefalseSpecifies whether or not to skip SSL validation for HTTP connections to this Azure DevOps instance. This must be set to true if you use a self-signed SSL/TLS certificate.
MODERNE_AGENT_AZUREDEVOPS_{index}_SSH_PRIVATEKEYfalseThe SSH private key used to establish a SSH connection with Azure DevOps.
MODERNE_AGENT_AZUREDEVOPS_{index}_SSH_PASSPHRASEtrue (If the SSH key is specified + encrypted)The passphrase used to encrypt the SSH private key
MODERNE_AGENT_AZUREDEVOPS_{index}_SSH_SSHFILENAMEtrue (If the SSH key is specified)The file name of the private key, which the agent will store locally.
MODERNE_AGENT_AZUREDEVOPS_{index}_SSH_USERtrue (If the SSH key is specified)The username used for SSH communication with Azure DevOps.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_AZUREDEVOPS_0_OAUTH_CLIENTID=4affd674-286d-423f-b643-7ffe4dec0f53 \
-e MODERNE_AGENT_AZUREDEVOPS_0_OAUTH_CLIENTSECRET=yourClientSecret \
-e MODERNE_AGENT_AZUREDEVOPS_0_OAUTH_TENANTID=488bc312-9fdc-43d2-a647-7a7b28066cc4 \
# ... Additional variables

Bitbucket Cloud variables

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_KEYtrueThe key specified in your Bitbucket OAuth consumer.
MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_SECRETtrueThe secret specified in your Bitbucket OAuth consumer.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_KEY=yourOAuthKey \
-e MODERNE_AGENT_BITBUCKET_CLOUD_OAUTH_SECRET=yourSecretKey \
# ... Additional variables

Bitbucket Data Center variables

info

You can configure multiple Bitbucket instances by including multiple entries, each with a different {index}.

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_BITBUCKET_{index}_PRIVATEKEYtrueThe private key you configured for this Bitbucket instance.
MODERNE_AGENT_BITBUCKET_{index}_URLtrueThe fully-qualified URL of the running Bitbucket instance. For example: https://bitbucket.myorg.com.
MODERNE_AGENT_BITBUCKET_{index}_ALTERNATEURLS_{index}falseThe list of alternative fully-qualified URL of the running Bitbucket instance. For example: https://bitbucket.myorg.com.
MODERNE_AGENT_BITBUCKET_{index}_SKIPSSLfalsefalseSpecifies whether or not to skip SSL validation for HTTP connections to this Bitbucket instance. This must be set to true if you use a self-signed SSL/TLS certificate.
MODERNE_AGENT_BITBUCKET_{index}_SSH_PRIVATEKEYfalseThe SSH private key used to establish a SSH connection with Bitbucket.
MODERNE_AGENT_BITBUCKET_{index}_SSH_PASSPHRASEtrue (If the SSH private key is specified)The file name of the private key, which the agent will store locally.
MODERNE_AGENT_BITBUCKET_{index}_SSH_SSHFILENAMEtrue (If the SSH private key is specified)The file name of the private key, which the agent will store locally.
MODERNE_AGENT_BITBUCKET_{index}_SSH_USERtrue (If the SSH private key is specified)The username used for SSH communication with Bitbucket.
MODERNE_AGENT_BITBUCKET_{index}_SSH_PORTtrue (If the SSH private key is specified)7999The port used to communicate via SSH with Bitbucket.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_BITBUCKET_0_PRIVATEKEY=yourPrivateKey \
-e MODERNE_AGENT_BITBUCKET_0_URL=https://bitbucket.myorg.com \
# ... Additional variables

GitHub variables

info

You can configure multiple GitHub OAuth apps by including multiple entries, each with a different {index}.

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_GITHUB_{index}_OAUTH_CLIENTIDtrueThe client id configured in GitHub.
MODERNE_AGENT_GITHUB_{index}_OAUTH_CLIENTSECRETtrueThe client secret configured in GitHub.
MODERNE_AGENT_GITHUB_{index}_URLtrueThe fully-qualified hostname of the running GitHub instance.
MODERNE_AGENT_GITHUB_{index}_SKIPSSLfalsefalseSpecifies whether or not to skip SSL validation for HTTP connections to this GitHub instance. This must be set to true if you use a self-signed SSL/TLS certificate.
MODERNE_AGENT_GITHUB_{index}_ALLOWABLE_ORGANIZATIONS_{index}falseSee descriptionSpecifies what organizations you can fork recipe results to. By default, there are no restrictions on which organizations can be committed to. If you want multiple organizations, increase the last index and add one per line.
MODERNE_AGENT_GITHUB_{index}_OAUTH_INCLUDEPRIVATEREPOSfalseSee descriptionBy default, the OAuth app will only have access to public repositories within your organization(s). To provide the OAuth app access to private repositories, you can set this to true.
MODERNE_AGENT_GITHUB_{index}_SSH_PRIVATEKEYfalse(Optional) The SSH private key used to establish a SSH connection with GitHub.
MODERNE_AGENT_GITHUB_{index}_SSH_PASSPHRASEtrue (If the SSH private key is specified)The passphrase used to encrypt the SSH private key.
MODERNE_AGENT_GITHUB_{index}_SSH_SSHFILENAMEtrue (If the SSH private key is specified)The file name of the private key, which the agent will store locally.
MODERNE_AGENT_GITHUB_{index}_SSH_USERtrue (If the SSH private key is specified)The username used for SSH communication with GitHub.
MODERNE_AGENT_GITHUB_{index}_SSH_PORTfalse7999The port used to communicate via SSH with GitHub.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_GITHUB_0_OAUTH_CLIENTID=yourClientId \
-e MODERNE_AGENT_GITHUB_0_OAUTH_CLIENTSECRET=yourClientSecret \
-e MODERNE_AGENT_GITHUB_0_URL=https://myorg.github.com \
-e MODERNE_AGENT_GITHUB_0_ALLOWABLE_ORGANIZATIONS_0=moderne \
-e MODERNE_AGENT_GITHUB_0_ALLOWABLE_ORGANIZATIONS_1=openrewrite \
-e MODERNE_AGENT_GITHUB_0_OAUTH_INCLUDEPRIVATEREPOS=true \
# ... Additional variables

GitLab variables

You can configure multiple GitLab OAuth apps by including multiple entries, each with a different {index}.

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_GITLAB_{index}_OAUTH_CLIENTIDtrueThe application id configured in GitLab.
MODERNE_AGENT_GITLAB_{index}_OAUTH_CLIENTSECRETtrueThe secret configured in GitLab.
MODERNE_AGENT_GITLAB_{index}_URLtrueThe fully-qualified hostname of your GitLab instance.
MODERNE_AGENT_GITLAB_{index}_SKIPSSLfalsefalseSpecifies whether or not to skip SSL validation for HTTP connections to this GitLab instance. This must be set to true if you use a self-signed SSL/TLS certificate.
MODERNE_AGENT_GITLAB_{index}_SSH_PRIVATEKEYfalseThe SSH private key used to establish a SSH connection with GitLab.
MODERNE_AGENT_GITLAB_{index}_SSH_PASSPHRASEtrue (If the SSH private key is specified)The passphrase used to encrypt the SSH private key.
MODERNE_AGENT_GITLAB_{index}_SSH_SSHFILENAMEtrue (If the SSH private key is specified)The file name of the private key, which the agent will store locally.
MODERNE_AGENT_GITLAB_{index}_SSH_USERtrue (If the SSH private key is specified)The username used for SSH communication with GitLab.
MODERNE_AGENT_GITLAB_{index}_SSH_PORTfalse7999The port used to communicate via SSH with GitLab.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_GITLAB_0_OAUTH_CLIENTID=yourClientId \
-e MODERNE_AGENT_GITLAB_0_OAUTH_CLIENTSECRET=yourClientSecret \
-e MODERNE_AGENT_GITLAB_0_URL=https://your-gitlab.com \
# ... Additional variables

Organizations service variables

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_ORGANIZATION_URLtrueThe URL of your GraphQL service that provides organization information.
MODERNE_AGENT_ORGANIZATION_UPDATE_INTERVAL_SECONDSfalse600Specifies how often to request your organization information.
MODERNE_AGENT_ORGANIZATION_SKIPSSLfalsefalseSpecifies whether or not to skip SSL validation for HTTP connections to this Organization service instance. This must be set to true if you use a self-signed SSL/TLS certificate.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_ORGANIZATION_URL=http://localhost:8091 \
-e MODERNE_AGENT_ORGANIZATION_UPDATE_INTERVAL_SECONDS=600 \
# ... Additional variables

Maven repository variables

You can configure multiple Maven repositories by including multiple entries, each with a different {index}.

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_MAVEN_{index}_URLtrueThe URL of your Maven repository.
MODERNE_AGENT_MAVEN_{index}_LOCALREPOSITORYtrue~/.moderne-mavenThe path on disk where LST artifacts and Maven index files will be downloaded to. This is on the disk where the agent is being run and not on the Maven instance.

LST artifacts are deleted from this location after they are transmitted to Moderne. Index files will remain behind to be used to detect diffs in the artifacts.

If multiple Maven repositories are configured on the agent, they must have different local repositories configured.
MODERNE_AGENT_MAVEN_{index}_USERNAMEfalsenullThe username used to resolve artifacts.
MODERNE_AGENT_MAVEN_{index}_PASSWORDfalsenullThe password used to resolve artifacts.
MODERNE_AGENT_MAVEN_{index}_RELEASESfalsetrueSpecifies whether or not this repository should be searched for releases.
MODERNE_AGENT_MAVEN_{index}_SNAPSHOTSfalsetrueSpecifies whether or not this repository should be searched for snapshots.
MODERNE_AGENT_MAVEN_{index}_ASTSOURCEfalsetrueSpecifies whether or not this repository should be searched for LST artifacts (Note: LSTs used to be called ASTs).
MODERNE_AGENT_MAVEN_{index}_RECIPESOURCEfalsetrueSpecifies whether or not this repository should be searched for recipe jars.
MODERNE_AGENT_MAVEN_{index}_SKIPSSLfalsefalseWhether or not to skip SSL/TLS verification for calls from the agent to this Maven repository. This must be set to true if you use a self-signed SSL/TLS certificate.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_MAVEN_0_URL=https://myartifactory.example.com/artifactory/libs-releases-local \
-e MODERNE_AGENT_MAVEN_0_LOCALREPOSITORY=~/.moderne-maven \
-e MODERNE_AGENT_MAVEN_0_USERNAME=admin \
-e MODERNE_AGENT_MAVEN_0_PASSWORD=password \
# ... Additional variables

Artifactory repository variables

You can configure multiple Artifactory servers by including multiple entries, each with a different {index}. Within a given Artifactory server configuration, you can configure multiple LST query filters by including multiple entries, each with a different {index}.

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_ARTIFACTORY_{index}_URLtrueThe URL of your Artifactory instance.
MODERNE_AGENT_ARTIFACTORY_{index}_USERNAMEtrueThe username used to connect to your Artifactory instance. This user must have permission to run AQL queries.
MODERNE_AGENT_ARTIFACTORY_{index}_PASSWORDtrueThe password used to connect to your Artifactory instance.
MODERNE_AGENT_ARTIFACTORY_{index}_ASTQUERYFILTERS_{index}trueThe AQL query fragment used to select LST artifacts to send to Moderne. If multiple are specified, they are combined together with an AND.
MODERNE_AGENT_ARTIFACTORY_{index}_SKIPSSLfalsefalseSpecifies whether or not to skip SSL verification for HTTP connections from the agent to this Artifactory instance. This must be set to true if you use a self-signed SSL/TLS certificate.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_ARTIFACTORY_0_URL=https://myartifactory.example.com/artifactory/ \
-e MODERNE_AGENT_ARTIFACTORY_0_USERNAME=admin \
-e MODERNE_AGENT_ARTIFACTORY_0_PASSWORD=password \
-e MODERNE_AGENT_ARTIFACTORY_0_ASTQUERYFILTERS_0='"name":{"$match":"*-ast.jar"}' \
-e MODERNE_AGENT_ARTIFACTORY_0_ASTQUERYFILTERS_1='"repo":{"$eq":"example-maven"}' \
# ... Additional variables

Artifactory recipe variables

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_MAVEN_{index}_URLtrueThe URL of your Maven repository.
MODERNE_AGENT_MAVEN_{index}_ASTSOURCEtruetrueSpecifies whether or not this repository should be searched for LST artifacts. You should set this to false (Note: LSTs used to be called ASTs).
MODERNE_AGENT_MAVEN_{index}_LOCALREPOSITORYtrue~/.moderne-mavenThe path on disk where LST artifacts and Maven index files will be downloaded to. This is on the disk where the agent is being run and not on the Maven instance.

LST artifacts are deleted from this location after they are transmitted to Moderne. Index files will remain behind to be used to detect diffs in the artifacts.

If multiple Maven repositories are configured on the agent, they must have different local repositories configured.
MODERNE_AGENT_MAVEN_{index}_USERNAMEfalsenullThe username used to resolve artifacts.
MODERNE_AGENT_MAVEN_{index}_PASSWORDfalsenullThe password used to resolve artifacts.
MODERNE_AGENT_MAVEN_{index}_RELEASESfalsetrueSpecifies whether or not this repository should be searched for releases.
MODERNE_AGENT_MAVEN_{index}_SNAPSHOTSfalsetrueSpecifies whether or not this repository should be searched for snapshots.
MODERNE_AGENT_MAVEN_{index}_RECIPESOURCEfalsetrueSpecifies whether or not this repository should be searched for recipe jars.
MODERNE_AGENT_MAVEN_{index}_SKIPSSLfalsefalseWhether or not to skip SSL/TLS verification for calls from the agent to this Maven repository. This must be set to true if you use a self-signed SSL/TLS certificate.
warning

If you want to configure a Moderne DevCenter, you will need to ensure that you have exactly one Maven repository configured with RECIPESOURCE set to true. (It is fine to have this same Maven repository configured in multiple agents.)

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_MAVEN_0_URL=https://myartifactory.example.com/artifactory/libs-releases-local \
-e MODERNE_AGENT_MAVEN_0_ASTSOURCE=false \
-e MODERNE_AGENT_MAVEN_0_LOCALREPOSITORY=~/.moderne-maven \
-e MODERNE_AGENT_MAVEN_0_USERNAME=admin \
-e MODERNE_AGENT_MAVEN_0_PASSWORD=password \
# ... Additional variables

Strict recipe sources variables

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_RECIPE_USEONLYCONFIGUREDtrueOnly use the recipe sources configured in the agent.
MODERNE_AGENT_RECIPE_POMCACHE_TYPEfalseUsed to specify what type of cache the POM should use. Acceptable values: IN_MEMORY or REDIS.
MODERNE_AGENT_RECIPE_POMCACHE_ENTRYTTLMINUTESfalseHow long entries should live in the POM cache.
MODERNE_AGENT_RECIPE_POMCACHE_REDIS_HOSTtrue (If the POM cache type is REDIS)The URL of the Redis instance.
MODERNE_AGENT_RECIPE_POMCACHE_REDIS_PORTtrue (If the POM cache type is REDIS)The port number of the Redis instance.
MODERNE_AGENT_RECIPE_POMCACHE_REDIS_USERNAMEfalseThe username needed to authenticate to the Redis instance.
MODERNE_AGENT_RECIPE_POMCACHE_REDIS_PASSWORDfalseThe password needed to authenticate with the Redis instance.
MODERNE_AGENT_RECIPE_POMCACHE_REDIS_SSLfalsefalseIf set to true, then SSL will be enabled for the connection to the Redis instance.
MODERNE_AGENT_RECIPE_POMCACHE_REDIS_DATABASEfalseThe Redis DB index.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_RECIPE_USEONLYCONFIGURED=true \
# ... Additional variables

PyPI variables

info

You can configure multiple PyPI package indexes by including multiple entries, each with a different {index}.

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_VISUALIZATION_USEONLYCONFIGUREDtruefalseOnly use the visualization sources configured in the agent.
MODERNE_AGENT_PYPI_{index}_URLtrueThe URL of your PyPI package index.
MODERNE_AGENT_PYPI_{index}_USERNAMEfalsenullThe username used to access the index.
MODERNE_AGENT_PYPI_{index}_PASSWORDfalsenullThe password used to access the index.
MODERNE_AGENT_PYPI_{index}_SKIPSSLfalsefalseWhether or not to skip SSL/TLS verification for calls from the agent to this PyPI package index. This must be set to true if you use a self-signed SSL/TLS certificate.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_VISUALIZATION_USEONLYCONFIGURED=true \
-e MODERNE_AGENT_PYPI_0_URL=https://pypi.example.com/simple \
-e MODERNE_AGENT_PYPI_0_USERNAME=admin \
-e MODERNE_AGENT_PYPI_0_PASSWORD=password \
# ... Additional variables

HTTP proxy variables

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_APIGATEWAY_PROXY_HOSTfalseHost (without scheme) for the proxy server.
MODERNE_AGENT_APIGATEWAY_PROXY_PORTfalsePort for the proxy server.
info

If you include either a host or port, you must include both.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_APIGATEWAY_PROXY_HOST=proxy.mycompany.com \
-e MODERNE_AGENT_APIGATEWAY_PROXY_PORT=8179 \
# ... Additional variables

Generic HTTP tool variables

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_HTTPTOOL_{index}_URLtrueFully qualified URL to your HTTP tool.
MODERNE_AGENT_HTTPTOOL_{index}_USERNAMEfalseUsername used to authenticate to HTTP tool.

Note: Only one of basic auth (username+password) and bearer token can be used. If username and password are specified, bearerToken must not be provided.
MODERNE_AGENT_HTTPTOOL_{index}_PASSWORDfalsePassword used to authenticate to HTTP tool.

Note: Only one of basic auth (username+password) and bearer token can be used. If username and password are specified, bearerToken must not be provided.
MODERNE_AGENT_HTTPTOOL_{index}_BEARERTOKENfalseBearer token used to authenticate to HTTP tool.

Note: Only one of basic auth (username+password) and bearer token can be used. If bearerToken is specified, username and password must not be provided.
MODERNE_AGENT_HTTPTOOL_{index}_SKIPSSLfalsefalseSpecifies whether or not to skip SSL validation for HTTP connections to this HTTP tool. This must be set to true if you use a self-signed SSL/TLS certificate.
MODERNE_AGENT_HTTPTOOL_{index}_SKIPVALIDATECONNECTIVITYfalsefalseBy default, on agent startup, we will validate that we can connect to this HTTP tool, and fail to start up the agent if we cannot. Set this to true to skip this validation.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_HTTPTOOL_0_URL=https://launchdarkly.mycompany.com \
-e MODERNE_AGENT_HTTPTOOL_0_USERNAME=myUser \
-e MODERNE_AGENT_HTTPTOOL_0_PASSWORD=${SECRET_NAME} \
# ... Additional variables