Agent

Agent

Agents are workers that execute the pipelines. Agents must be installed in a separate VM.

Agent binaries are available here. A shared secret token is required to run the agent. This token is automatically generated and located at /app/data/env.sh. Please use the File manager to make a note of this value and use it in the WOODPECKER_AGENT_SECRET variable below.

Documentation of agent variables can be found here.

To run the agent using Docker:
docker run --name=woodpecker-agent --restart=always --detach \
    -e WOODPECKER_SERVER="woodpecker.cloudron.example:9000" \
    -e WOODPECKER_MAX_WORKFLOWS=4 \
    -e WOODPECKER_GRPC_SECURE=true \
    -e WOODPECKER_LOG_LEVEL=info \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e WOODPECKER_BACKEND=docker \
    -e WOODPECKER_AGENT_SECRET="see /app/data/env.sh for the value" \
    woodpeckerci/woodpecker-agent:latest


You can view the agent logs using docker logs -f woodpecker-agent.
docker logs -f woodpecker-agent
{"level":"debug","time":"2023-04-27T09:06:42Z","message":"loaded docker backend engine"}
{"level":"debug","time":"2023-04-27T09:06:42Z","message":"request next execution"}