Projects & environments
Projects (/projects) group the things that make up one product, from any server,
into environments such as production and staging. A project might hold the API
container and its PostgreSQL database on one box, the marketing site on another, and a
staging copy of both. Projects are on every plan and unlimited. Shared
variables and environment clones need Pro.
A project is an organizing layer on the control plane. Adding something to a project, moving it between environments, or deleting a project never changes or deletes the app, site or database on its server.
The model
Section titled “The model”- A project has one or more environments (up to 20). Each environment has a
kind:
production,staging,preview,developmentorcustom. A new project starts with a protected production environment. - An environment holds resources: apps, stacks, sites and databases, each
identified by its server, kind and name (an app or stack name, a site domain, or a
database as
<engine>:<name>, for examplemariadb:shop). - A resource belongs to at most one environment of one project.
- A protected environment makes the dashboard ask twice before destructive actions. The API does not enforce it, so an AI agent should confirm with the person first.
Create a project, step by step
Section titled “Create a project, step by step”- Open Projects in the sidebar and click New project. Give it a name and, optionally, a description, color and icon.
- Open the project. Use Add resources to file existing apps, stacks, sites and databases into an environment, or to deploy a new app or stack straight into it.
- Add more environments from the ⋯ menu (Environments…). You can also pick a
project from any row on
/sitesor/apps. - The project page lists its resources by type (Sites, Apps, Stacks, Databases) with live status from each server. A resource’s environment is the colored badge on its row; pick another badge to move it.
Rows open the usual drawers: apps and stacks open their detail and edit drawers (and Move to server…, see Moves & clones), sites open the site shell, databases open the server’s Databases page.
Shared variables
Section titled “Shared variables”Shared variables are environment variables you define once and apply to many apps and stacks (Pro). There are three scopes, from widest to narrowest:
- Organization variables (Settings > Organization variables) reach only projects that have inherit org variables turned on.
- Project variables apply to every app and stack in the project.
- Environment variables apply to one environment.
Narrower scopes win, and an app’s own env value wins over all of them. Values are sealed; new keys are secret by default. Up to 200 keys per scope, single-line values.
Changes are staged: nothing reaches the servers until you Apply. Applying
recreates each changed container (a brief restart), and offline servers get the new set
when they reconnect. Each resource then shows a sync status: synced, pending,
applying, out_of_sync or failed.
Clone an environment
Section titled “Clone an environment”Clone staging.{domain} ({domain} and {env} are placeholders).
Copies can land on each source’s server or all on one target server. Progress appears in
the project’s status area.
Automate it
Section titled “Automate it”REST and MCP are on every plan. Project operations span servers, so a token limited
to a server allowlist is refused (fleet_wide).
| Task | MCP tool | REST |
|---|---|---|
| List projects | projects_list | GET /v1/projects |
| Which project each resource is in | projects_resources | GET /v1/projects/resources |
| One project with live status | projects_get | GET /v1/projects/{id} |
| Create / edit / delete | projects_create (name), projects_update, projects_delete (level full) | POST /v1/projects, PATCH/DELETE /v1/projects/{id} |
| Environments | projects_environment_create, projects_environment_update, projects_environment_delete | /v1/projects/{id}/environments[/{envId}] |
| File resources into an environment | projects_resources_set (resources: [{serverId, kind, ref}], 1 to 100) | PUT /v1/projects/{id}/environments/{envId}/resources |
| Take a resource out | projects_resource_remove | DELETE /v1/projects/{id}/resources/{rid} |
| Shared variables | env_vars_list, env_vars_set (Pro), env_vars_delete | GET/PUT /v1/env-vars, DELETE /v1/env-vars/{id} |
| Apply variables | projects_env_apply (Pro), then projects_env_status | POST /v1/projects/{id}/env/apply |
| Preview the merged set | projects_env_preview (?resource= or ?environmentId=) | GET /v1/projects/{id}/env/preview |
| Clone an environment | projects_environment_clone (Pro, backups:restore), projects_environment_clones, projects_environment_clone_get | POST /v1/projects/{id}/environments/{envId}/clone |
A typical AI workflow:
projects_createwith{ "name": "shop" }and keep the returned production environment id.projects_resources_setwith the app, its database and the site.env_vars_setwith{ "scope": "project", "projectId": "…", "vars": [...] }(ordotenv), thenprojects_env_applyandprojects_env_status.- For staging:
projects_environment_clonewithdryRun: trueto show the planned names and domains, then again without it, then pollprojects_environment_clone_get.
When you deploy a new app or stack yourself, pass ?environmentId= on the deploy to
file it straight into an environment.
Gotchas & troubleshooting
Section titled “Gotchas & troubleshooting”409 resource_in_project. The resource is already in another project (details.conflicts). Remove it there first.409 name_taken,409 environment_limit,409 last_environment. Duplicate name, more than 20 environments, or deleting the only environment.- Variables didn’t change the app. They are staged until applied. Run
projects_env_applyand checkprojects_env_status. 400 too_many_vars/value_required. More than 200 keys in one scope, or a new key without a value.- Clients never see project names. An app shared with a client appears in their “Shared with you” list without its project.
Related
Section titled “Related”- Apps · Docker apps & stacks
- Moves & clones: move an app or stack between servers.
- Staging & deploys: deploys, previews and site clones.