Register a runner, choose the Docker or host executor and assign labels.

A runner executes the jobs of your workflows. It is a separate process on its own machine, picks up jobs from Codeny and has no database access.

Registering#

  1. Repository → Settings → CI/CD & keys → Runners → Register new runner.
  2. Codeny shows a command with a registration token (single use, valid for 1 hour).
  3. Run the command on the runner machine:
codeny runner \
  --url https://codeny.org \
  --register-token <TOKEN> \
  --name build-01 \
  --labels default,linux \
  --executor docker

On first start the runner registers and keeps its credentials in its data directory. After that codeny runner --url https://codeny.org is enough.

A runner belongs to exactly one repository and never gets jobs of other repositories.

Options#

OptionEnvironment variableDefaultMeaning
--urlCODENY_RUNNER_URL–address of the Codeny instance
--register-tokenCODENY_RUNNER_REGISTRATION_TOKEN–first start only
--nameCODENY_RUNNER_NAMEhost namedisplay name
--labelsCODENY_RUNNER_LABELSdefaultlabels jobs select with runs-on
--data-dirCODENY_RUNNER_DATA_DIR./runner-datastate and workspaces
--executorCODENY_RUNNER_EXECUTORdockerdocker (isolated) or host
--default-imageCODENY_RUNNER_DEFAULT_IMAGEdebian:bookworm-slimimage for jobs without container:
--docker-networkCODENY_RUNNER_DOCKER_NETWORKbridgenetwork of job containers
--cpusCODENY_RUNNER_CPUS2CPU limit per container
--memoryCODENY_RUNNER_MEMORY2gmemory limit per container

Executors#

Docker (recommended): every step runs in a throwaway container – without root capabilities (--cap-drop ALL, no-new-privileges), with process, CPU and memory limits, only the workspace mounted, no Docker socket and no host network.

Host: commands run directly on the runner machine. This is not isolated and only starts with --allow-host-exec – meant for development.

Security#

  • Every job gets its own job token valid only while the job runs. It allows logs, artifacts and a read-only clone of this repository – no push, no other repositories, no user API.
  • Runners belong in a separate, isolated network.

So far the Docker executor is only tested through its arguments. Verify it on your Docker host before using it in production.

Last updated