Runner environment - paths and environment variables
Where RunsOn runners keep the job workspace, tool cache, and RunsOn files, and which environment variables every job receives.
Linux runners follow the GitHub-hosted runner layout wherever a workflow can depend on it. Windows runners keep the self-hosted layout. This page lists the paths a job sees and the environment variables RunsOn adds to every job, on Linux and Windows, for both Flex and Fleet.
Paths#
| Linux | Windows | |
|---|---|---|
| Runner work folder | /home/runner/work | C:\actions-runner\_work |
GITHUB_WORKSPACE | /home/runner/work/<repo>/<repo> | C:\actions-runner\_work\<repo>\<repo> |
RUNNER_TEMP | /home/runner/work/_temp | C:\actions-runner\_work\_temp |
| Job user and home | runner, /home/runner | Administrator |
RUNNER_TOOL_CACHE | /opt/hostedtoolcache | Set by the image |
RunsOn files (RUNS_ON_HOME) | /runs-on | C:\runs-on |
| Sticky disk mount | /mnt/runs-on/stickydisk | C:\runs-on\stickydisk |
EFS mount (extras=efs, Flex only) | /mnt/efs | Not available |
tmpfs volume (extras=tmpfs) | /mnt/tmpfs | Not available |
On instance types with local NVMe, the same paths stay in place; RunsOn moves their storage, not their location.
Linux workspace#
Linux jobs run under /home/runner/work, the same directory as on GitHub-hosted Linux runners. Tools that record absolute paths, such as test reporters that write sharded blob reports or coverage files, therefore produce artifacts that a job on a GitHub-hosted runner can consume, and the other way round. You can move one job of a producer and consumer pair to RunsOn without moving the other.
/home/runner/_work remains available as a link to /home/runner/work, so preinstall hooks, scripts, and workflows that hardcode it keep working. Tools still report the /home/runner/work path in their output.
Windows workspace#
Windows jobs run under C:\actions-runner\_work. GitHub-hosted Windows runners use D:\a, so absolute paths recorded on one do not resolve on the other.
Environment variables#
RunsOn sets these variables in every job, in addition to the variables GitHub sets ↗. It writes them to GITHUB_ENV when the job starts, so a step’s env overrides them, but workflow- and job-level env do not.
| Variable | Example | Description |
|---|---|---|
RUNS_ON_VERSION | v3.5.0 | RunsOn release that launched the runner. |
RUNS_ON_STACK_NAME | runs-on | RunsOn stack that launched the runner. |
RUNS_ON_RUNNER_NAME | runs-on--i-0123456789abcdef0--… | Runner name registered with GitHub. |
RUNS_ON_INSTANCE_ID | i-0123456789abcdef0 | EC2 instance ID. |
RUNS_ON_INSTANCE_TYPE | c8i.large | EC2 instance type. |
RUNS_ON_INSTANCE_LIFECYCLE | spot | spot or on-demand. |
RUNS_ON_INSTANCE_LAUNCHED_AT | 2026-10-08T10:31:41Z | Time RunsOn scheduled the runner for the job, in RFC 3339. |
RUNS_ON_AMI_ID | ami-0123456789abcdef0 | AMI the instance booted from. |
RUNS_ON_AGENT_ARCH | x64 | Runner architecture. |
RUNS_ON_AWS_REGION | us-east-1 | AWS region of the runner. |
RUNS_ON_AWS_AZ | us-east-1a | Availability zone of the runner. |
RUNS_ON_S3_BUCKET_CACHE | runs-on-s3bucketcache-… | Stack cache bucket. See Docker caching. |
RUNS_ON_S3_CACHE_REPO_PREFIX | cache/repo/<owner>/<repo> | Per-repository prefix in the cache bucket. |
RUNS_ON_HOME | /runs-on | Directory holding RunsOn files on the runner. |
RUNS_ON_AGENT_USER | runner | Linux job user. Windows jobs run as Administrator. |
Set by features#
| Variable | Set when | Description |
|---|---|---|
ACTIONS_CACHE_URL, ACTIONS_RESULTS_URL, ACTIONS_CACHE_SERVICE_V2 | extras=s3-cache | Point actions/cache and compatible tools at the runner’s S3-backed cache. |
RUNS_ON_ECR_CACHE | Ephemeral registry enabled on the stack | Ephemeral ECR registry URI. With extras=ecr-cache on Linux, Docker is already logged in to it. Without the extra, or on Windows, only step shells on the host see it, not the env context or job containers. |
RUNS_ON_ECR_PULL_THROUGH_CACHE | Pull-through cache rules configured on the stack | ECR registry host of the pull-through cache. With extras=ecr-pull-through on Linux, Docker is already logged in to it. Without the extra, or on Windows, only step shells on the host see it, not the env context or job containers. |
RUNS_ON_EFS_ID | EFS enabled on the stack (Flex only) | EFS file system ID. |
RUNS_ON_STICKYDISK_DIR, RUNS_ON_STICKYDISK_NAME, RUNS_ON_STICKYDISK_READY_FILE, RUNS_ON_STICKYDISK_UNAVAILABLE_FILE | Sticky disk requested | Sticky disk mount and readiness files. |
RUNS_ON_POOL_NAME, RUNS_ON_POOL_STANDBY_TYPE | Job served by a warm pool | Pool name, and hot or stopped. |
TRACEPARENT | Job traces exported with OpenTelemetry | Trace context of the job, so spans your workflow sends join the job’s trace. |
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL | Local OpenTelemetry collector running | Loopback OTLP/HTTP receiver. RunsOn keeps them out of GITHUB_ENV, so env at any level overrides them. Job containers do not receive them. |
GITHUB_SERVER_URL, GITHUB_API_URL, GITHUB_HOST | GitHub.com or GHE.com | Set for tools such as the Copilot coding agent that expect them on self-hosted runners. GitHub Enterprise Server keeps the runner’s own values. |
Other RUNS_ON_* variables you may see in a job are internal to RunsOn and can change between releases.