How to Manage Deployments in App Platform

Validated on 27 Feb 2025 • Last edited on 10 Mar 2026

App Platform is a fully managed Platform-as-a-Service (PaaS) that deploys applications from Git repositories or container images. It automatically builds, deploys, and scales components while handling all underlying infrastructure.

You can view a deployment’s logs to check for error messages and rollback deployments as needed.

View Your App’s Deployment Logs Using Automation

To retrieve logs for a specific deployment using the CLI or API, you need to provide the deployment’s ID. You can retrieve a list of deployments and their IDs using the CLI’s doctl apps list-deployments command or the /v2/apps/{app_id}/deployments endpoint.

How to View a Deployment’s Logs Using the DigitalOcean CLI
  1. Install doctl, the official DigitalOcean CLI.
  2. Create a personal access token and save it for use with doctl.
  3. Use the token to grant doctl access to your DigitalOcean account.
    doctl auth init
  4. Finally, run doctl apps logs. Basic usage looks like this, but you can read the usage docs for more details:
    doctl apps logs <app name or id> <component name (defaults to all components)> [flags]
    The following example retrieves the build logs for the app with the ID f81d4fae-7dec-11d0-a765-00a0c91e6bf6 and the component web:
    doctl apps logs f81d4fae-7dec-11d0-a765-00a0c91e6bf6 web --type build
How to View a Deployment’s Logs Using the DigitalOcean API
  1. Create a personal access token and save it for use with the API.
  2. Send a GET request to https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}/logs.

cURL

Using cURL:

curl -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  "https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}/logs"

Python

Using PyDo, the official DigitalOcean API client for Python:

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

get_resp = client.apps.get_logs_aggregate(app_id="b6bdf840", deployment_id="a6adf840")

View Your App’s Deployments Logs Using the Control Panel

To view your app’s deployments, go to the Apps page, select your app, then click the Activity tab. The app’s deployment history displays. Click View details on any active deployment to see its real-time logs.

The Activity page showing a live deployment.

The deployment marked Live app is the currently live deployment served at your app’s URL. Click the commit link to view the commit that triggered the deployment, or hover over the -m flag to see the commit message.

To manually redeploy your app, click the Actions menu in the top-right corner, then select Deploy. This pulls the latest code from the apps’s associated source repo, builds a new container image, and deploys it.

If your Node.JS app fails to build due to node_modules caching issues, you can force clear the cache and start a new build.

Roll Back to a Previous Deployment Using the Control Panel

You can undo a faulty deployment by rolling back your app to a previous deployment. This lets you recover from accidentally deploying code with errors or an app spec that causes failures. You can roll back to any of the ten most recent successful deployments.

To roll back an app, the deployment must be in the same region as the app and use the same database resources and configuration.

Rolling back an app restores the app’s code, configuration, and app spec, but does not affect database data. To roll back database data, restore it from a backup as described in the Managed Databases documentation.

Roll Back a Deployment Using the API

To rollback a deployment using the API, provide the app’s ID and the ID of the deployment you want roll back to. Use the /v2/apps endpoint to retrieve a list of apps and their IDs, and use the /v2/apps/{app_id}/deployments endpoint to retrieve a list of deployments for a specific app.

How to Rollback a Deployment Using the DigitalOcean API
  1. Create a personal access token and save it for use with the API.
  2. Send a POST request to https://api.digitalocean.com/v2/apps/{app_id}/rollback.

cURL

Using cURL:

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -d '{ "deployment_id": "3aa4d20e-5527-4c00-b496-601fbd22520a" }' \
  "https://api.digitalocean.com/v2/apps/{app_id}/rollback"

Python

Using PyDo, the official DigitalOcean API client for Python:

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

create_resp = client.apps.create_rollback(app_id="b6bdf840")

Roll Back a Deployment Using the Control Panel

To roll back an app, go to the Apps page, select your app, then click the Activity tab.

In the Activity list, click Rollback beside the deployment you want to roll back. The Rollback window shows a comparison between the current deployment and the selected deployment:

  • Expand resources in the tree to see whether source code or resource settings have changed. For source code changes, you can click the commit hash to view the commit that triggered the deployment. You can also hover over the -m flag to see the commit message.

    The Rollback window showing an example app and a components whose resource settings changed.
  • Expand ALL SETTINGS DIFF to see the diff between your current and previous deployment’s app spec. Additions and deletions are shown using + and -.

  • Expand MORE OPTIONS and optionally clear the Automatically Deploy Code Changes checkbox to disable automatic redeploys until the cause for the rollback is resolved.

Click Rollback to start the rollback deployment. The new deployment duplicates the old one, preserving both the code and configuration from the selected deployment.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.