# Environment variables for production and previews

Give a variable one value in production and another in pull request previews.

Canonical URL: https://unbroker.cloud/changelog/2026-10-06-environment-scoped-variables
Published: 2026-10-06
Tags: Apps

## Related reading

- [Cloud Apps](https://unbroker.cloud/deploy)
- [Deploy from Git](https://docs.unbroker.cloud/guides/deploy-from-git)

Every environment variable, at the service or the project level, now has a scope: **All**, **Production** or **Preview**. A value scoped to an environment overrides the **All** value with the same key, so you can point previews at a staging database or a test API key without touching production.

![The Environment variables tab with shared, Production and Preview groups](https://unbroker.cloud/_astro/environment-variables.aVYM0nYP.png)

Existing variables keep working as before: they are scoped to **All**.

PR previews also got sturdier. A preview that was interrupted halfway is picked up again, and closing a pull request tears down its whole stack cleanly.
