---
title: Change Hostname
url: https://docs.vultr.com/products/compute/instances/optimized-cloud-compute/management/change-hostname
description: Learn how to modify the hostname on your Vultr Optimized Cloud Compute instance.
publish_date: 2024-09-23T20:19:34.531240Z
last_updated: 2026-05-26T18:45:11.294047Z
---

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

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 Console, or Terraform.

> [!WARNING]
> Changing the hostname reinstalls the operating system and wipes all the data on your server.

=== "Vultr Console"

    1. Navigate to **Products** and click **Compute**.
    1. Click your target Vultr Optimized Cloud Compute instance to open its management page.
    1. Navigate to the **Settings** tab.
    1. Find and click **Change Hostname** on the left navigation menu.
    1. Replace the existing value with your new hostname.
    1. Click **Reinstall** to change your instance hostname.
    1. Check the confirmation prompt and click **Change Hostname** to apply the new hostname.

=== "Terraform"

    1. Open your Terraform configuration for the existing Optimized Cloud Compute instance.

    1. Update the `hostname` value in the instance resource.

        ```terraform
        resource "vultr_instance" "occ" {
            # ...existing fields (region, plan, os_id, label, etc.)

            hostname = "new-hostname"
        }
        ```

    1. Apply the configuration and observe the following output:

        ```
        Apply complete! Resources: 1 added, 0 changed, 1 destroyed.
        ```
