InfraNestInfraNest
DigitalOcean

Create a DigitalOcean API token

You only need this if you'd rather not use Connect with DigitalOcean, which does the same job without a token. If you do want one, it takes about a minute.

Updated November 2, 20263 min read

Use this if you'd rather authenticate InfraNest with a manually created DigitalOcean token instead of using the one-click connect option. It's for anyone connecting DigitalOcean who prefers to manage their own token.

#Overview

  • You only need this if you'd rather not use Connect with DigitalOcean, which does the same job without a token.
  • Creating a token takes about a minute.
  • You'll choose an expiry and a set of permissions (scopes), then paste the token into InfraNest.

#Create the token

  1. Sign in to DigitalOcean.
  2. Open the tokens page — the Open the token page link on the InfraNest connect screen takes you straight there, or use the left-hand menu: API (right at the bottom), then the Tokens tab.
  3. Select Generate New Token.
  4. Give it a name you'll recognise, such as InfraNest.
  5. Choose an expiry. See the note below before you pick one.
  6. Choose the scopes — Full Access is fine, or see the list below for a narrower token.
Create a DigitalOcean API token
  1. Select Generate Token, then copy the value. It starts with dop_v1_.
  2. Paste it into InfraNest — see Connect DigitalOcean.

WarningThe token is shown once. If you navigate away without copying it, generate a new one rather than trying to find it again.

#Which scopes it needs

Full Access works and is the quickest choice. If you'd rather give it only what InfraNest uses, pick Custom Scopes and tick these. The connect screen lists the same rows beside the token box.

For DNS and certificates:

  • account — read. InfraNest checks which account the token belongs to; without it the connection fails, even for DNS alone.
  • domain — read, create, update and delete. Reading your zones and records, and saving changes you make in InfraNest. A token without update and delete shows your records perfectly and then refuses every edit.
  • certificate — read. The certificate list. InfraNest never changes a certificate at DigitalOcean.

For Droplets and the rest of your cloud, add:

  • droplet — read, create, update, delete and admin. DigitalOcean asks for admin to rebuild a Droplet, restore it from a backup or snapshot, or reset its root password.
  • block_storage — read, create, update, delete; block_storage_action — create (attach, detach and resize a volume); block_storage_snapshot — create (a final snapshot before a volume is deleted).
  • firewall, vpc and load_balancer — read, create, update, delete.
  • snapshot — read, delete; image — read; ssh_key — read, create; tag — create, delete.
  • reserved_ip — read, delete (release an address you no longer use).
  • monitoring — read. The graphs. Without it they pause and the account says Server graphs is paused.
  • regions and sizes — read. The choices when you create or resize a Droplet.

NoteUnlike some providers, DigitalOcean can't pre-tick these for you from a link — the connect screen lists them beside the button so you can copy the selection across.

#About the expiry

DigitalOcean asks you to pick how long the token lasts, and the default is not "forever". When it expires, your zones stop syncing and InfraNest emails you that the integration has a problem — it isn't broken, it just needs a new token.

Either choose No expiry, or put the date in your calendar so you can replace it before it lapses.

#Replace a token

  1. Generate the new token at DigitalOcean first.
  2. In InfraNest, open Integrations → DigitalOcean → Connections & settings.
  3. Open the account, go to its Account tab, and select Update the API key to paste in the new value.
  4. Delete the old token at DigitalOcean afterwards.

Nothing you've set up in InfraNest is affected — the connection keeps its zones, its history and its settings.

#Tips

TipIf you don't want to manage tokens at all, use Connect with DigitalOcean instead — it does the same job without one.

Related articles

Try this in your own account

Connect one provider and work through these steps against your own infrastructure.

Free plan · No credit card required · Set up in minutes