How to Change the Hostname on a Vultr Optimized Cloud Compute Instance

Updated on January 15, 2025

Changing the hostname on an instance modifies the default server configuration and reinstalls the operating system. This operation may result into data loss when the instance is reinstalled to apply the new hostname.

Follow this guide to change the hostname on a Vultr Optimized Cloud Compute instance using the Vultr Customer Portal, or API.

Warning
Changing the hostname reinstalls the operating system and wipes all the data on your server.
  • Vultr Customer Portal
  • Vultr API
  1. Navigate to Products and click Compute.

  2. Click your target Vultr Optimized Cloud Compute instance to open its management page.

  3. Navigate to the Settings tab.

  4. Find and click Change Hostname on the left navigation menu.

  5. Replace the existing value with your new hostname.

  6. Click Reinstall to change your instance hostname.

  7. Check the confirmation prompt and click Change Hostname to apply the new hostname.

    Apply the new hostname

  1. Send a GET request to the List Instances endpoint and note your target instance's ID.

    console
    $ curl "https://api.vultr.com/v2/instances" \
      -X GET \
      -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a PATCH request to the Update Instance endpoint and update the instance's hostname.

    console
    $ curl "https://api.vultr.com/v2/instances/{instance-id}" \
      -X PATCH \
      -H "Authorization: Bearer ${VULTR_API_KEY}" \
      -H "Content-Type: application/json" \
      --data '{
        "hostname" : "new-instance-hostname"
      }'