> 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/windows-installation.md).

# Windows Installation

Install the Files.com Agent as a Windows service so it starts at boot, runs without a user session, and restarts after a failure.

## Root Path

Verify that the `root` setting in the [configuration file](/connections/file-servers-and-protocols/files-com-agent/agent-configuration-file.md) uses either a local drive path (for example, `C:\path\to\folder`) or a UNC path to an accessible network drive (for example, `\\servername\c$\path\to\folder`).

Microsoft advises using [UNC paths instead of mapped network drives for system services](https://learn.microsoft.com/en-us/windows/win32/services/services-and-redirected-drives) because mapped drives can cause security and reliability problems. Mapped drives are shared across accounts, so other services may gain unintended access.

## Service Account Permissions

The Windows service account running the Agent needs the right permissions to access the folder defined in the configuration file's `root` setting.

For most environments, a named Active Directory account is the best practice. Configure the service to log on as this account and verify that it exists on both the Agent host system and any remote system the UNC path references. This account must also have the "[Log on as a service](https://learn.microsoft.com/en-us/system-center/scsm/enable-service-log-on-sm)" privilege. The Agent can only access the `root` items that the selected user account has permissions to access. If you choose a local system user account instead, verify the same account exists and has appropriate access on both systems.

## MSI-Based Service Installation <a href="#msi-based-service-installation" id="msi-based-service-installation"></a>

For a 64-bit x86 Windows system, download the MSI installer from the [Agent download page](https://filescorp.hosted-by-files.com/builds/files-agent-server/latest).

Place the MSI file in the same folder as the Agent configuration file before installation. Once you've updated the [configuration file](/connections/file-servers-and-protocols/files-com-agent/agent-configuration-file.md), run the MSI to install the Agent as a service.

After installation, you'll find the configuration file at `C:\Program Files\Files.com-Agent\files_agent_config.toml`.

## Command-Line Service Installation <a href="#command-line-service-installation" id="command-line-service-installation"></a>

You can also install the Agent as a Windows service by using the command:

```powershell
files-agent.exe service install --config C:\path\to\files_agent_config.toml
```

When you install the Agent this way, the executable and configuration file stay in their current locations. After installation, start the service from the command line by running:

```powershell
files-agent.exe service start
```

If you need to update the configuration file, stop the service first, make your changes, and then restart the service.

To stop it via the command line, use:

```powershell
files-agent.exe service stop
```

To remove the Agent service from the system, use the command:

```powershell
files-agent.exe service uninstall
```
