Auto Register a Remote Agent

    Your query search resulted in no results.

    Auto registration of remote agents

    As a GoCD administrator, you can auto approve remote agents by using a shared key between the GoCD Agent and GoCD Server.

    • Add an attribute named “agentAutoRegisterKey”, for e.g., agentAutoRegisterKey=“388b633a88de126531afa41eff9aa69e”, in the server configuration fragment, in case it is not present.
    <?xml version="1.0" encoding="utf-8"?>
    <cruise xmlns:xsi="" xsi:noNamespaceSchemaLocation="cruise-config.xsd" schemaVersion="75">
      <server agentAutoRegisterKey="388b633a88de126531afa41eff9aa69e">
    • On the remote GoCD Agent machine, create a file named <agent_installation_directory>/config/ In a native agent installation this file is usually located on /var/lib/go-agent/config/ directory. The config/ folder might not exist, in this case you should create it by yourself.

      If generating this file programmatically note that it must be UTF-8 encoded. Although line-endings are not important, some platforms will generate files with other encodings or platform default encodings such as UTF-16 w/BOM which will not work correctly.

      This file supports the following properties

    Key Required Description yes The value of the <server/> element’s agentAutoRegisterKey attribute from cruise-config.xml no A comma separated list of environments that this agent should be associated with. no This MUST not be set by agents that register as elastic-agents. A comma separated list of resources that this agent should be tagged with. no The name of the agent when it is registered with the server. (Version 15.2.0 onwards) no This MUST be set by agents that register as elastic-agents. This may contain an identifier of the agent, that the plugin can identify. Can be something like a docker container ID, or AWS instance ID. (Version 16.12.0 onwards) no This MUST be set by agents that to register as elastic-agents. This should contain the plugin id of elastic-agent plugin that spins up the agent. (Version 16.12.0 onwards)


    # Auto-registration properties in key=value format, encoded in UTF-8,java,Performance
    # if you're using elastic agents, these would be needed as well
    • Bringing up the remote agent should now automatically register with the GoCD Server without the administrator having to ‘Enable’ the newly added agent and configure its resources and assign it to environments.