<commit_before>---
layout: "docs"
page_title: "DigitalOcean Builder"
---

# DigitalOcean Builder

Type: `digitalocean`

The `digitalocean` builder is able to create new images for use with
[DigitalOcean](http://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 v1 api:

* `api_key` (string) - The API key to use to access your account. You can
  retrieve this on the "API" page visible after logging into your account
  on DigitalOcean.
  If not specified, Packer will use the environment variable
  `DIGITALOCEAN_API_KEY`, if set.

* `client_id` (string) - The client ID to use to access your account. You can
  find this on the "API" page visible after logging into your account on
  DigitalOcean.
  If not specified, Packer will use the environment variable
  `DIGITALOCEAN_CLIENT_ID`, if set.

### Required v2 api:

* `api_token` (string) - The client TOKEN to use to access your account. If it
  specified, then use v2 api (current), if not then used old (v1) deprecated api.
  Also it can be specified via environment variable `DIGITALOCEAN_API_TOKEN`, if set.

### Optional:

* `api_url` (string) - API endpoint, by default use https://api.digitalocean.com
  ALso it can be specified via environment variable `DIGITALOCEAN_API_URL`, if set.

* `droplet_name` (string) - The name assigned to the droplet. DigitalOcean
  sets the hostname of the machine to this value.

* `image` (string) - The name (or slug) of the base image to use. This is the
  image that will be used to launch a new droplet and provision it. This
  defaults to 'ubuntu-12-04-x64' which is the slug for "Ubuntu 12.04.4 x64".
  See https://developers.digitalocean.com/#list-all-images for details on how to get a list of the the accepted image names/slugs.
<commit_msg>Update digitalocean.html.markdown<commit_after>---
layout: "docs"
page_title: "DigitalOcean Builder"
---

# DigitalOcean Builder

Type: `digitalocean`

The `digitalocean` builder is able to create new images for use with
[DigitalOcean](http://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 v1 api:

* `api_key` (string) - The API key to use to access your account. You can
  retrieve this on the "API" page visible after logging into your account
  on DigitalOcean.
  If not specified, Packer will use the environment variable
  `DIGITALOCEAN_API_KEY`, if set.

* `client_id` (string) - The client ID to use to access your account. You can
  find this on the "API" page visible after logging into your account on
  DigitalOcean.
  If not specified, Packer will use the environment variable
  `DIGITALOCEAN_CLIENT_ID`, if set.

### Required v2 api:

* `api_token` (string) - The client TOKEN to use to access your account. If it
  specified, then use v2 api (current), if not then used old (v1) deprecated api.
  Also it can be specified via environment variable `DIGITALOCEAN_API_TOKEN`, if set.

### Optional:

* `api_url` (string) - API endpoint, by default use https://api.digitalocean.com
  Also it can be specified via environment variable `DIGITALOCEAN_API_URL`, if set.

* `droplet_name` (string) - The name assigned to the droplet. DigitalOcean
  sets the hostname of the machine to this value.

* `image` (string) - The name (or slug) of the base image to use. This is the
  image that will be used to launch a new droplet and provision it. This
  defaults to 'ubuntu-12-04-x64' which is the slug for "Ubuntu 12.04.4 x64".
  See https://developers.digitalocean.com/#list-all-images for details on how to get a list of the the accepted image names/slugs.

{'fraction_non_alphanumeric': 0.068715322236449, 'fraction_numerical': 0.007255655142979087, 'mean_word_length': 4.150549450549451, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7656570', 'n_tokens_mistral': 1384, 'n_tokens_neox': 1314, 'n_words': 667}