System variables
The variables Gigadrive Network sets in your build and in every Function, plus the name prefixes it keeps for itself.
Gigadrive Network sets a handful of variables itself, on top of the ones you configure. They are applied after yours, so any name in the following tables holds the platform's value inside a Function no matter what you stored.
In a running Function
| Variable | Value | Present |
|---|---|---|
GIGADRIVE_APPLICATION_ID | The application's UUID | Every Function |
GIGADRIVE_DEPLOYMENT_ID | The deployment's UUID | Every Function |
GIGADRIVE_URL | https:// plus the deployment's own hostname | Every Function |
GIGADRIVE_CLIENT_ID | Client id of this deployment's workload identity | Every Function |
GIGADRIVE_CLIENT_SECRET | Client secret of the same identity | Every Function |
GIGADRIVE_API_BASE_URL | Base URL of the Gigadrive Network API | When the platform has an API base URL configured |
GIGADRIVE_API_URL | The same value as GIGADRIVE_API_BASE_URL | Alongside GIGADRIVE_API_BASE_URL |
GIGADRIVE_URL names the immutable per-deployment hostname, not your production URL, so a preview deployment and a production deployment each see their own address. Use it to build absolute callback URLs that keep pointing at the deployment that issued them.
GIGADRIVE_CLIENT_ID and GIGADRIVE_CLIENT_SECRET are an OAuth client the platform mints for this deployment. @gigadrive/sdk reads both with no configuration, so new GigadriveClient() inside a Function authenticates as that deployment against a narrow set of scopes. OIDC federation covers what it can and cannot reach. Treat the secret like any other credential and keep it out of logs and client bundles.
In a build
| Variable | Value | Yours can replace it |
|---|---|---|
PROJECT_DIRECTORY | Absolute path of your project in the build sandbox | Yes |
VERCEL | 1 | Yes |
NITRO_PRESET | node-server | Yes |
CI | true | Yes |
NPM_CONFIG_YES | true | Yes |
npm_config_cache, npm_config_store_dir, YARN_CACHE_FOLDER, BUN_INSTALL_CACHE_DIR | Package manager cache directories on the build cache volume | Yes |
GIGADRIVE_DEPLOYMENT_ID | The deployment's UUID | No |
VERCEL is set because a long tail of ecosystem packages branch on it. NITRO_PRESET is pinned so a Nitro or Nuxt build keeps writing to .output rather than switching to a hosted-platform layout.
Your variables are applied between the two halves of that table, which is why the last row cannot be replaced. The reserved prefix means you could not have set it in the first place.
Reserved prefixes
You cannot store a variable whose name starts with GIGADRIVE_, GD_, NEBULA_ or __. The check upper-cases the name first, so gigadrive_token is rejected too, with Environment variable key cannot start with reserved prefix "GIGADRIVE_".
The console applies the same check while parsing an imported .env file, so a template that ships a reserved name is flagged on the offending line before you submit anything.
PORT and HOST are not reserved
Both names are accepted, so a framework template shipping PORT=3000 imports cleanly. The platform picks the port
your Function listens on and overrides both values at runtime, which means storing them changes nothing. Read PORT
if your server needs to bind one.
