A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
See the answers over at How to change a droplet name, and all associated configurations?.
Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below.
I renamed the droplet into my primary domain ( somename.com ), what will be the ideal update in /etc/hostname and /etc/hosts
Just curious. Why can't the hostname be changed automatically in those two places when we perform a rename in the control panel?
From what I understand that would require taking your server down, applying the change, and then taking it back up. Also it could conflict with some other settings you have on your computer, so probably not worth the trouble in most cases. Plus there is no real need for the names to be the same.
the original image link is offline. Settings > Rename
These settings are gone now...
If you are using CentOS you need to update this file /etc/sysconfig/network
Contents of this file:
so just change HOSTNAME and that's it
If you are using CentOS you need to update this file /etc/sysconfig/network does not extist on my centos 6.5 droplet.
and neither do etc/hosts or etc/hostnames on my ubuntu droplet