Chapter 8

DeployHQ Agent

Deploy to servers within a private network using the DeployHQ Agent

With DeployHQ, you can install the DeployHQ Agent which will allow access to servers within a VPN. In order to be able to take advantage of the DeployHQ agent in your account, you'll need to have the addon enabled on your account.

Agent prerequisites

  • In order to set up the agent, you'll need be running Ruby 2.0 or above on a server within your network.

  • The agent acts as a proxy, therefore it only needs to be installed on a single machine

  • The agent by default only allows access to the machine it's installed on, but you can modify the ~/.deploy/agent.access file to allow additional destination servers. After changes are made to agent.access, you'll need to restart it.

  • The server running the agent only needs to be able to connect to agent.deployhq.com via TCP port 7777, and does not need to accept incoming conections. Once a secure TLS connection is established, this is persisted, and all data is routed through this connection.

Installing the agent

To start using the agent, head to the Settings tab at the top of the screen, then the Network Agents link on the left hand side of the page:

Network Agents

Click the New Network Agent icon to add a new agent, then select your Operating System, and follow the appropriate instructions provided for the chosen OS to install it.

Network agent setup

Once you've verified the agent, start it on your server, and click Complete Agent Setup to finish.

Once the setup process has finished, you find the agent in your list, with a status showing as online if it is started successfully on your server.

Connecting to a server using the agent

Once you've set up an agent in your account, you'll be able to use it to connect to a server in any of your projects. Head to your server settings, then you'll find a Network Agent dropdown below the hostname and port in the main configuration:

Network agent connection

By default, this will be set to Direct Connection, with any configured agents available below. If you're connecting to another machine in the same network as the server running the agent, enter the same connection details that you'd use to connect to that machine locally.