Why Does My Servers Hostname Keep Changing?

Why does my servers hostname keep changing?

Cloud-init sets the hostname on each reboot, if your hostname is not configured to be persistent it will be reset on each reboot. Below you can find out how to make sure your hostname is persistent and remains after a reset which you find below:


Setting hostname via cloud-init:

Simply set the hostname via cloud-init, please refer to the cloud-init documentation here. Once you have done this the hostname will always be set to the desired name after a reboot.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article

Modified on 25 Mar 2024

Can’t find what you’re looking for?

Get in Touch

Do you have a pre-sales question?