---
description: >
  The digitalocean Packer builder is able to create new images for use with

  DigitalOcean. The builder takes a source image, runs any provisioning
  necessary

  on the image after launching it, then snapshots it into a reusable image. This

  reusable image can then be used as the foundation of new servers that are

  launched within DigitalOcean.
page_title: DigitalOcean - Builders
---

# DigitalOcean Builder

Type: `digitalocean`
Artifact BuilderId: `pearkes.digitalocean`

The `digitalocean` Packer builder is able to create new images for use with
[DigitalOcean](https://www.digitalocean.com). The builder takes a source image,
runs any provisioning necessary on the image after launching it, then snapshots
it into a reusable image. This reusable image can then be used as the
foundation of new servers that are launched within DigitalOcean.

The builder does _not_ manage images. Once it creates an image, it is up to you
to use it or delete it.

## Configuration Reference

There are many configuration options available for the builder. They are
segmented below into two categories: required and optional parameters. Within
each category, the available configuration keys are alphabetized.

### Required:

@include 'builder/digitalocean/Config-required.mdx'

### Optional:

@include 'builder/digitalocean/Config-not-required.mdx'

## Basic Example

Here is a basic example. It is completely valid as soon as you enter your own
access tokens:

```json
{
  "type": "digitalocean",
  "api_token": "YOUR API KEY",
  "image": "ubuntu-16-04-x64",
  "region": "nyc3",
  "size": "512mb",
  "ssh_username": "root"
}
```

### Communicator Config

In addition to the builder options, a
[communicator](/docs/templates/legacy_json_templates/communicator) can be configured for this builder.

@include 'packer-plugin-sdk/communicator/Config-not-required.mdx'

@include 'packer-plugin-sdk/communicator/SSH-not-required.mdx'

@include 'packer-plugin-sdk/communicator/SSH-Private-Key-File-not-required.mdx'
