Koo Docs
View as Markdown

Clone an environment

Cloning copies an environment's shape into a new environment in the same project — the fastest way to stand up a staging twin of production. This page covers what a clone copies, what it never copies, and the steps.

What a clone copies

  • Every service, with its full configuration: source, CPU and memory, mode, and runtime settings.
  • Each service's locations. A location no longer available to your account is dropped from the copy.
  • Ordinary variables — plain values, connection variables, and aliases — at the environment and service scope. Project-scope variables already apply to the clone, since it stays in the same project.

Databases are created before the services that consume them, so a connection variable pointing at a cloned database resolves on the clone from the start.

What a clone never copies

  • Data. Databases arrive fresh and empty, and volume data is not copied. For moving data between environments, see Databases across environments.
  • Sensitive variable values. A sensitive value never leaves its environment. No copy lands on the clone — instead, the result lists each missing name (environment-wide and per service) so you re-add the name and value on the clone yourself.
  • Custom domains. They stay on the source environment.

Clone from the console

  1. Open the environment you want to clone.
  2. Open the environment switcher in the header and choose Clone current environment.
  3. Enter a name for the clone. The name is permanent — it follows the same naming rule as every project, environment, and service name.
  4. Press Clone. The new environment is created and its services start deploying.
  5. If the source had sensitive variables, a dialog lists every name that was not copied. Re-add each one on the clone — a service that depends on one may not start until you do.

Requirements

Cloning requires the admin role, because it creates a new environment — see Teams & roles. The clone also counts against your plan's environment limit — see Usage & limits.

A clone is a one-time copy: the two environments share nothing afterwards. To repeatedly push configuration from one existing environment onto another, use Promote an environment instead.

You can also clone via the Environments API.