How to Create a Password Variable

Updated on 05 August, 2026

Create a password variable for a Vultr Marketplace app using the Vultr Console or Vultr API to generate random credentials for each customer deployment.


A password variable generates a unique password automatically at each deployment, rather than prompting the customer to supply one. Like a user-supplied variable, the Marketplace can display it in your application instructions and expose its value to your application through the Vultr Metadata API.

This guide explains how to create a password variable using the Vultr Console or the Vultr API.

  • Vultr Console
  • Vultr API
  1. Click Marketplace in the Vultr Console's left-hand menu.

  2. Click the application name to open the Edit App screen.

  3. Click the Variables tab.

  4. Under Add New Variable, enter the following information.

    • Label: The public name of the variable. Public landing pages display this label because no value exists before deployment. You may enter up to 255 characters.
    • Name: The variable's identifier, up to 15 characters, in snake case. Use lowercase letters and underscores only.
    • Type: Select Password from this dropdown.
  5. Under Length, enter the length of the password to generate at each deployment. It must be between 8 and 50 characters.

  6. Click Add New Variable.

    Verify that the new variable appears in the Variables list.

Send a POST request to the Create Marketplace App Variable endpoint. Replace {app-id} with the app's ID and VARIABLE-NAME/VARIABLE-LABEL with your values. Set password_length between 8 and 50.

console
$ curl "https://api.vultr.com/v2/marketplace/apps/{app-id}/manage-variables" \
    -X POST \
    -H "Authorization: Bearer ${VULTR_API_KEY}" \
    -H "Content-Type: application/json" \
    -d '{
        "name": "VARIABLE-NAME",
        "label": "VARIABLE-LABEL",
        "type": "password",
        "password_length": 16
    }'

The response contains the new app_variable object, including its id.

Comments