How to change the hostname for the Xcode service on Mac Server
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.