> 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/file-servers-and-protocols/files-com-agent/macos-installation.md).

# macOS Installation

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.

## 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`).

## Agent Download

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.

## Service Installation

To install the Agent as a `launchd` service on macOS, run:

```bash
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:

```bash
files-agent service start
```

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

Stop the service with:

```bash
files-agent service stop
```

Remove the service with:

```bash
files-agent service uninstall
```
