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. Here is how to ensure that your hostname is persistent and remains after a reset:
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 restart.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article