Skip to docs content
Conductor

Cloud workspace environment variables

Variables available to Cloud Computer builds, setup scripts, agents, and terminals

Conductor provides the variables below to cloud workspace setup scripts, agents, run scripts, and cloud terminals. For variables shared with local workspaces, see Conductor environment variables.

Conductor-provided variables

VariableValue in cloud workspacesUse it for
CONDUCTOR_WORKSPACE_NAMEWorkspace display name, when one has been assigned.Naming workspace-specific resources.
CONDUCTOR_WORKSPACE_PATHPath to the repository checkout inside the sandbox.Finding the workspace directory from setup scripts, agents, and terminals.
CONDUCTOR_ROOT_PATHThe same path as CONDUCTOR_WORKSPACE_PATH.Scripts that run in both local and cloud workspaces.
CONDUCTOR_BASE_DIRDirectory containing the workspace.Caches and scratch files outside the repository checkout.
CONDUCTOR_IS_LOCAL0 in cloud workspaces.Choosing local or cloud steps in one project script.
CONDUCTOR_API_URLBase URL for the Conductor API.Calling the Conductor API from a workspace.
CONDUCTOR_API_KEYWorkspace-scoped API key, when Conductor can provide workspace credentials.Authenticating workspace API requests without a personal API key.
CONDUCTOR_SESSION_IDCurrent session ID. Available only in agent processes, not setup scripts or terminals.Passing the optional X-Conductor-Session-Id API header to attribute a request to its session.

With CONDUCTOR_API_URL and CONDUCTOR_API_KEY, an agent or script can call the Conductor API from inside the workspace. The provided key is scoped to the workspace; a user-supplied CONDUCTOR_API_KEY takes precedence. See the Conductor API guide for endpoints and authentication.

Cloud workspaces do not receive CONDUCTOR_PORT. See Forward a development port.

Add your own variables

Set organization-wide values, including secrets, in the Cloud Computer environment.

For values that belong to one repository rather than the whole organization, use environment_variables.cloud in .conductor/settings.toml:

.conductor/settings.toml
"$schema" = "https://conductor.build/schemas/settings.repo.schema.json"

[environment_variables]
API_BASE_URL = "https://api.staging.example.com"

[environment_variables.cloud]
CI = "1"

Repository or personal Cloud variables take precedence over an organization Cloud Computer variable with the same name.

Configure setup for local and Cloud

Cloud and local workspaces use separate setup scripts:

  • Cloud workspaces run the repository's Setup script from organization settings.
  • Local workspaces run scripts.setup from .conductor/settings.toml (or the legacy conductor.json).

To share the implementation, commit a script to the repository and call it from both. Branch on CONDUCTOR_IS_LOCAL for steps that only make sense on your Mac — cloud workspaces run Linux, so Homebrew, Xcode, and other Mac-only tools need a cloud alternative or a local-only branch:

if [ "$CONDUCTOR_IS_LOCAL" = "1" ]; then
  # Local only: read from the separate root checkout on your Mac.
  ln -s "$CONDUCTOR_ROOT_PATH/.env" .env
fi

pnpm install

In a cloud workspace, CONDUCTOR_ROOT_PATH already points to the workspace checkout. Conductor manages git and GitHub CLI authentication, so don't copy GitHub tokens into Cloud Computer variables.

Reserved names

Variable names must be valid shell identifiers. The names and prefixes below belong to the sandbox runtime and cannot be overridden.

Reserved name or prefixReason
HOMEManaged by the sandbox user environment.
PATHManaged by the sandbox shell environment.
PORTReserved for platform runtime behavior.
NODE_PATHReserved for Node.js module resolution.
CONDUCTOR_API_URLSet by Conductor for API routing.
CONDUCTOR_BASE_DIRSet by Conductor for the sandbox directory.
CONDUCTOR_IS_LOCALSet by Conductor to identify cloud workspaces.
CONDUCTOR_ROOT_PATHSet by Conductor for the repository checkout path.
CONDUCTOR_WORKSPACE_NAMESet by Conductor for the workspace name.
CONDUCTOR_WORKSPACE_PATHSet by Conductor for the repository checkout path.
CONDUCTOR_INTERNAL_*Reserved for Conductor runtime behavior.
CONDUCTOR_GIT_AUTH_*Reserved for Conductor-managed Git authentication.

On this page