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

# Deploy Apps

> Deploy your app to environments, update or roll back, and configure per-environment access

Your app goes live on its built-in environment as soon as you publish. To run it in other environments, such as `staging` or `production`, deploy a published version there.

## Deploy an App

Deploy from the **Publish** dropdown right after publishing, or from the **Deploy** tab inside the app.

<Tip>
  Environments are created and configured in the Enterprise Dashboard. See [Environments](/en/3.13.x/administer/environments) for details.
</Tip>

Choose the target environment and version, then configure the deployment:

* Pick the model and integration credentials the app uses there.
* For each environment variable the version defines, choose where its value comes from:

  * **Version value**: the value saved in the version you're deploying.
  * **Last deployed value**: the value from the app's previous deployment to this environment.
  * **Custom value**: a value for this environment alone.

<Note>
  **Deploy latest** takes the newest *published* version. After editing the workflow, click **Publish Update** first so your changes are included.
</Note>

A deployment touches only its target environment: the built-in environment and all others keep serving what they already run.

If the deployment fails, other apps running in the target environment are unaffected. Detailed failure reasons are available in the Enterprise Dashboard: open the environment under **Environments** and check its **Deployments** tab.

## Update or Roll Back

To update or roll back the app running in an environment, deploy a different version there.

Click **Deploy latest** for the newest published version. To pick any other version, click **Change version** on the **Deploy** tab, or **All versions** in the **Publish** dropdown.

While the new version deploys, the environment keeps serving its current one. The switch happens only when the deployment succeeds.

If it fails, the current version keeps serving without interruption. Detailed failure reasons are available in the Enterprise Dashboard: open the environment under **Environments** and check its **Deployments** tab.

## Change the Deployment Configuration

To change the credentials or environment variable values the app uses in an environment, click **Redeploy** on the **Deploy** tab and adjust the configuration as needed.

The version stays the same, and the app keeps serving throughout: on the new configuration once it applies, or on the previous one if the redeploy fails.

## Undeploy

To stop serving the app in an environment, click **Undeploy** on the **Deploy** tab. Access stops for end users right away, and your deployment configuration is kept.

## Configure Access per Environment

In deployed environments, your app can be reached through the web app and the Service API, both configured on the app's **Access Point** tab.

To share the web app, turn it on and set [who can access it](/en/3.13.x/use/publish/webapp/web-app-access). Each environment gets its own URL.

To [call the app through the API](/en/3.13.x/develop/api/guides/deployed-environments), turn it on and generate an API key for the environment. All deployed environments share one API endpoint, and the key you use decides which environment the request goes to.

Generated API keys remain valid even if you undeploy the app from the environment: calls fail while it's undeployed, but once you deploy there again, the same keys still work.

## Monitor Deployed Apps

To see the app's runs in deployed environments, open [Invocation Logs](/en/3.13.x/administer/invocation-logs) in the Enterprise Dashboard. The **Logs** and **Monitoring** tabs in Studio cover the built-in environment only.

Run traces and metrics from deployed environments can also stream to your own observability platform through [Data Push](/en/3.13.x/administer/data-push), configured in the Enterprise Dashboard.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The Deploy tab doesn't appear for my app">
    Only Workflow and Chatflow apps can be deployed, and the tab shows only with the **Deploy app** permission. See [Who Can Deploy](/en/3.13.x/use/deploy/overview#who-can-deploy) for the defaults.
  </Accordion>

  <Accordion title="The environment I need isn't listed">
    Environments are created in the Enterprise Dashboard. Once created, an environment is available to every workspace on the platform.
  </Accordion>

  <Accordion title="The deployed environment's web app isn't listed under WEB APPS">
    The **WEB APPS** section of the sidebar shows built-in web apps only. Open a deployed environment's web app through the URL shown on the app's **Access Point** tab.
  </Accordion>

  <Accordion title="A deployment failed but I don't know why">
    In the Enterprise Dashboard, open the environment under **Environments** and look in its **Deployments** tab for the failure reason.
  </Accordion>

  <Accordion title="Runs in a deployed environment don't show up in Logs">
    The **Logs** tab covers the built-in environment only. Find runs from deployed environments in the Enterprise Dashboard, under **Invocation Logs**.
  </Accordion>
</AccordionGroup>
