docs
  1. Storefront Hosting
  2. Configure
  3. Environment Variables

Environment Variables

Environment variables let you securely manage your Storefront Application's configuration - API keys, tokens, host URLs, feature flags, and anything else you want to keep out of your codebase. Variables are scoped per environment, so production credentials stay separate from staging or QA values.

Where to find them

Environment variables for each environment live in HostingSettingsEnvironment Variables. Use the environment selector at the top of the Settings page to switch between environments - each environment has its own independent variable list.

The page lists all variables for the selected environment, each with its key and value. You can search variables by name using the search bar at the top of the list.

Managing environment variables

The Environment Variables tab supports five actions:

  • Create - click + Create Variable to add a new variable. Enter a key and value, then save.
  • Edit - click the pencil icon next to a variable to update its value. Keys cannot be changed once created.
  • Delete - click the trash icon next to a variable to delete it.
  • Import - bulk-import variables from a .env file or by pasting .env-formatted content directly.
  • Export - export all variables for the current environment as a single file, useful for backup or migration.

Importing variables

The Import feature accepts standard .env file format. You can either upload a file directly or paste the content into the dialog.

Example .env format:

The dialog parses the content and shows how many variables will be imported before you confirm.

Changes require a redeployment to take effect. When you create, update, remove, or import variables, the change is saved but not yet active in the running application. A banner appears prompting you to redeploy your Storefront Application. Click Deploy in the banner and follow the standard deployment flow.

Initialization on environment creation

When you create a new environment, the Initialize environment variables option seeds the new environment with the default set of variables the Storefront Application requires to run.

If you left this option unchecked when creating an environment, the variable list will be empty and you'll need to add the required variables manually before deployments succeed.

Modifying or removing seeded variables can break your deployment. Seeded variables exist for a reason - they're what the Storefront Application needs to function. Unless you know what a specific seeded variable controls, leave it as-is. If you're unsure, check with your SCAYLE Account Manager.

See Environment for details on creating environments and what gets initialized.

Limits

Each environment supports up to 200 environment variables. If your use case requires more, reach out to your SCAYLE Account Manager - limits can be raised on request.