# How to Add Custom Images to Additional Regions Custom images are Linux and Unix-like images you import to DigitalOcean. You can create Droplets based custom images, which lets you migrate and scale your workloads without spending time recreating your environment from scratch. After you [upload a custom image](https://docs.digitalocean.com/products/custom-images/how-to/upload/index.html.md) to your account, you can create Droplets from that image as long as they are in the same datacenter. If you’d like to create a Droplet from a custom image in a different region, you need to add your custom image to that region first. ## Add a Custom Image to a Region using Automation ## How to Add an Image to a Region Using the DigitalOcean CLI 1. [Install `doctl`](https://docs.digitalocean.com/reference/doctl/how-to/install/index.html.md), the official DigitalOcean CLI. 2. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with `doctl`. 3. Use the token to grant `doctl` access to your DigitalOcean account. ```shell doctl auth init ``` 4. Finally, run `doctl compute image-action transfer`. Basic usage looks like this, but you can [read the usage docs](https://docs.digitalocean.com/reference/doctl/reference/compute/image-action/transfer/index.html.md) for more details: ```shell doctl compute image-action transfer [flags] ``` The following example transfers an image with the ID 386734086 to the region with the slug nyc3: ```shell doctl compute image-action transfer 386734086 --region nyc3 ``` ## How to Add an Image to a Region Using the DigitalOcean API 1. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with the API. 2. Send a POST request to [`https://api.digitalocean.com/v2/images/{image_id}/actions`](https://docs.digitalocean.com/reference/api/digitalocean//index.html.md#operation/imageActions_post). ### cURL Using cURL: ```shell # Transfer an Existing Image curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"transfer","region":"nyc2"}' \ "https://api.digitalocean.com/v2/images/7938269/actions" # Convert an Image into a Snapshot curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"convert"}' \ "https://api.digitalocean.com/v2/images/7938291/actions" ``` ### Go Using [Godo](https://github.com/digitalocean/godo), the official DigitalOcean API client for Go: ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() // Transfer an existing image transferRequest := &godo.ActionRequest{ "type": "transfer", "region": "nyc2", } # Transfer an Image transfer, _, err := client.ImageActions.Transfer(ctx, 7938269, transferRequest) # Convert an Image to a Snapshot # client.image_actions.convert(image_id: 7938269) } ``` ### Ruby Using [DropletKit](https://github.com/digitalocean/droplet_kit), the official DigitalOcean API client for Ruby: ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) # Transfer an Image client.image_actions.transfer(image_id: 7938269, region: 'nyc2') # Convert an Image to a Snapshot # client.image_actions.convert(image_id: 7938269) ``` ### Python Using [PyDo](https://github.com/digitalocean/pydo), the official DigitalOcean API client for Python: ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "type": "convert" } resp = client.image_actions.post(image_id=342341, body=req) ``` ## Add a Custom Image to a Region using the Control Panel From the **Backups & Snapshots** section, click the **Custom Images** tab. From there, open the **More** menu of the custom image you want to add to a new region and choose **Add to region**. ![Custom Images page listing uploaded images with image details, and a More dropdown menu for starting a Droplet or deleting the image.](https://docs.digitalocean.com/screenshots/custom-images/overview.c7f454638be3817115f1c638d877b59ed3cd004f20fa6401d8193ad4a0b3ffa6.png) In the **Custom image availability** window that opens, click the region or regions you want to add your custom image to.