Chapter 6

Working with multiple servers

Deploy your code to multiple servers at once

You may want to group servers together when using DeployHQ, to be able to run a single deployment to all of them at the same time.

Configuring a server group

To add a new server group to your project, head to Servers & Groups on the left hand side of the page, then click the New Server Group button on the right hand side:

Servers & Groups

Add a name for your server group, select the default branch to deploy from, choose your notification preferences then click Create Server Group to finish.

New server group

Adding servers to a group

To add a server to your server group, head back to your Servers & Groups page, then click name of the server, or the edit icon to modify it:

Servers list

At the top of the page, you'll be able to select your server group in the Group dropdown, then click Update Server at the bottom of the page to finish.

Choose a server group

You can also select this option when you're adding a new server as well, if the group has already been created in your project.

Automatically deploying to a server group

As well as being able to automatically deploy to a server in your project, you can automatically deploy to a server group. To obtain the webhook URL for a server group head to your Servers and Groups page in your project, then click the edit icon next to your server group:

Group webhook

You'll see the automatic deployment URL at the bottom of the page. You can find out more information about how to add the webhook to your repository host in our Automatic Deployments chapter.