# How to Create a Container Registry The DigitalOcean Container Registry (DOCR) is a private Docker image registry that lets you store and manage private container images. DOCR integrates natively with Docker environments and DigitalOcean Kubernetes clusters. You can create a new container registry using the control panel, API, or CLI. It requires a name, datacenter region, and subscription plan. If you use the [Professional subscription plan](https://docs.digitalocean.com/products/container-registry/details/pricing/index.html.md), you can create up to nine additional registries (for a total maximum of 10) per team. After creating a registry, you can [configure it](https://docs.digitalocean.com/products/container-registry/how-to/use-registry-docker-kubernetes/index.html.md) to push and pull from Docker and DigitalOcean Kubernetes. ## Create a Container Registry Using the Control Panel To create a container registry from the DigitalOcean Control Panel, in the left menu, click **Container Registry**. Then, click the **Create a Container Registry** button to go to the **Create a container registry** page. ### Choose a Subscription Plan Choose from the Starter, Basic, or Professional subscription plan. For more details on the different plans, see the [pricing page](https://docs.digitalocean.com/products/container-registry/details/pricing/index.html.md). ### Choose a Datacenter Region Use the drop-down menu to select your registry’s datacenter region. For the best performance, we recommend you select a region close to your other DigitalOcean resources. ### Name Your Container Registry Enter a custom name for your container registry. Names must be unique, be between 3 and 63 characters long, and only contain alphanumeric characters and dashes. You cannot change a registry’s name after creation. ### Create Registry Create the registry by clicking **Create Registry**. Once your registry is created, the **Repositories** tab opens where you can view registry information such as stored images and monitor unused data. After creation, you can change the subscription plan of an existing registry. For example, you can change the plan from the Starter plan to the Professional plan, which allows you to [create additional registries](#create-additional-registries-using-the-control-panel). To do this, from the [control panel](https://cloud.digitalocean.com/registry), in the left menu, click **Container Registry**. On the **Container Registries** page, in the **Plan details** section, click **Edit plan**. After you select the subscription plan, click **Update plan**. ## Create Additional Container Registries Using the Control Panel With the Professional subscription plan, you can create additional container registries. From the DigitalOcean Control Panel, in the left menu, click **Container Registry**. On the **Container Registries** page, click the **Create Registry** button. ![Container Registries page showing a registry with its region, size, and creation time, followed by plan details.](https://docs.digitalocean.com/screenshots/container-registry/overview.9da9b6d4ba1398b0f3e0b6a8b12843b372b818ee29d8f9d484a2d875922602bc.png) If your existing registry is already on the Professional subscription plan, specify a region and name for your registry, and then click **Create Registry** to create an additional registry. If your current registry is not on the Professional subscription plan, under the **Upgrade your subscription plan** section, select **Professional**, then specify a region and name for your registry, and then click **Create Registry**. **Note**: Before you can downgrade the plan, you need to delete the additional registries. ## Create Container Registry Using the API ## How to Create a Container Registry 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/registries`](https://docs.digitalocean.com/reference/api/reference/container-registries/index.html.md#registries_create). ### cURL Using cURL: ```shell curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "example", "subscription_tier_slug": "basic", "region": "fra1"}' \ "https://api.digitalocean.com/v2/registries" ``` ### 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 = { "name": "example", "region": "fra1", "subscription_tier_slug": "basic" } resp = client.registries.create(body=req) ``` If your container registry uses the [Professional subscription plan](https://docs.digitalocean.com/products/container-registry/details/pricing/index.html.md), you can use the API to create up to nine additional registries (for a total maximum of 10). ## How to Create Additional Registries 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/registries`](https://docs.digitalocean.com/reference/api/reference/container-registries/index.html.md#registries_create). ### cURL Using cURL: ```shell curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "example", "subscription_tier_slug": "basic", "region": "fra1"}' \ "https://api.digitalocean.com/v2/registries" ``` ### 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 = { "name": "example", "region": "fra1", "subscription_tier_slug": "basic" } resp = client.registries.create(body=req) ``` ## Create a Container Registry Using the CLI ## How to Create a Container Registry 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 registries create`. Basic usage looks like this, but you can [read the usage docs](https://docs.digitalocean.com/reference/doctl/reference/registries/create/index.html.md) for more details: ```shell doctl registries create [flags] ``` The following example creates a registry named `example-registry` in the NYC3 region: ```shell doctl registries create example-registry --region=nyc3 ``` If your container registry uses the [Professional subscription plan](https://docs.digitalocean.com/products/container-registry/details/pricing/index.html.md), you can use `doctl` to create up to nine additional registries (for a total maximum of 10). ## How to Create Additional Registries 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 registries create`. Basic usage looks like this, but you can [read the usage docs](https://docs.digitalocean.com/reference/doctl/reference/registries/create/index.html.md) for more details: ```shell doctl registries create [flags] ``` The following example creates a registry named `example-registry` in the NYC3 region: ```shell doctl registries create example-registry --region=nyc3 ```