How to change server name on Proxmox

Here are the instructions to change the server name of your Proxmox server.

Proxmox hostname change name

On Proxmox, you can change the server name to anything you want, and in this guide, you will learn how.

When you set up a Proxmox server, the wizard gives you the option to specify a name for the node, but if you didn’t configure the settings correctly or you need the server to match a specific naming scheme, it’s possible to change the name of the server by modifying a few system files through the shell console.

Although you can change the server, you should consider that it’s typically not recommended to perform this task as it can cause some unwanted problems in the “pve” direction and issues with virtual machines. If the server has a new installation, perhaps reinstalling the operating system is the best way to complete this task. Also, you should not change the server name if the server is working as a cluster.

This guide will teach you the steps to change the node name of your Proxmox server.

Change server name with commands on Proxmox

To change the Proxmox server name, use these steps:

  1. Open Proxmox server (web).

  2. Select the server from the left navigation pane.

  3. Click on Shell.

  4. Type the following command to change the server name on Proxmox and press Enter:

    nano /etc/hosts
  5. Replace the old name with the new node name in all occurrences. For example, in the line “10.1.4.154 pve.localdomain pve” change “pve” for the new name. The line with the new name should look similar to “10.1.4.154 myproxserver.localdomain myproxserver”

    Proxmox hosts change server name

  6. Use the “Ctrl + O” keyboard shortcut to save the file.

  7. Use the “Ctrl + X” keyboard shortcut to exit.

  8. Type the following command to change the server name and press Enter:

    nano /etc/hostsname
  9. Replace the old name with the new server name for Proxmox.

    Proxmox hostname change name

  10. Use the “Ctrl + O” keyboard shortcut to save the file.

  11. Use the “Ctrl + X” keyboard shortcut to exit.

  12. (Optional) Type the following command to update the server name and press Enter:

    nano /etc/mailname
  13. Replace the old server name with the new name (if applicable).

  14. Use the “Ctrl + O” keyboard shortcut to save the file.

  15. Use the “Ctrl + X” keyboard shortcut to exit.

  16. (Optional) Type the following command to update the server name and press Enter:

    /etc/postfix/main.cf
  17. Replace the older server name from the “myhostname” line at the top of the file.

    Proxmox main.cf change name

  18. Use the “Ctrl + O” keyboard shortcut to save the file.

  19. Use the “Ctrl + X” keyboard shortcut to exit.

  20. Type the following command to reboot the server to apply the new settings and press Enter:

    reboot now

Once you complete the steps, the Proxmox server should reflect the new name across the operating system and on the web.