Ubuntu – Changing hostname on ubuntu-server (VPS) – recommended or not

hostnameUbuntuvps

I started paying for a VPS-server at Contabo.com recently. I've read quite a few guides about setting up a VPS-server properly, – but I can't find any 'best practice' regarding the hostname.

At the moment, it's quite the horrible hostname (along the lines of: vmi123456.contaboserver.net). I can understand that I simply can change it, by changing it in /etc/hostname (it's a Ubuntu 16.04 server). But somewhere I read that some hosting-companies reset the hostname upon rebooting.

But no one addresses my issue… Should I do it? Because what if someone else has a server with Contabo, and both he and I rename the server to foo.contaboserver.net? What will then happen – which consequences will that cause? And is it cool to do it, as long as I choose something that has a high chance of being unique? And can I check if a given hostname is available or not?

Or an even better question is, – what if someone else renames their VPS to have the same name as mine currently have (vmi123456.contaboserver.net) – will that cause me problems?

Best Answer

Changing a hostname of a VPS to your domain name is recommended. If any other user has the same hostname it does not matter as host name does not come under any DNS purview. So its absolutely safe to change your VPS hostname.