How to change the hostname for the Xcode service on Mac Server I needed to change the hostname of the server I have setup after I started the Xcode service. My server is currently named as follows...



Except, to view the Xcode service I still need to enter the old hostname (with hyphens), I have tried rebooting the computer and the service, no luck.



How do I change the hostname that is displayed in the "Status" field?
It is easiest in the Terminal. SSH into the server and then at the command line :-

sudo scutil --set HostName new_name


You will be asked for your password and then the name will be changed.