Skip to content

Environment variables

Project environment variables are key-value pairs delivered to everything that runs the project's code: every sandbox of the project — both the agent's shell and the application it builds and runs — and the published app. Use them for anything your app needs at runtime that shouldn't be hard-coded: third-party API keys, service URLs, feature flags.

How they reach your app

Variables are injected into each sandbox at launch, in two forms:

  • as ordinary process environment variables, so process.env.STRIPE_KEY, os.environ["STRIPE_KEY"], and shell $STRIPE_KEY all work, and
  • as one file per variable under /etc/crios/project-env/, for tools that prefer reading secrets from files.

A published app receives them too: every publish delivers the current values to each app container as environment variables, and saving new values pushes them to the live app, which rolls onto them without a republish. See Publishing your app.

Values are stored in the platform's secret store (Vault) and delivered straight to the container; they are never written to the database. A sandbox that is already running keeps the values it started with — changes reach sandboxes the next time one starts.

Managing variables

In project settings, under Environment Variables:

  1. Click Add Variable.
  2. Enter a NAME — letters, digits, and underscores, not starting with a digit, up to 128 characters (for example STRIPE_KEY, API_BASE_URL).
  3. Enter the value (up to 32 KB).
  4. Optionally tick Sensitive (see below).
  5. Click Save Changes at the bottom of the page.

A project can hold up to 100 variables. Rows can be edited at any time or removed with the trash button (Remove variable); removing a variable and saving deletes it from the store. Duplicate or invalid names are refused when you save, with a message naming the problem.

Editing variables takes editor access to the project. If the secret store is unreachable, the section says so — "Secret storage is unavailable right now — environment variables cannot be edited until it recovers." — and the rest of the settings still save.

Sensitive variables

Tick Sensitive for secrets — API keys, tokens, passwords. Sensitive values are write-only:

  • The value is masked while you type (the eye button, Show value / Hide value, reveals what you are typing), and after saving it is never shown again — the field displays a •••••• saved — leave blank to keep placeholder instead.
  • API responses never include sensitive values after they are saved.
  • To rotate a sensitive value, type the new value over the placeholder and save. Leaving it blank keeps the stored secret.
  • To convert a sensitive variable to a visible one you must type a fresh value — the platform refuses to expose a value that was saved as sensitive.

Warning

Treat sensitive values with care even inside Crios. The agent and the app it runs can read every project variable — that's the point — so only put credentials here that this project is supposed to use, scope third-party keys as narrowly as the provider allows (test keys, restricted keys), and rotate anything you suspect leaked. Never paste credentials into the session chat; chat content is part of the session record, while sensitive variables are masked and write-only.

Variables Crios adds to the list

Crios puts a few variables in the project's list itself, generated when they are first needed, such as the first time a sandbox of the project starts:

  • SESSION_SECRET (sensitive) — a random secret, so the app being built and the published app sign their sessions with the same key. When you publish, Crios derives the app's other signing keys from it (JWT_SECRET, AUTH_SECRET, NEXTAUTH_SECRET, BETTER_AUTH_SECRET, SECRET_KEY_BASE, DJANGO_SECRET_KEY), except any the project sets itself. To rotate it, type a new value over it and save.
  • APP_OWNER_EMAIL and APP_OWNER_PASSWORD (only the password is sensitive) — the sign-in of your app's first administrator. The email is the project owner's to begin with (owner@example.com when Crios finds no owner's email), and you can change it here; the password is generated, and you read or change it under Your app's sign-in.

Removing one of these rows does not delete it: a save that leaves them out keeps them.

Variables Crios provides

Some variables reach the sandbox and the published app without appearing in the list:

  • DATABASE_URL, and DATABASE_URL_<NAME> for each named database — the project's databases. See Project databases.
  • UPLOADS_DIR — the folder where the app should keep the files its users upload. A published app that uses it gets a volume that keeps those files across restarts and republishes; see Storage.
  • AI_BASE_URL, AI_API_KEY, and AI_MODEL — an OpenAI-compatible AI endpoint the app can call, where the installation offers one (app.crios.ai does; elsewhere it is off unless the installation turns it on). Each app gets its own key, limited to 30 requests a minute and 200,000 tokens a day in a sandbox, and 60 requests a minute and 1,000,000 tokens a day once published; its usage counts toward your organization's AI quota. Unpublishing revokes the published app's key. A project that sets AI_API_KEY or AI_BASE_URL itself keeps its own provider.
  • PGSSLROOTCERT and NODE_EXTRA_CA_CERTS — the certificate authority of the project's database, where the database has one of its own, so the app's driver can verify the encrypted connection.

Typical uses

  • Third-party API keys for the app being built — payment providers, email services, maps, LLM APIs your product calls.
  • Runtime configuration — APP_BASE_URL, feature flags, log levels, OAuth client IDs.
  • Test credentials — a seeded demo login the agent can use when it verifies flows in the browser.

Variables the agent might need to understand are worth mentioning in your session prompt ("use the STRIPE_KEY env var for Stripe calls") — the agent sees the variable names in its environment, and naming them removes any guesswork.

What these variables are not

Project environment variables configure your application's runtime. They do not configure Crios itself — AI provider credentials, model selection, and integration secrets are managed by organization owners and admins on the Organization page, not here. See Providers.