Skip to main content

Setting environment variables

There are 3 ways to set environment variables in a sandbox:

1. Global environment variables

You can set global environment variables when creating a sandbox.

2. Setting environment variables when running code

You can set environment variables while running specific code in the sandbox.
If a global environment variable has the same name, it will be overridden.

3. Setting environment variables when running commands

You can set environment variables while executing specific commands in the sandbox.
If a global environment variable has the same name, it will be overridden.
Last modified on June 24, 2026