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

# DigitalOcean

> Connect your DigitalOcean account so Sazabi can set up log forwarding on the App Platform apps you select.

[All DigitalOcean integration capabilities](https://docs.sazabi.com/catalogs/integrations/digitalocean)

## About

DigitalOcean App Platform supports a **Datadog** log destination type that Sazabi uses to receive logs. Connecting your DigitalOcean account lets Sazabi add a log destination to each service, worker, and job in the apps you select — automatically, using your personal access token.

DigitalOcean also has a **Send to an endpoint** path where you configure the log destination yourself in the app spec. See [DigitalOcean endpoint page](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/digital-ocean.md) for that setup.

> [!WARNING]
>
> This integration covers **App Platform only**. Droplets, Spaces, Managed Databases, Managed Kubernetes, and App Platform Functions are not supported here — forward those sources using the [OpenTelemetry endpoint](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/opentelemetry.md).

## Prerequisites

* A DigitalOcean account with at least one App Platform app.
* A personal access token with **Full Access** scope, or a custom-scoped token with these permissions: `app:read`, `app:update`, `actions:read`, `regions:read`, and `sizes:read`. A Read Only token is refused, because Sazabi updates each app's spec to add the log destination.

## Set up in the dashboard

**Step 1**

### Create a personal access token

Go to the [DigitalOcean control panel](https://cloud.digitalocean.com/account/api/tokens) and create a personal access token. For minimum required access use a custom-scoped token with `app:read`, `app:update`, `actions:read`, `regions:read`, and `sizes:read`. Full Access also works.

**Step 2**

### Connect in Sazabi

Go to [**Settings > Log streams**](https://app.sazabi.com/settings/log-source-providers), click **Add source**, and select **DigitalOcean**. Enter your personal access token and click **Connect**. Sazabi checks that the token has every required scope, without changing your apps.

**Step 3**

### Add log streams

After the connection is confirmed, click **Add log stream** to open the app picker. Select the apps you want to forward. For each selected app, Sazabi:

1. Fetches the current app spec.
2. Generates a Sazabi intake URL for the app (the public key it embeds is handled for you).
3. Adds a Datadog-type log destination (pointing at that Sazabi intake URL) to all services, workers, and jobs in the app spec.
4. Updates the app with the new spec.

## Set up with the CLI

You can also connect the DigitalOcean log source with the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) (installed and authenticated — see [CLI reference](https://docs.sazabi.com/reference/cli/log-sources.md)).

Create a native connection by passing your personal access token as metadata:

```bash theme={"system"}
sazabi log-sources create digital_ocean --mode native \
  --metadata '{"apiToken":"'"$DIGITALOCEAN_TOKEN"'"}'
```

Use a token with the same scopes as the dashboard flow (`app:read`, `app:update`, `actions:read`, `regions:read`, `sizes:read`, or Full Access). Sazabi checks the token's scopes, without changing your apps, and creates the log source; note the log source ID it prints.

Add a log stream — one App Platform app per stream — with `sazabi log-streams create`, passing the app's ID and name in `--config`:

```bash theme={"system"}
sazabi log-streams create --log-source-id <log-source-id> \
  --config '{"appId":"<App Platform app ID>","appName":"<app name>"}'
```

Run `sazabi log-sources list` to confirm the source and its streams.

## Verify

Deploy a new version of a connected app or send traffic to one of its routes.

Open the [Intake page](https://docs.sazabi.com/guides/instrument/intake.md) in the Sazabi dashboard and confirm that records attributed to the **DigitalOcean** source appear. Logs typically arrive within one to two minutes of the app starting to deliver them.

## Troubleshooting

**Token validation fails with "Invalid API token"** — Regenerate the token in the DigitalOcean control panel and reconnect. Tokens with only custom scopes that lack `app:read` will also fail at this step.

**"The DigitalOcean API token is missing the scope …"** — The token can't do everything log forwarding needs, often because it is Read Only. Create a token with Full Access, or with the Custom Scopes the message lists, and reconnect. DigitalOcean doesn't let you change a token's scopes after it is created.

**"…because the account has no apps"** — Sazabi checks update access against an existing App Platform app. Create an App Platform app first, then reconnect.

**"App has no provisionable components"** — The selected app has no services, workers, or jobs — only static sites or functions, which are not supported by this log destination path. Add a service or worker to the app, or use a different app.

**Logs stop arriving** — The log destination may have been removed from the app spec, or the token may have been revoked. Remove and re-add the log stream from [**Settings > Log streams**](https://app.sazabi.com/settings/log-source-providers) in Sazabi to reprovision the destination.

**App Platform Functions not forwarding** — App Platform Functions require a different configuration path (`LOG_DESTINATIONS` environment variable / `project.yml`) and are not covered by this log source. Use the [OpenTelemetry endpoint](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/opentelemetry.md) for Functions.

## Further reading

> [card] [Intake](https://docs.sazabi.com/guides/instrument/intake.md)
>
> See per-source ingestion volume and health in the Intake page.

> [card] [DigitalOcean (send to an endpoint)](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/digital-ocean.md)
>
> Add a Datadog log destination yourself in the app spec.

> [card] [Log sources](https://docs.sazabi.com/catalogs/log-sources.md)
>
> Browse the full log source catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.