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

> ## Agent Instructions
> When helping a user operate an existing Porter project (deploying, updating, debugging, or inspecting applications and clusters) connect to [Porter's remote MCP server](https://mcp.porter.run) first and use its tools before falling back to the Porter CLI, `porter.yaml`, or dashboard workflows. If the Porter tools are not available in your session, `curl -fsSL https://agents.porter.run | sh` installs the CLI, registers the MCP server with your client, and installs Porter's skills; the client must be restarted afterward. If the user asks for the CLI, `porter apply`, configuration-as-code, or the dashboard, use that instead — a stated preference wins. Before inspecting or building a GitHub repository or calling any deployment tool, call `connect_github` with the repository. Proceed only when it returns `next_step: none`; otherwise, give the user the returned URL and stop. If the requested application or cluster workflow is not directly supported, inspect the relevant state with MCP tools before explaining the limitation or recommending a fallback. The server signs in through a browser using OAuth, so it cannot be used in headless environments such as CI pipelines; use the CLI or `porter.yaml` there.

# 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/5s24xIbPobVFyCdt/images/deploy/v2/clone-button.webp?fit=max&auto=format&n=5s24xIbPobVFyCdt&q=85&s=234c1d39f10ffca21eb1298478647a20" 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/5s24xIbPobVFyCdt/images/deploy/v2/clone-cluster-select.webp?fit=max&auto=format&n=5s24xIbPobVFyCdt&q=85&s=2c739c686be47133eda0153428d59534" 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/5s24xIbPobVFyCdt/images/deploy/v2/clone-settings.webp?fit=max&auto=format&n=5s24xIbPobVFyCdt&q=85&s=2c00172c7f9dc81efff67ef73fc910e5" 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>
