> For the complete documentation index, see [llms.txt](https://moverdocs.files.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://moverdocs.files.com/connections/any-server-with-files.com-agent/install-files.com-agent-on-mac.md).

# Install Files.com Agent on Mac

On macOS, you install the Files.com Agent as a service so it starts automatically when the system powers on or reboots, and so it restarts itself if the agent program needs to recover from a problem. Running the Agent as a service is what makes the connection reliable across restarts and crashes.

## Configure the Root Path

Before you install the Agent as a service, set the `root` setting in the configuration file to either a local drive path (`/path/to/folder`) or a path to an accessible mounted network drive (`/mnt/path/to/folder`).

## Download the Agent

Download the agent executable for your system from the [official download location](https://filescorp.hosted-by-files.com/builds/files-agent-server/latest). Choose the version with "macos" in the name that matches your architecture and save it to the same location as your configuration file on the host system.

## Install the Agent

To install the Agent as a [`Launchd`](https://en.wikipedia.org/wiki/Launchd) service on a Mac, use this command:

```
files-agent service install --config /path/to/files_agent_config.toml
```

This method keeps the executable and configuration file in their original locations.

Start the service with:

```
files-agent service start
```

If you update the configuration file, stop the service, make your changes, and restart it.

Stop the service with:

```
files-agent service stop
```

Remove the service with:

```
files-agent service uninstall
```
