How to Create an Instance Using an Instance Template

Updated on 21 April, 2026

Create a Vultr instance from a reusable template with optional cluster association. The template defines the plan, OS, SSH keys, and startup script.


Creating an instance using a template provisions a new server with the predefined configuration from the template, including the plan, OS, SSH keys, and startup script. You can optionally associate the instance with an existing cluster by providing a cluster_id.

This guide explains how to create an instance using an instance template via the Vultr API.

  1. Send a GET request to the List Instance Templates endpoint to retrieve all available templates. If you do not have a template, create one by following How to Create an Instance Template.

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

    Note the id of the template you want to use.

  2. Send a POST request to the Create Instance endpoint to create a new instance using the template. Replace REGION with the region identifier, TEMPLATE-ID with the template id, INSTANCE-LABEL with a descriptive label, SCRIPT-ID with the startup script id, and USER-DATA with base64-encoded Cloud-Init user data. To associate the instance with a cluster, include CLUSTER-ID.

    console
    $ curl "https://api.vultr.com/v2/instances" \
        -X POST \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        -d '{
            "region": "REGION",
            "template_id": "TEMPLATE-ID",
            "label": "INSTANCE-LABEL",
            "hostname": "HOSTNAME",
            "script_id": "SCRIPT-ID",
            "user_data": "USER-DATA",
            "cluster_id": "CLUSTER-ID"
        }'
    

    A successful request returns an HTTP 202 Accepted response with the instance details. Note the instance id for future operations.

  3. Send a GET request to the Get Instance endpoint to retrieve the instance details. Replace {instance-id} with the id from the previous step.

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

    Verify that the instance status progresses to active and the configuration matches the template.

Comments