Skip to content

Environment Variables ​

This page lists the environment variables used by the module, CLI, and runtime utilities.

Development Tenant ​

These are required for auto-bootstrap and the CLI commands that operate on your development tenant.

VariableDescription
C8Y_BASEURLCumulocity base URL, for example https://example.cumulocity.com
C8Y_DEVELOPMENT_TENANTDevelopment tenant ID
C8Y_DEVELOPMENT_USERDevelopment user name
C8Y_DEVELOPMENT_PASSWORDDevelopment user password

C8Y_NITRO_-Prefixed Variants ​

Each development tenant variable also accepts a C8Y_NITRO_-prefixed variant that takes precedence over the unprefixed name:

UnprefixedPrefixed Variant
C8Y_BASEURLC8Y_NITRO_BASEURL
C8Y_DEVELOPMENT_TENANTC8Y_NITRO_DEVELOPMENT_TENANT
C8Y_DEVELOPMENT_USERC8Y_NITRO_DEVELOPMENT_USER
C8Y_DEVELOPMENT_PASSWORDC8Y_NITRO_DEVELOPMENT_PASSWORD

Use the prefixed names when a shared env file (for example at a monorepo root, see envFile) also serves other tools that read generic C8Y_* variables - the prefixed values are unambiguously for c8y-nitro and win when both are set.

Bootstrap Credentials ​

These are written by auto-bootstrap or by the bootstrap CLI command.

VariableDescription
C8Y_BOOTSTRAP_TENANTTenant ID for the microservice bootstrap user
C8Y_BOOTSTRAP_USERBootstrap user name
C8Y_BOOTSTRAP_PASSWORDBootstrap user password

Runtime client and credential utilities rely on these values to access subscribed tenant credentials.

Runtime Config Overrides ​

Nitro runtime config values can be overridden through environment variables.

VariableDescription
NITRO_C8Y_CREDENTIALS_CACHE_TTLOverrides c8y.cache.credentialsTTL
NITRO_C8Y_DEFAULT_TENANT_OPTIONS_TTLOverrides c8y.cache.defaultTenantOptionsTTL

Values are in seconds.

Where They Are Loaded ​

Both dev mode and the CLI load env files in this order (later wins): files configured via c8y.envFile, then the project's own .env, then .env.local. Real environment variables always win over file values, and C8Y_NITRO_-prefixed variants win over their unprefixed counterparts.

The CLI loads project config and env files before validating required variables. During development, auto-bootstrap writes generated bootstrap credentials back into the project's own env file (never into a shared envFile entry) and also updates process.env so the current process can continue immediately.

Released under the MIT License.