If you run Woodpecker on resource-constrained hardware (see EC2 Instance Setup), you may want to limit the resources available to the worker containers it starts.

Memory Limits

This is done through environment variables on the Woodpecker agent. In the compose file for the agent:

services:
  woodpecker_agent:
    ...
    environment:
      ...
      WOODPECKER_BACKEND_DOCKER_LIMIT_MEM: 250000000

Note that unlike the compose mem_limit syntax, this does not accept k/m/g suffixes and must be spelled out in bytes.

See also

This is not quite the same as Memory Limiting (well, that’s what this controls — but there’s a distinction that this value is for the worker agent containers Woodpecker automatically creates, not for the woodpecker agent container itself).