Ployter

Connect DigitalOcean

How to connect DigitalOcean in one click (OAuth) or with an API token, which scopes the token needs and what differs from AWS.

With DigitalOcean connected, the panel creates droplets, networks (VPC), firewalls, managed databases and Spaces buckets in your account. You connect with the Connect with DigitalOcean button, which authorizes the panel without creating a token, or with a personal API token. The access is stored encrypted in the panel. Everything the panel creates is billed by DigitalOcean.

Before you start

  • In the panel, you need the Manage providers permission. By default, only the team owner has it.
  • In DigitalOcean, switch to the team where the resources will be created. The token works for the team it was generated in.

Limits compared to AWS

Note

On DigitalOcean, replicas, load balancer and autoscaling work like on AWS, with one difference: each service with replicas has its own load balancer, with a fixed IP, and the HTTPS certificate is issued by the panel (Let's Encrypt). Databases, cache and buckets work normally. See Replicas and load balancer.

DigitalOcean AWS
Servers, network and firewall Yes Yes
Managed databases and cache Yes Yes
Buckets Spaces S3
Load balancer, replicas and autoscaling Yes, one load balancer per service with replicas Yes, one load balancer per project
Server disk Comes with the droplet size You choose it in GB

Connect with DigitalOcean (recommended)

  1. Open Integrations → Cloud providers and click Other clouds → DigitalOcean.
  2. Keep the Connect with DigitalOcean (recommended) tab selected.
  3. Fill in the Name (for example, DigitalOcean Production) and pick the Default region.
  4. Click Connect with DigitalOcean. The page goes to DigitalOcean; sign in if asked.
  5. Pick the team where the resources will be created and click Authorize Application.
  6. DigitalOcean sends you back to the panel, which checks the access and shows the provider in the list with the OAuth badge and the team name.

The OAuth access lasts 30 days and the panel renews it on its own before it expires. It shows up on DigitalOcean under Settings → Applications & API → Authorized Applications, where you can revoke it.

Connect DigitalOcean modal on the OAuth tab
Connect DigitalOcean modal on the OAuth tab

Note

The button only shows up when DigitalOcean OAuth is configured in the panel. Without it, use the token, as in the steps below.

Or connect with a token

1. Generate the token

  1. In the DigitalOcean dashboard, open API → Tokens (direct link: https://cloud.digitalocean.com/account/api/tokens).
  2. Click Generate New Token.
  3. Give it a name, for example infra-painel.
  4. In Expiration, pick No expiry. With an expiration date, the panel loses access when the token expires.
  5. In Scopes, pick Full Access.
  6. Click Generate Token and copy the token. It starts with dop_v1_ and is shown only once.

Custom scopes

If you'd rather not grant full access, pick Custom Scopes and check exactly:

Scope Permissions
account read
droplet create, read, update, delete
firewall create, read, update, delete
vpc create, read, update, delete
reserved_ip create, read, update, delete
tag create, read, update, delete
database create, read, update, delete
spaces_key create, read, update, delete
load_balancer create, read, update, delete
certificate create, read, delete
database:view_credentials to read the database password
ssh_key read
Tip

Missing a scope? The operation that needs it fails with a DigitalOcean message. Generate a new token with the scope and use Change token on the provider card.

2. Paste the token into the panel

  1. Open Integrations → Cloud providers and click Other clouds → DigitalOcean.
  2. Fill in the Name (for example, DigitalOcean Produção).
  3. Pick the Default region. It's the one preselected when you create servers and databases; you can use others later.
  4. Paste the token into the Paste the token step field.
  5. Click Connect.

The panel tests the token against the DigitalOcean API before saving. If it's rejected, you see "Credential rejected" with the reason.

Connect DigitalOcean modal
Connect DigitalOcean modal

Available regions

Region Code
New York 1 nyc1
New York 3 nyc3
San Francisco sfo3
Toronto tor1
Atlanta atl1
Amsterdam ams3
London lon1
Frankfurt fra1
Singapore sgp1
Bangalore blr1
Sydney syd1

What the panel creates in your account

  • Server: an Ubuntu 24.04 droplet with its own firewall, attached to the droplet by tag. The firewall opens 80 and 443; 22 only if you provide an SSH key when creating it. With Static IP, also a Reserved IP. See Servers.
  • Network: one VPC per region and a network firewall that lets servers on the same network talk to each other. See Private network and firewall.
  • Databases and cache: managed clusters inside the VPC, accepting only the network's servers. See Managed cloud databases.
  • Buckets: a Spaces bucket with its own key, with access only to it. To create, configure and delete the bucket, the panel creates a temporary Spaces key and deletes it at the end. See Buckets.
  • Load balancer: one load balancer per service with replicas, with the HTTPS certificate the panel issues, and a firewall that opens port 20000 on the droplets only to it. See Replicas and load balancer.

After connecting

The account shows up as a card in Integrations → Cloud providers, with the Access (Token with the start and end of the token), the Default region, the number of Servers and the Networks.

Connected DigitalOcean provider card
Connected DigitalOcean provider card

In the card's ⋮ menu:

  • Edit: changes the name and default region.
  • Change access: opens the Change token modal, to paste a new token without losing the servers.
  • Remove: removes the provider from the panel.

Remove access

  1. First delete the servers in this account. If there are servers, the panel won't let you remove it.
  2. Remove the networks from the card (trash icon next to each network). The VPC and network firewall the panel created are deleted from the account.
  3. Open ⋮ → Remove and confirm.
  4. OAuth: the panel revokes the access on DigitalOcean on its own (if another team has a copy of the connection, only the last removal revokes it). Token: the token is still valid in DigitalOcean; delete it in API → Tokens, in the token's More → Delete menu.
Warning

Deleting the token before removing the servers through the panel leaves droplets, firewalls and IPs in your account, billing, with no way for the panel to delete them.