global-environments experimental flag: set APP_EXPERIMENTAL=global-environments on the control plane (see Experimental features). Existing per-project environments keep working with or without it.
Built-in environments
Four environments exist on every instance and cannot be deleted.Kinds
Every environment has a kind:dev, test, uat, production, preview or custom. Kinds are what IAM policies and AI control match on, so a rule like “deny deploys on environment-kind:production” covers every production-kind environment, whatever its name.
preview is reserved for the environments Levelrail creates for pull request previews. You cannot create one, and you cannot change an environment to or from that kind.
Create and manage
- A built-in environment cannot be deleted (403).
- An environment that still has apps or databases cannot be deleted (409) unless you pass
--move-to, which moves them to another environment first. - A bulk move with
--move-tois refused if the source or the destination is protected. Move those one at a time so each gets its approval.
Move an app or database
"") to remove the tag. In the dashboard, use the Change button next to the environment on the app’s Overview.
A move into or out of a protected environment works differently:
- Without
--confirmthe request is refused with 409 and nothing changes. - With
--confirmit becomes a pending approval instead of moving right away. - A different person with the
deployability approves it (Deploy approvals, orlevelrail-cli deploy-approvals). The person who asked cannot approve their own request. - Only then does the app or database move.
Protection
Mark an environment as protected to put deploys and moves behind approval:Switcher and filters
With the flag on, the dashboard header has an environment switcher. Choosing an environment filters the apps, databases, deployments and approvals lists, and the choice is remembered in your browser and reflected in the URL as?environment=.
The same filter works on the API and CLI. It accepts an environment id or name:
Environment variables
Per-environment variables and secrets work for these environments the same way they do for project environments. See Projects and organizations if you use per-project environments too.API
Create takes
{"name", "kind", "protected", "sort_order"}. A move takes {"environment_id", "confirm", "override_freeze", "override_reason"} and answers 409 (needs confirmation), 202 with a pending approval, 423 (freeze) or 200.
Next steps
Access control
Roles, guest visibility and policies per environment.
AI control
Limit agents to chosen environment kinds.