Elastic Cloud Server

Change Hostname

2025-11-17 09:04:44

Scenario

After the Elastic Cloud Server is successfully created, you can modify the hostname of the cloud server according to your needs.

Before You Begin

The cloud server needs to be in the Running state.

Modify the Hostname of ECS

Method 1:

1. Log in to the console.

2. Click at the top of Control Center, and select Region.

3. Click Service List in the left navigation bar, select Computing > Elastic Cloud Server.

4. Move the mouse over the Action column of the target cloud server.

5. Click More, edit Edit Cloud Server Properties, and modify the name of cloud server in the input box.

Parameter

Rule

Host Name

Windows system, with a length of 2~15 characters, uppercase and lowercase letters, numbers, or hyphens(-) are allowed. The name cannot start or end with a hyphen (-), cannot have consecutive hyphens (-), or contain only numbers. For cloud servers running other OSs (such as Linux): It must be 2 to 64 characters in length and can contain uppercase and lowercase letters, numbers, and hyphens (-). You can separate the name into segments with periods (.), but the name cannot start or end with a hyphen (-) or a period (.). The name cannot start or end with a period (.) or a hyphen (-). A newly changed host name requires a reboot to take effect.


6. Click OK to complete the modification of the ECS hostname.

Method 2:

1. Log in to the console.

2. Click at the top of Control Center, and select Region.

3. Click Service List in the left navigation bar, select Computing > Elastic Cloud Server.

4. Click on the blue instance name of the cloud server that needs to be modified on the cloud server list page to enter the cloud server details page.

5. Click the Edit icon next to the hostname and enter the hostname to be modified in the input box.

6. Click OK and click Restart in the upper right corner to make the edited hostname take effect.

      

Note:

The ECS instance must be restarted via the console or through the API RebootInstance. Restarting within the operating system cannot make the modified hostname take effect.


ETMCfkitQHwM