Setting up runners
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#
- Repository → Settings → CI/CD & keys → Runners → Register new runner.
- Codeny shows a command with a registration token (single use, valid for 1 hour).
- Run the command on the runner machine:
codeny runner \
--url https://codeny.org \
--register-token <TOKEN> \
--name build-01 \
--labels default,linux \
--executor dockerOn 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#
| Option | Environment variable | Default | Meaning |
|---|---|---|---|
--url | CODENY_RUNNER_URL | – | address of the Codeny instance |
--register-token | CODENY_RUNNER_REGISTRATION_TOKEN | – | first start only |
--name | CODENY_RUNNER_NAME | host name | display name |
--labels | CODENY_RUNNER_LABELS | default | labels jobs select with runs-on |
--data-dir | CODENY_RUNNER_DATA_DIR | ./runner-data | state and workspaces |
--executor | CODENY_RUNNER_EXECUTOR | docker | docker (isolated) or host |
--default-image | CODENY_RUNNER_DEFAULT_IMAGE | debian:bookworm-slim | image for jobs without container: |
--docker-network | CODENY_RUNNER_DOCKER_NETWORK | bridge | network of job containers |
--cpus | CODENY_RUNNER_CPUS | 2 | CPU limit per container |
--memory | CODENY_RUNNER_MEMORY | 2g | memory 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.
Was this page helpful?