> For AI agents: the complete documentation index is available at https://docs.hod.sh/llms.txt, the full documentation bundle is available at https://docs.hod.sh/llms-full.txt.

# hod-runner command reference

The same text as `hod-runner <command> --help`. `hod runner start` passes its arguments on to `hod-runner start`. `just cli-docs` generates this page from the command tree: don't edit it by hand.

## hod-runner

```text
Run jobs for a Hod server. `hod runner start` starts it with the server `hod login` saved.

Usage: hod-runner <COMMAND>

Commands:
  start    Run jobs for a Hod server (needs HOD_RUNNER_TOKEN to register)
  version  Print the version
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version
```

## hod-runner start

```text
Run jobs for a Hod server (needs HOD_RUNNER_TOKEN to register)

Usage: hod-runner start [OPTIONS] --server <URL>

Options:
      --server <URL>
          Hod server URL

          [env: HOD_SERVER]

      --name <NAME>
          Name shown for this runner [default: the host name]

      --labels <LABELS>
          Comma-separated labels this runner offers; jobs' runs-on must be a subset [default: the OS and architecture, such as linux,amd64]

      --slots <SLOTS>
          Jobs to run at once

          [default: 1]

      --ephemeral
          Take one job, then exit: the server deregisters the runner when the job ends. Its key stays in memory, and it registers every time, as an autoscaler's runners do with one-time registration tokens

      --work-dir <DIR>
          Where jobs' checkouts and workspaces go [default: a hod-runner directory in the system's temporary directory]

      --network <NETWORK>
          Docker network for job containers, such as host

          [env: HOD_DOCKER_NETWORK]

      --allow-docker
          Run jobs with `docker: true`: each gets a Docker daemon of its own in a privileged container. Only for runners that run trusted pipelines

          [env: HOD_RUNNER_ALLOW_DOCKER]

      --dind-image <IMAGE>
          Image of the Docker daemon `docker: true` jobs get

          [env: HOD_DIND_IMAGE]
          [default: docker:29.9.2-dind]

      --default-image <IMAGE>
          Image for jobs without image: [default: the engine's, debian:12-slim]

      --state-dir <DIR>
          Where the runner keeps its identity (its ID and key) [default: $XDG_STATE_HOME/hod/runner]

          [env: HOD_RUNNER_STATE_DIR]

      --git-protocols <GIT_PROTOCOLS>
          Comma-separated URL schemes jobs' repositories may be cloned with

          [env: HOD_GIT_PROTOCOLS]
          [default: https]

  -h, --help
          Print help

Server options:
      --ca-cert <FILE>
          A CA certificate (PEM) to trust for the server, besides the system's

          [env: HOD_CA_CERT]

      --insecure-http
          Allow plain http to a server on another machine. Tokens then cross the network in the clear: only for networks you trust

          [env: HOD_INSECURE_HTTP]

Examples:
  HOD_RUNNER_TOKEN=hod_reg_… hod-runner start --server https://ci.example.com
  hod-runner start --server https://ci.example.com --labels linux,amd64,gpu --slots 2
  hod-runner start --server https://ci.example.com --ephemeral   take one job, then exit
```

## hod-runner version

```text
Print the version

Usage: hod-runner version

Options:
  -h, --help
          Print help
```
