Change Hostname of Chef Server

Eric Alwais -

To change the hostname on Automate/Chef Server/Compliance on AWS Marketplace installs, refer to the links found at

To change the hostname on Azure Marketplace installs of our software, refer to the appropriate section here by product

If you have a standalone Chef Server, then you just need to change the hostname and run chef-server-ctl reconfigure or private-chef-ctl reconfigure depending on your version of Chef Server. When you change the hostname, you want to make sure that the hostname and hostname -f commands both show the Fully Qualified Domain Name. This will help ensure that things go smoothly when you run the reconfigure command.

There shouldn't be any changes to existing clients.

If you are using the self-signed SSL certificates that we generate for nginx, then when you run the reconfigure commands, the SSL certificates will be regenerated.

You will need to change the chef_server_url setting in the client.rb file on each node. There are probably a few ways to accomplish this. If you are using the Chef Client cookbook to manage your nodes' client.rb file then you could try just setting the node['chef_client']['server_url'] attribute to the new hostname and test to see if the next Chef Client run on a node properly changes the client.rb file and restarts the Chef Client service. If you are not using the Chef Client cookbook, then you can implement a knife ssh command that will make the change across the nodes' client.rb.

Do your nodes run Chef Client with ssl_verify_mode enabled? If so, and if you are using the self-signed SSL certificates on the Chef Server, then you need to make sure you get the new self-signed SSL certificates into the node's /etc/chef/trusted_certs directory. You will also need to do similar work for your workstations.

If you want this new configuration to flow through into Manage and the knife.rb that it can generate in the starter kit, you must also issue a chef-manage-ctl reconfigure.

See also

Have more questions? Submit a request


Powered by Zendesk