rk environment variables

The documented RK_* environment variables that rk reads. The Commands column links to the command reference pages that list each variable; commands without a reference page are not linked yet.

Variables

RK_RCE_TOKEN

The Roku Cloud Emulator (RCE) token. When set, it takes precedence over the token saved by rk device set-rce-token. That suits CI, where the token comes from a masked variable.

RK_RCE_API_URL

Points rk at another RCE Core API (an https host under rce.roku.com, or 127.0.0.1, [::1] or localhost on any port, for testing). The default is https://api.rce.roku.com/api/v1. A value that is not a URL is reported by the variable's name, without echoing it.

RK_RCE_NO_LIFECYCLE

Set to 1 by rk server in the processes it spawns: they use running RCE devices but never start or stop one. Not meant to be set by hand.

RK_RCE_IDLE_STOP_MINUTES

rk server: minutes without use before a device_start RCE device is stopped (default 15, 0 off).

RK_DISABLE_RATE_LIMIT

Set to 1 or true to disable the rk server request rate limiter; rk server start --no-rate-limit sets it to 1. It is read once at startup, so a server that is already running has to be restarted for it to matter.

RK_RATE_LIMIT_MAX

Overrides the rk server maximum requests per rate-limit window; rk server start --rate-limit-max sets it. An invalid value warns and falls back to the default.

RK_RATE_LIMIT_WINDOW_MS

Overrides the rk server rate-limit window length in milliseconds; rk server start --rate-limit-window sets it. An invalid value warns and falls back to the default.

RK_DEVICE_POOL

The device pool provider kind (local or a custom kind registered with registerDeviceProvider) that rk device lease and rk device pool status use when --pool is not given. Without it, the kind is local.

RK_DEVICE_POOL_PROFILE

The profile name from .roku/profiles.json that rk device lease acquire uses when --profile is not given. Without it, the profile is ci-default.

RK_DEVICE_LEASE_DIR

The directory <id>.json device lease files live in when --lease-dir is not given. Without it, they live in <cwd>/.roku/leases.

RK_DEVICE_LEASE_ID

The lease id rk device lease release releases when --lease-id is not given. If neither is set, the verb exits 1 with MISSING_LEASE_ID.

RK_DEVICE_IP

Pins a specific device IP for a run, with no custom device pool provider required. It cannot be combined with a non-local RK_DEVICE_POOL.

RK_DEVICE_PASSWORD

When rk device lease acquire on the local pool is given no --password-ref and this variable is non-empty, the lease's passwordRef is env:RK_DEVICE_PASSWORD, so no plaintext password is written to disk.

RK_ALLOW_LITERAL_PASSWORD

Set to 1 to allow a literal:VALUE lease passwordRef, which embeds the password directly. It is allowed only on the local pool.


Did this page help you?