Installing GoCD agent on Windows
You must be logged in as a user with Admin privileges to install the GoCD agent on Windows.
- Download a version of go-agent from the downloads page.
- Double-click the
go-agent-${version}-setup.exe
installer file and follow the prompts to install Go. - During installation you will be asked to select a root path for your GoCD agent. In addition to being the agent installation directory, this directory will contain also contain a directory where your source code is checked out and built.
- You will next be prompted to choose the bundled JRE or specify the location of JRE (or JDK) installed on your system.
- After installing the files, the installer will prompt you for the hostname or IP address of the GoCD server. Leaving this blank it will default to
https://localhost:8154/go
. - At the end of the installation, GoCD agent registers itself as a windows service and starts running automatically.
Silent (Headless) Installation
You may use this method if you would like to script the installation of the GoCD agent.
go-agent-${version}-setup.exe /S /START_AGENT=NO /SERVERURL="<SERVERURL>" /D=<PATH_TO_AGENT_DIRECTORY>
Argument | Required | Description |
---|---|---|
/D |
No | The path where the server should be installed. Defaults to C:\Program Files(x86)\Go Server . Must be the last parameter on the command line and must not contain quotes even if the path contains blank spaces. |
/SERVERURL |
No | The URL of the GoCD server. Defaults to https://127.0.0.1:8154/go . |
/START_AGENT |
No | Whether the agent service should start after installation. Set to NO (case-sensitive) to disable starting up the service after installation. |
For example:
C:\> go-agent-16.1.0-1234-setup.exe /S /SERVERURL="https://10.12.20.47:8154/go" /D=C:\go\agent
If User Access Control feature is enabled on your Windows system, it needs to be turned off for silent installation to work.
If you are using the silent installation to upgrade GoCD, you should not specify the Installation-Directory option.
Managing the GoCD agent process
You can manage the GoCD agent process from the windows service manager
Location of GoCD agent files
All the files for the GoCD agent are under its root installation folder in Windows, the default location is C:\Program Files (x86)\Go Agent
.
Registering your agent with the server
For security reasons, all newly installed GoCD agents need to be enabled on the GoCD server before work is assigned to them. This prevents an unauthorized person from getting access to your source code. To enable a newly installed GoCD agent, do the following:
- Open the GoCD server dashboard
- Follow the instructions here to find the agent you’ve just installed on the list and add the agent to your cloud. The GoCD server will now schedule work for this agent.