Your VPS has two names that are easy to mix up: the panel hostname, which helps you recognise it among your services, and the computer name inside the operating system. Changing one does not change the other.
The name in the panel
- Services → your VPS → Go to server → Settings.
- Under Hostname, type the new one and click Update.
It must look like a domain, with at least one dot: for example fivem.myserver.com or vps1.local. A bare name such as myserver is not accepted.
If all you want is to tell your services apart in the list, you can also give them a label from the service page.
The name inside Windows
In PowerShell as administrator:
Rename-Computer -NewName "MY-SERVER" -Restart
The server restarts and comes back with the new name. On Windows the computer name allows up to 15 characters, with no dots or spaces.
The name inside Linux
hostnamectl set-hostname fivem
Then update the 127.0.1.1 line in /etc/hosts to match, or commands such as sudo will hang for a while:
sed -i 's/^127.0.1.1.*/127.0.1.1 fivem/' /etc/hosts
If the old name comes back after a reboot, cloud-init is restoring it. Tell it to keep yours:
echo "preserve_hostname: true" > /etc/cloud/cloud.cfg.d/99-hostname.cfg
The hostname does not affect how your players connect: they use the IP, or a domain if you have pointed one at your VPS.