---
title: Generate Docker Config
url: https://docs.vultr.com/products/orchestration/container-registry/management/configurations/generate-docker-config
description: A tool that creates a Docker configuration file for containerizing your application on Vultr.
publish_date: 2024-09-23T20:21:28.944217Z
last_updated: 2026-05-26T20:19:41.497236Z
---

# How to Generate Docker Credentials for Vultr Container Registry

Generating Docker Credentials for Vultr Container Registry provides secure access for pushing and pulling images. These credentials are essential for authenticating and interacting with the container registry, ensuring seamless integration with Docker and Kubernetes. For Kubernetes, these credentials enable pods to authenticate and interact with the registry, facilitating the deployment of containerized applications.

Follow this guide to generate Docker credentials for your container registry on your Vultr account using the Vultr Console, API, or CLI.

=== "Vultr Console"

    1. Navigate to **Products** and click **Container Registry**.

    1. Click your target registry to open its management page.

    1. Click **Docker/Kubernetes**.

    1. In the **Docker Credentials** section, provide a time duration for which the docker credentials are valid.

        1. Check the **Push Access** box to allow push privileges for these particular credentials.

        1. Click **Generate Docker Config JSON** to generate credentials in JSON format.

    1. In the **Docker Credentials For Kubernetes** section, provide a time duration for which the credentials are valid.

        1. Check the **Push Access** box to allow push privileges for these particular credentials.

        1. Click **Generate Kubernetes YAML** to generate a Kubernetes YAML file.

=== "Vultr API"

    1. Send a `GET` request to the [**List Container Registries** endpoint](https://www.vultr.com/api/#tag/Container-Registry/operation/list-registries) and note the target registry's ID.

        ```console
        $ curl "https://api.vultr.com/v2/registries" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send an `OPTIONS` request to the [**Create Docker Credentials** endpoint](https://www.vultr.com/api/#tag/Container-Registry/operation/create-registry-docker-credentials) and note the generated credentials.

        ```console
        $ curl "https://api.vultr.com/v2/registry/{registry-id}/docker-credentials?expiry_seconds=3600&read_write=true" \
            -X OPTIONS \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send an `OPTIONS` request to the [**Create Docker Credentials for Kubernetes** endpoint](https://www.vultr.com/api/#tag/Container-Registry/operation/create-registry-kubernetes-docker-credentials) and note the generated YAML.

        ```console
        $ curl "https://api.vultr.com/v2/registry/{registry-id}/docker-credentials/kubernetes?expiry_seconds=3600&read_write=true&base64_encode=false" \
            -X OPTIONS \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

=== "Vultr CLI"

    1. List all the available registries in your Vultr account and note the target registry's ID.

        ```console
        $ vultr-cli container-registry list
        ```

    1. Generate Docker credentials for the target registry.

        ```console
        $ vultr-cli container-registry credentials docker <registry-id> --expiry-seconds 3600 --read-write true
        ```