Environment Variables
The environment variables page lets you add, change, remove and copy the installation’s environment variables.
process.env.
Values at declaration time
A declaration that needs configuration, such as a receiver’s endpoint, reads it withenv:
bijection/crm.ts
env(name, fallback?) reads the variable name when the declarations are
evaluated: on deploy, the installation’s environment variable of that name (set
it with bijection env set CRM_URL https://crm.example.com); in a local
bijection check, the shell’s. Without a fallback, an unset variable refuses
the deploy. Pass the name as a string literal: the CLI supplies the variables
the source names, and bijection check --definition-inputs <file> overrides
them from a JSON map.
The lock records the variable name as env CRM_URL. Deploy records the value
it evaluated in the installation’s program fact. Use
secrets for credentials.
env("NAME") in the installation bindings file, in a provider’s parameters or a sync
destination’s configuration, is different: it stays a reference, and the host
resolves it from the installation’s environment variables when it prepares
the deploy, for a deploy from your machine and a hosted build alike. The
deploying shell’s variables are never read. A variable with no value refuses
the deploy with PlacementUnavailable (InputMissing) on the slot that needs
it, and a changed value takes effect at the next deploy. See
placement.
Sign-in issuers are evaluated at deploy and appear in the lock with their
resolved audience, key source and trust settings. A deploy applies the
staged configuration with its reviewed program. Use bijection deploy --trial
to see changes to declaration inputs.
Setting environment variables
Under Installation Settings in the console, you can see a list of environment variables in the current installation.

Using environment variables in dev and prod installations
Since environment variables are set per-installation, you can use different values for the same key in dev and prod installations. This can be useful for when you have different external accounts you’d like to use depending on the environment. For example, aMAIL_FROM variable can name a different sender address in dev
and prod.
If you expect an environment variable to be always present in a function, you
must add it to all your installations, with the value each installation needs.
Configuring a mounted app
A mountable app is a function from its capabilities toapp(...), so an
installer passes configuration as arguments when it calls the app at a path
in its tree, and needs no environment variable for it:
secret() in the tree
and set its value as an operator with bijection secret set <path>. See
Secrets.
System environment variables
The following environment variables are always available in Bijection functions:BIJECTION_CLOUD_URL- Your installation URL (eg.https://dusty-nightingale-847.bijection.cloud) for use with Bijection clients.BIJECTION_SITE_URL- Your installation’s HTTP URL (eg.https://dusty-nightingale-847.bijection.run), where route reactions are served
Project environment variable defaults
You can set up default environment variable values for a project in Project Settings.

bijection env default.