# Managed agent

A CrushClient installed on another machine can work for your CrushMFT server. The CrushClient registers with the server under a name, and the server then sends it jobs to run there: on that machine's files, from inside that machine's network. The CrushClient calls the server, so nothing has to be opened in the remote machine's firewall.

This needs a CrushMFT **Enterprise** license on the server.

## On the CrushClient: add the server

Sidebar › **Managed servers** › **Add server**.

![The Managed servers page](Managed-Agent/managed-servers.png)

![Adding a managed server](Managed-Agent/add-server.png)

| Field | What it is |
|---|---|
| **Agent name** | how the server will know this CrushClient, for example the machine's name |
| **Protocol**, **Host**, **Port** | the server's web address: HTTPS (or HTTP) |
| **User**, **Password** | a CrushMFT user made for this agent |

After **Save**, CrushClient registers with the server, checks it for jobs every few seconds, runs them, and sends back the results. The page shows each server with its state and the certificate it trusted on first use, with **Forget certificate**.

The Managed servers page is shown in advanced mode.

## On the server: allow the user to be an agent

In the User Manager, select the user the agent logs in with and turn on **CrushClient Agent Mode**. (CrushFTP 11.4.4 Build 17 and newer require this.)

![The agent mode option in the User Manager](Managed-Agent/user_agent_mode.png)

## On the server: send a job to the agent

Two jobs are needed, both made on the server's Jobs page.

1. **The job the agent will run** (the "inner" job). Build it like any other job, for example a Find task and a Copy task. Its paths are paths on the agent's machine, not on the server.
2. **The job that sends it.** It needs only a **Link** task that names the inner job. In the Link task, open the menu that also offers the DMZ servers and choose the agent. An agent appears there under its agent name once it has registered.

When the sending job runs, the inner job runs on the agent's machine. The server's log shows the start of the run and then the whole log of what the agent did; the job's flow view on the server does not show the agent's steps.

These tasks do not work when a job runs on an agent: AS2, Link, Preview and UsersList.

The picture above is from CrushFTP 11. See also [Jobs](../CrushFTP11/Jobs.md) and [CrushTask](../CrushFTP11/CrushTask.md) in the CrushFTP documentation.

## Keep the agent running

An agent is only useful while CrushClient runs. On a machine nobody is logged in to, install it as a service: [Services](Services.md).
