Skip to main content
Environment variables fall into different scopes. Keep client credentials in your local process or secret manager, pass machine secrets explicitly with envs=, and avoid writing provider keys into machine files.

Client Auth And Endpoint

The SDK and CLI also accept explicit api_key= and base_url= arguments when per-process overrides are safer than ambient environment variables.

Bash Or Zsh

PowerShell

Project .env

The SDK and CLI lookup order is documented in SDK config.

Machine Create-Time Env Vars

Pass runtime values into a machine with Machine.create(envs={...}):
Create-time env vars are visible to processes inside that machine. They are not stored in your local SDK config and should not be confused with NULLSPACE_API_KEY, which authenticates the client to the Nullspace API.

Per-Command Env Vars

Pass short-lived command values with machine.commands.run(envs={...}):
Per-command env vars are added to that process environment only. They do not change the machine default environment for later commands.

Agent Deployment Runtime Env Vars

Agent deployment config stores env var names only:
Pass values when you start runtime work. Python SDK calls accept envs=, and the CLI accepts --env NAME=value plus --env-file on agent run, service-starting agent url, agent restart, and agent dev.
Runtime values are injected into the agent process and are not stored in deployment config, run rows, service rows, or platform-owned event metadata. Application code can still print secrets to stdout/stderr or write them to files, so treat .env files and runtime logs as sensitive material. Agent deployment permissions are declared separately in [permissions]. Use that section for internet access, outbound allow/deny rules, service public URL policy, failed-run retention, and resource ceilings. Do not use env vars to grant host filesystem or control-plane access to agent code. There is no deployment secret store in P0. Future secret_ref objects are reserved for a brokered secret system, but current runtime env values must be literal request-time strings supplied by the SDK, CLI, or local process environment.

Template Env Vars

Template builder env vars and runtime defaults are separate: Start-ready commands do not receive create-time env vars unless the template defines them as runtime defaults. See Start-ready commands.

Code Interpreter Env Vars

Code interpreter runs can receive execution-specific values:
Use this for run IDs, non-secret options, and short-lived task configuration.

Agent Provider Secrets

Coding-agent templates receive only the provider keys you pass at machine create time:
Avoid writing provider keys into /workspace, shell history, logs, or template files. Rotate keys if a machine or log stream exposes them.

Console Sessions

The console is API-key based for the hosted private beta and the self-hosted single-host appliance. Users normally do not need to set local environment variables for console sessions. Deployment operators embed these values at console build time. Single-host appliance builds use infra/deploy/console.single-host-oss.env.example.

Auth Email Delivery

Signup verification, password reset, magic-link, and email-change messages are sent by Supabase Auth through Google SMTP relay. Configure the relay in infra/supabase/config.toml for local Supabase and in the hosted Supabase Dashboard Custom SMTP settings. These SMTP values are not read by nullspace-api. This plumbing is dormant while the private-beta console is beta-key-only.

Supabase Auth Providers

Local Supabase reads GitHub and Google OAuth client IDs and secrets from infra/supabase/config.toml via SUPABASE_AUTH_EXTERNAL_GITHUB_CLIENT_ID, SUPABASE_AUTH_EXTERNAL_GITHUB_SECRET, SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID, and SUPABASE_AUTH_EXTERNAL_GOOGLE_SECRET, but the local provider sections stay disabled until explicitly enabled for an OAuth smoke. Hosted deployments configure the same providers in the Supabase Dashboard. OAuth is not visible in the current beta-key-only console. Operators should only enable it after NULLSPACE_SELF_SERVE_AUTH_ENABLED=true, API/console OAuth flags, and Supabase-native CAPTCHA/hooks are configured.

Feature-Specific Vars

Operator Variables

The full deployment matrix lives in the repository at docs/product/reference/env-vars.md, with the supported OSS appliance profile in infra/deploy/single-host-oss.env.example. Public docs intentionally keep hosted SDK variables separate from operator configuration.