Skip to content

Environments: staging and production ​

Updated: 16 November 2026

Besides production, a project can have up to three environments, for example staging and dev. Each environment has its own services, its own secrets, its own budget, its own hostnames and its own private network. What you try out in staging does not touch production. Once a version has been checked there, promote_deployment takes exactly those images into production.

Create an environment ​

text
create_environment(project="shop", name="staging")

The environment gets the slug shop-staging and takes over the project's runtime class and budget. After that, every project tool also takes environment:

text
set_secrets(project="shop", environment="staging", service="api", set={"DATABASE_URL": "…"})
plan_deployment(project="shop", environment="staging", contract={…})
get_project(project="shop", environment="staging")

Instead of project + environment you can also pass the environment's slug as project, i.e. project="shop-staging". Without environment, production is always meant, i.e. the project itself. get_project(project="shop") lists the environments under environments.

Names: 2–12 characters from a-z, 0-9 and -, not production. Environments do not count as projects; their services count towards the account's service limit like all others (limits).

What is separate per environment ​

Production (shop)Staging (shop-staging)
Services and contractsownown
Secretsownown, never copied
Hostnameweb-shop.apps.helfinity.cloudweb-shop-staging.apps.helfinity.cloud
Private networkapi.shop.internalapi.shop-staging.internal
Custom domainse.g. shop.dee.g. staging.shop.de
Budget, emergency stop, volumes, bucketsownown

Secrets are deliberately not copied: staging should hold test credentials, for example its own database and the payment provider's test keys. In the portal under Agents → Rights you can bind an agent connection to one environment. That agent then cannot reach production and its secrets. A connection bound to the project may work in all of its environments.

Promote from staging to production ​

text
promote_deployment(project="shop", from="staging")

The tool only plans; the rollout is done with apply_deployment as always:

  • Every service whose last deployment in staging ended healthy and that is running or sleeping is taken over. Narrow it down with services; choose a target environment other than production with to.
  • Only the image changes (as a digest, i.e. exactly the one checked in staging). Size, env, secrets, domains and budget stay those of production. Auto-deploy is switched off for promoted services.
  • If a service does not yet exist in production, it comes with the settings from staging, its own hostname and no custom domains. The plan then warns with SERVICE_ADDED_FROM_SOURCE or CUSTOM_DOMAINS_NOT_COPIED.
  • If production lacks secrets the service needs, the plan fails as with plan_deployment. Set them beforehand with set_secrets without environment.

Tips for test environments ​

  • Small sizes and availability.scale_to_zero: true: a sleeping service costs nothing while it sleeps (scale-to-zero).
  • Public services require an account login by default (access: account). For staging that is usually exactly right.
  • The hint "More memory booked than used" does not appear in the portal for environments outside production, because a test environment often runs without load. Warnings about too little memory remain.

Delete an environment ​

text
delete_project(project="shop", environment="staging", confirm_slug="shop-staging")

As for the project, this needs an approval in the portal; volumes and secrets are kept for 7 days. When the project is deleted, its environments go with it.