How to Access the Console for an App Platform Component

Validated on 27 Nov 2024 • Last edited on 17 Apr 2025

App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure.

The console of an App Platform component is an in-browser command-line terminal whose shell context is a running container instance for a given resource. You can connect to the console of your app’s components (services and workers) to run commands in the component’s container.

By running commands in the console, you can see the active processes that are running inside the container, browse its local file system, monitor resource usage, observe system logs, and more. Connecting to the console is useful for troubleshooting issues, performing maintenance tasks, and running other one-off commands.

This is similar to other container workflows involving logging into the virtualized environment. For example, with containers that have a bash shell, you can achieve the same effect locally by running docker exec -it CONTAINER_ID /bin/bash.

Warning
Container environments are ephemeral, so any changes you make to your app or files in the container using the console do not persist. Additionally, there is no synchronization between containers, so changes you make in one container do not propagate to other containers.

You can access the console for a component using the DigitalOcean Control Panel, API or the official CLI, doctl.

Access a Component’s Console Using the API

How to Access the Console 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}/components/{component_name}/exec.

cURL

Using cURL:

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

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_exec_active_deployment(app_id="a6adf840", component_name="component")

Access a Component’s Console Using the CLI

How to Access the Console 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 console. Basic usage looks like this, but you can read the usage docs for more details:
    doctl apps console <app id> <component name> [flags]
    The following example initiates a console session for the app with the ID f81d4fae-7dec-11d0-a765-00a0c91e6bf6 and the component web:
    doctl apps console f81d4fae-7dec-11d0-a765-00a0c91e6bf6 web

Access a Component’s Console Using the Control Panel

To access a component’s console from the control panel, click your app, then click the Console tab. In the Console tab, select the component that you want access to open its console.

A screenshot of a console open for an app component named sample-nodejs.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.