> ## Documentation Index
> Fetch the complete documentation index at: https://porter-mintlify-425102cd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloning an application

> Clone an existing Porter application to the same cluster or a different one for staging environments, workload migration, or app renaming

Cloning an application allows you to quickly replicate your application configuration. This is ideal for setting up staging/development environments or migrating workloads between clusters.
In addition, this can be used to change the name of an application without having to recreate it.

<Note>
  This feature creates a new application with a unique name while copying the original's resource settings and build configuration.
</Note>

## How to Clone

<Steps>
  <Step title="Navigate to App Settings">
    Navigate to the **Settings** tab of the application you wish to duplicate and click the **Clone** button .

    <img src="https://mintcdn.com/porter-mintlify-425102cd/co1Yjd1OaNUxubJw/images/deploy/v2/clone-button.webp?fit=max&auto=format&n=co1Yjd1OaNUxubJw&q=85&s=03fe45ff314173e729cd3271b7773557" alt="clone application button" width="2065" height="283" data-path="images/deploy/v2/clone-button.webp" />
  </Step>

  <Step title="Choose Target Cluster">
    Select the target cluster from the dropdown menu. You can clone an app into the same cluster or any other cluster in your project.

    <img src="https://mintcdn.com/porter-mintlify-425102cd/co1Yjd1OaNUxubJw/images/deploy/v2/clone-cluster-select.webp?fit=max&auto=format&n=co1Yjd1OaNUxubJw&q=85&s=a5ea47a02e1027ff835ee570cf5e5dcb" alt="clone application cluster selection" width="723" height="348" data-path="images/deploy/v2/clone-cluster-select.webp" />
  </Step>

  <Step title="Configure and Deploy">
    Review the app configuration and modify as needed. Once this is done, click **Deploy application**.

    <img src="https://mintcdn.com/porter-mintlify-425102cd/co1Yjd1OaNUxubJw/images/deploy/v2/clone-settings.webp?fit=max&auto=format&n=co1Yjd1OaNUxubJw&q=85&s=363ce219bcfe99af74947526db6cf23b" alt="clone application settings" width="1587" height="709" data-path="images/deploy/v2/clone-settings.webp" />
  </Step>
</Steps>

## Important Considerations

Before cloning an app, please be aware of how specific configuration items are handled to prevent deployment failures and conflicts between environments:

<Warning>
  **The following configurations are reset during cloning:**

  * **Environment Variables:** All inline environment variables are removed.
  * **Environment Groups:** All synced environment groups are removed.
  * **Networking:** External domains are removed to prevent DNS conflicts with the original app.
</Warning>

## Common Workflows

### Renaming an Application

Application names cannot be changed once created, but cloning can be used as an alternative to achieve this:

1. Clone the application and give it the **new name**.
2. Update the environment variables and secrets on the new app.
3. Once the new app is verified and healthy, delete the original application.

### Migrating Traffic to a Different Environment

Because external domains are removed during cloning to prevent downtime on the source app, follow these steps to switch traffic:

1. Clone the application and verify it is running correctly.
2. **On the cloned app:** Add the custom domain and redeploy.
3. **On the original app:** Remove the custom domain in the **Networking** tab.

<Warning>
  Migrating a domain may cause disruption in service while DNS changes propagate. If you have additional
  questions reach out to Porter support.
</Warning>
